summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-06-12 19:19:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:16 -0500
commit07d2301040d1134d4f9488e786b2a13c46212bda (patch)
tree7a4f17dcfe916f5f89cf30c43dd4b256dc5f90e2
parentcacbe41945a8f40193981f4237e28e40b6932f1e (diff)
downloadsamba-07d2301040d1134d4f9488e786b2a13c46212bda.tar.gz
samba-07d2301040d1134d4f9488e786b2a13c46212bda.tar.bz2
samba-07d2301040d1134d4f9488e786b2a13c46212bda.zip
r23446: Restore Jeremy's original formatting, just fix the comment.
(This used to be commit 5b983957e3a0a05f77bfb8a10a7986c22b81088d)
-rw-r--r--source3/nsswitch/winbindd_dual.c38
1 files changed, 17 insertions, 21 deletions
diff --git a/source3/nsswitch/winbindd_dual.c b/source3/nsswitch/winbindd_dual.c
index 0c8491084d..8a4aad9de7 100644
--- a/source3/nsswitch/winbindd_dual.c
+++ b/source3/nsswitch/winbindd_dual.c
@@ -192,7 +192,7 @@ static void async_request_timeout_handler(struct event_context *ctx,
static void async_request_sent(void *private_data_data, BOOL success)
{
- uint32_t timeout;
+ uint32_t timeout = 30;
struct winbindd_async_request *state =
talloc_get_type_abort(private_data_data, struct winbindd_async_request);
@@ -212,35 +212,31 @@ static void async_request_sent(void *private_data_data, BOOL success)
sizeof(state->response->result),
async_reply_recv, state);
- timeout = 30;
-
- 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.
+ */
- /*
- * Normal timeouts are 30s, but auth requests may take a long
- * time to timeout.
- */
+ if (state->request->cmd == WINBINDD_PAM_AUTH ||
+ state->request->cmd == WINBINDD_PAM_AUTH_CRAP ) {
timeout = 300;
}
/*
- * Set up a timeout of for the response. If we don't get it close the
- * child socket and report failure.
+ * Set up a timeout of 30 seconds 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");
}
}