summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-10 23:06:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:57:50 -0500
commit7a523b2bc443c7031336d5afd6b6a884ba0e0fab (patch)
tree39a3e07b09abaa09d8bae699229d0366eb38e59a /source4/libcli/raw
parente68596190502febc8216a0988f602c1601a4f986 (diff)
downloadsamba-7a523b2bc443c7031336d5afd6b6a884ba0e0fab.tar.gz
samba-7a523b2bc443c7031336d5afd6b6a884ba0e0fab.tar.bz2
samba-7a523b2bc443c7031336d5afd6b6a884ba0e0fab.zip
r1712: this should fix a bug with a spinning client when a server dies
unexpectedly. bug found by abartlett. (This used to be commit 566b7a9ce986cdfeabb69f17c472782fc7494d43)
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r--source4/libcli/raw/clitransport.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index 5290dd953d..784a6f1798 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -433,6 +433,10 @@ static void smbcli_transport_process_recv(struct smbcli_transport *transport)
transport->recv_buffer.header +
transport->recv_buffer.received,
NBT_HDR_SIZE - transport->recv_buffer.received);
+ if (ret == 0) {
+ smbcli_transport_dead(transport);
+ return;
+ }
if (ret == -1) {
if (errno == EINTR || errno == EAGAIN) {
return;