r15116: Allow the user to set winbind nss timeouts in seconds on IRIX. Don't
authorJames Peach <jpeach@samba.org>
Tue, 18 Apr 2006 06:26:23 +0000 (06:26 +0000)
committerJames Peach <jpeach@samba.org>
Tue, 18 Apr 2006 06:26:23 +0000 (06:26 +0000)
convert the default timeout to milliseconds twice.

source/nsswitch/winbind_nss_irix.c
source/nsswitch/winbind_nss_irix.h

index fd15f57940b89aa7454437d6e99bd5552d7196fe..05085ba1f394b20fda263d4cbb0212ffa59599f4 100644 (file)
@@ -335,11 +335,11 @@ send_next_request(nsd_file_t *rq, struct winbindd_request *request)
         switch (rq->f_index) {
                 case LOOKUP:
                         timeout = nsd_attr_fetch_long(rq->f_attrs,
-                                        "lookup_timeout", 10, 10 * 1000);
+                                        "lookup_timeout", 10, 10);
                         break;
                 case LIST:
                         timeout = nsd_attr_fetch_long(rq->f_attrs,
-                                        "list_timeout", 10, 10 * 1000);
+                                        "list_timeout", 10, 10);
                         break;
                 default:
                        nsd_logprintf(NSD_LOG_OPER,
@@ -366,9 +366,11 @@ send_next_request(nsd_file_t *rq, struct winbindd_request *request)
        /*
         * Set up callback and timeouts
         */
-       nsd_logprintf(NSD_LOG_MIN, "send_next_request (winbind) fd = %d\n",winbindd_fd);
-       nsd_callback_new(winbindd_fd,winbind_callback,NSD_READ);
-       nsd_timeout_new(rq,timeout,winbind_timeout,(void *)0);
+       nsd_logprintf(NSD_LOG_MIN, "send_next_request (winbind) fd = %d\n",
+               winbindd_fd);
+
+       nsd_callback_new(winbindd_fd, winbind_callback, NSD_READ);
+       nsd_timeout_new(rq, timeout * 1000, winbind_timeout, NULL);
        return NSD_CONTINUE;
 }
 
index 7878abb981a7d1ad99a36abba0db337ad40a4538..339e316ff92e0827ed170d72ab734d4e5147eef0 100644 (file)
@@ -41,8 +41,4 @@ typedef enum
   NSS_STATUS_TRYAGAIN=NS_TRYAGAIN
 } NSS_STATUS;
 
-#define NSD_MEM_STATIC 0
-#define NSD_MEM_VOLATILE 1
-#define NSD_MEM_DYNAMIC 2
-
 #endif /* _WINBIND_NSS_IRIX_H */