diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-04-06 13:19:49 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-04-06 13:19:49 +0000 |
commit | ffe91a35261a26397e1c8155b5260d5e055fe349 (patch) | |
tree | 537224970db4b60a28c84482d46b904291dc7edf /source3 | |
parent | a1283a6bf09d7e3cc51b99dbc4737fa0dfb724a3 (diff) | |
download | samba-ffe91a35261a26397e1c8155b5260d5e055fe349.tar.gz samba-ffe91a35261a26397e1c8155b5260d5e055fe349.tar.bz2 samba-ffe91a35261a26397e1c8155b5260d5e055fe349.zip |
Clean up error messages on cli pipe disconnection, including adding the message
for broken-due-to-bad-sig.
Andrew Bartlett
(This used to be commit b010b6c2dc400a97eb2ad038cd1fdb34bbde2ef0)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/clierror.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/libsmb/clierror.c b/source3/libsmb/clierror.c index cea736ef18..9ee181a90f 100644 --- a/source3/libsmb/clierror.c +++ b/source3/libsmb/clierror.c @@ -96,17 +96,21 @@ const char *cli_errstr(struct cli_state *cli) break; case READ_EOF: slprintf(cli_error_message, sizeof(cli_error_message) - 1, - "Call returned zero bytes (EOF)\n" ); + "Call returned zero bytes (EOF)" ); break; case READ_ERROR: slprintf(cli_error_message, sizeof(cli_error_message) - 1, - "Read error: %s\n", strerror(errno) ); + "Read error: %s", strerror(errno) ); break; case WRITE_ERROR: slprintf(cli_error_message, sizeof(cli_error_message) - 1, - "Write error: %s\n", strerror(errno) ); + "Write error: %s", strerror(errno) ); break; - default: + case READ_BAD_SIG: + slprintf(cli_error_message, sizeof(cli_error_message) - 1, + "Server packet had invalid SMB signiture!"); + break; + default: slprintf(cli_error_message, sizeof(cli_error_message) - 1, "Unknown error code %d\n", cli->smb_rw_error ); break; |