svn commit: samba r23426 - in branches: SAMBA_3_0/source/nsswitch
SAMBA_3_0_26/source/nsswitch
vlendec at samba.org
vlendec at samba.org
Tue Jun 12 08:02:33 GMT 2007
Author: vlendec
Date: 2007-06-12 08:02:32 +0000 (Tue, 12 Jun 2007)
New Revision: 23426
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23426
Log:
Correct a comment. The default timeout is not 1min, but 30s. While
there, do some reformatting.
Jeremy, I think we should also kill the child. It might hang in
something (an fcntl lock for example) that the next child might run into
immediately again.
Modified:
branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c
Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c 2007-06-12 01:45:40 UTC (rev 23425)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c 2007-06-12 08:02:32 UTC (rev 23426)
@@ -192,7 +192,7 @@
static void async_request_sent(void *private_data_data, BOOL success)
{
- uint32_t timeout = 30;
+ uint32_t timeout;
struct winbindd_async_request *state =
talloc_get_type_abort(private_data_data, struct winbindd_async_request);
@@ -212,31 +212,35 @@
sizeof(state->response->result),
async_reply_recv, state);
- /*
- * Normal timeouts are 30s, but auth requests may take a long
- * time to timeout.
- */
+ timeout = 30;
- if (state->request->cmd == WINBINDD_PAM_AUTH ||
- state->request->cmd == WINBINDD_PAM_AUTH_CRAP ) {
+ if (state->request->cmd == WINBINDD_PAM_AUTH
+ || state->request->cmd == WINBINDD_PAM_AUTH_CRAP ) {
+ /*
+ * Normal timeouts are 30s, but auth requests may take a long
+ * time to timeout.
+ */
+
timeout = 300;
}
/*
- * Set up a timeout of 1 minute for the response.
- * If we don't get it close the child socket and
- * report failure.
+ * Set up a timeout of for the response. If we don't get it close the
+ * child socket and report failure.
*/
- state->reply_timeout_event = event_add_timed(winbind_event_context(),
- NULL,
- timeval_current_ofs(timeout,0),
- "async_request_timeout",
- async_request_timeout_handler,
- state);
+ state->reply_timeout_event = event_add_timed(
+ winbind_event_context(),
+ NULL,
+ timeval_current_ofs(timeout,0),
+ "async_request_timeout",
+ async_request_timeout_handler,
+ state);
+
if (!state->reply_timeout_event) {
- smb_panic("async_request_sent: failed to add timeout handler.\n");
+ smb_panic("async_request_sent: failed to add timeout "
+ "handler.\n");
}
}
Modified: branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c
===================================================================
--- branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c 2007-06-12 01:45:40 UTC (rev 23425)
+++ branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c 2007-06-12 08:02:32 UTC (rev 23426)
@@ -192,7 +192,7 @@
static void async_request_sent(void *private_data_data, BOOL success)
{
- uint32_t timeout = 30;
+ uint32_t timeout;
struct winbindd_async_request *state =
talloc_get_type_abort(private_data_data, struct winbindd_async_request);
@@ -212,31 +212,35 @@
sizeof(state->response->result),
async_reply_recv, state);
- /*
- * Normal timeouts are 30s, but auth requests may take a long
- * time to timeout.
- */
+ timeout = 30;
- if (state->request->cmd == WINBINDD_PAM_AUTH ||
- state->request->cmd == WINBINDD_PAM_AUTH_CRAP ) {
+ if (state->request->cmd == WINBINDD_PAM_AUTH
+ || state->request->cmd == WINBINDD_PAM_AUTH_CRAP ) {
+ /*
+ * Normal timeouts are 30s, but auth requests may take a long
+ * time to timeout.
+ */
+
timeout = 300;
}
/*
- * Set up a timeout of 1 minute for the response.
- * If we don't get it close the child socket and
- * report failure.
+ * Set up a timeout of for the response. If we don't get it close the
+ * child socket and report failure.
*/
- state->reply_timeout_event = event_add_timed(winbind_event_context(),
- NULL,
- timeval_current_ofs(timeout,0),
- "async_request_timeout",
- async_request_timeout_handler,
- state);
+ state->reply_timeout_event = event_add_timed(
+ winbind_event_context(),
+ NULL,
+ timeval_current_ofs(timeout,0),
+ "async_request_timeout",
+ async_request_timeout_handler,
+ state);
+
if (!state->reply_timeout_event) {
- smb_panic("async_request_sent: failed to add timeout handler.\n");
+ smb_panic("async_request_sent: failed to add timeout "
+ "handler.\n");
}
}
More information about the samba-cvs
mailing list