diff options
author | Gerald Carter <jerry@samba.org> | 2006-06-19 12:13:46 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2006-06-19 12:13:46 +0000 |
commit | aa39f8aeab4ff08fd083cf913576f24104b08fde (patch) | |
tree | 46d96c9a35a003803628e032f24de9146dc944e7 /source/client | |
parent | a1dd753bc22fb9fe98e146078f9e45b972c69fe0 (diff) | |
download | samba-aa39f8aeab4ff08fd083cf913576f24104b08fde.tar.gz samba-aa39f8aeab4ff08fd083cf913576f24104b08fde.tar.xz samba-aa39f8aeab4ff08fd083cf913576f24104b08fde.zip |
r16348: * merging changes from SAMBA_3_0 r16346
* updating release notes to match
Diffstat (limited to 'source/client')
-rw-r--r-- | source/client/client.c | 14 | ||||
-rw-r--r-- | source/client/smbctool.c | 16 |
2 files changed, 23 insertions, 7 deletions
diff --git a/source/client/client.c b/source/client/client.c index 94fcaaca00d..0a695436f57 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -447,7 +447,14 @@ static void adjust_do_list_queue(void) * If the starting point of the queue is more than half way through, * move everything toward the beginning. */ - if (do_list_queue && (do_list_queue_start == do_list_queue_end)) { + + if (do_list_queue == NULL) { + DEBUG(4,("do_list_queue is empty\n")); + do_list_queue_start = do_list_queue_end = 0; + return; + } + + if (do_list_queue_start == do_list_queue_end) { DEBUG(4,("do_list_queue is empty\n")); do_list_queue_start = do_list_queue_end = 0; *do_list_queue = '\0'; @@ -3422,8 +3429,9 @@ static int do_message_op(void) /* set default debug level to 0 regardless of what smb.conf sets */ setup_logging( "smbclient", True ); DEBUGLEVEL_CLASS[DBGC_ALL] = 1; - dbf = x_stderr; - x_setbuf( x_stderr, NULL ); + if ((dbf = x_fdup(x_stderr))) { + x_setbuf( dbf, NULL ); + } pc = poptGetContext("smbclient", argc, (const char **) argv, long_options, POPT_CONTEXT_KEEP_FIRST); diff --git a/source/client/smbctool.c b/source/client/smbctool.c index 5b21d195b76..3233ee49554 100644 --- a/source/client/smbctool.c +++ b/source/client/smbctool.c @@ -528,7 +528,14 @@ static void adjust_do_list_queue(void) * If the starting point of the queue is more than half way through, * move everything toward the beginning. */ - if (do_list_queue && (do_list_queue_start == do_list_queue_end)) { + + if (do_list_queue == NULL) { + DEBUG(4,("do_list_queue is empty\n")); + do_list_queue_start = do_list_queue_end = 0; + return; + } + + if (do_list_queue_start == do_list_queue_end) { DEBUG(4,("do_list_queue is empty\n")); do_list_queue_start = do_list_queue_end = 0; *do_list_queue = '\0'; @@ -3561,10 +3568,11 @@ static int do_message_op(void) set_global_myname( "" ); /* set default debug level to 0 regardless of what smb.conf sets */ - setup_logging( "smbclient", True ); + setup_logging( "smbctool", True ); DEBUGLEVEL_CLASS[DBGC_ALL] = 1; - dbf = x_stderr; - x_setbuf( x_stderr, NULL ); + if ((dbf = x_fdup(x_stderr))) { + x_setbuf( dbf, NULL ); + } pc = poptGetContext("smbclient", argc, (const char **) argv, long_options, POPT_CONTEXT_KEEP_FIRST); |