[PATCH] Remove hardcoded timeout and use CLIENT_TIMEOUT.

Jelmer Vernooij jelmer at canonical.com
Wed Nov 28 10:20:37 MST 2012


Hi Scott,

Thanks for the patch.

On Wed, Nov 28, 2012 at 12:00:16PM -0500, scott.lovenberg at gmail.com wrote:
> 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"

Including C files, especially ones that aren't trivial and have lots
of unnecessary code, is usually a bad idea. It might make more
sense to move that constant out from client.c to one of the header
files that is shared by libsmb/clientgen.c and client/client.c ?

Cheers,

Jelmer


More information about the samba-technical mailing list