r9301: Allow user-defined list and lookup timeouts on IRIX. Bugzilla bug #2284.
authorJames Peach <jpeach@samba.org>
Sat, 13 Aug 2005 08:49:50 +0000 (08:49 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:00:32 +0000 (11:00 -0500)
(This used to be commit bb579141d86202ac891a7b777c137cb87effefe3)

source3/nsswitch/winbind_nss_irix.c

index 26179773a99b15477fd223d16aa6337a3b1cd846..73f3b4f33a0915e75a023963da62fb86f32157fe 100644 (file)
@@ -332,7 +332,22 @@ send_next_request(nsd_file_t *rq, struct winbindd_request *request)
        NSS_STATUS status;
        long timeout;
 
-       timeout = 1000;
+        switch (rq->f_index) {
+                case LOOKUP:
+                        timeout = nsd_attr_fetch_long(rq->f_attrs,
+                                        "lookup_timeout", 10, 10 * 1000);
+                        break;
+                case LIST:
+                        timeout = nsd_attr_fetch_long(rq->f_attrs,
+                                        "list_timeout", 10, 10 * 1000);
+                        break;
+                default:
+                       nsd_logprintf(NSD_LOG_OPER,
+                                "send_next_request (winbind) "
+                                "invalid request type %d\n", rq->f_index);
+                        rq->f_status = NS_BADREQ;
+                        return NSD_NEXT;
+        }
 
        nsd_logprintf(NSD_LOG_MIN, "send_next_request (winbind) %d to = %d\n",
                        rq->f_cmd_data, timeout);