[PATCH] Remove hardcoded timeout and use CLIENT_TIMEOUT.

scott.lovenberg at gmail.com scott.lovenberg at gmail.com
Wed Nov 28 10:00:16 MST 2012


From: Scott Lovenberg <scott.lovenberg at gmail.com>

When initialising a client structure, use defined CLIENT_TIMEOUT instead of hardcoding 20 seconds as the default value.

Signed-off-by: Scott Lovenberg <scott.lovenberg at gmail.com>
---
 source3/libsmb/clientgen.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 6bc8d0c..8a719d8 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -26,6 +26,8 @@
 #include "async_smb.h"
 #include "../libcli/smb/smbXcli_base.h"
 #include "../librpc/ndr/libndr.h"
+#include "../client/client.c"
+
 
 /*******************************************************************
  Setup the word count and byte count for a client smb message.
@@ -175,7 +177,7 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
 	}
 	cli->raw_status = NT_STATUS_INTERNAL_ERROR;
 	cli->map_dos_errors = true; /* remove this */
-	cli->timeout = 20000; /* Timeout is in milliseconds. */
+	cli->timeout = CLIENT_TIMEOUT;
 	cli->case_sensitive = false;
 
 	/* Set the CLI_FORCE_DOSERR environment variable to test
-- 
1.7.5.4



More information about the samba-technical mailing list