summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-04-06 13:19:49 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-04-06 13:19:49 +0000
commitffe91a35261a26397e1c8155b5260d5e055fe349 (patch)
tree537224970db4b60a28c84482d46b904291dc7edf /source3
parenta1283a6bf09d7e3cc51b99dbc4737fa0dfb724a3 (diff)
downloadsamba-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.c12
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;