git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ecd15a
)
s3:client: close the socket if receive_smb_raw() fails
author
Stefan Metzmacher
<metze@samba.org>
Fri, 8 Jul 2011 07:30:58 +0000
(09:30 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Fri, 8 Jul 2011 12:09:08 +0000
(14:09 +0200)
metze
source3/client/client.c
patch
|
blob
|
history
diff --git
a/source3/client/client.c
b/source3/client/client.c
index b4e2b5e5257b8b1e7857513a375d0152925fcad2..130dbe0dcff47c04284781c95dec561bb09d1f7e 100644
(file)
--- a/
source3/client/client.c
+++ b/
source3/client/client.c
@@
-4942,6
+4942,11
@@
static void readline_callback(void)
status = receive_smb_raw(cli->fd, cli->inbuf, cli->bufsize, 0, 0, &len);
if (!NT_STATUS_IS_OK(status)) {
+ if (cli->fd != -1) {
+ close(cli->fd);
+ cli->fd = -1;
+ }
+
DEBUG(0, ("Read from server failed, maybe it closed "
"the connection\n"));