summaryrefslogtreecommitdiffstats
path: root/lib/socket_wrapper
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-03-03 19:20:43 +0100
committerStefan Metzmacher <metze@samba.org>2009-03-04 08:32:31 +0100
commitc51e5a23fbeda9ece5697c3c5b60a813ec33010e (patch)
tree1d1b8eae5390a5c85f0e41e99be3878b0598142c /lib/socket_wrapper
parent8ee0cc24b8302097bccae7891cb6f9c0547a1815 (diff)
downloadsamba-c51e5a23fbeda9ece5697c3c5b60a813ec33010e.tar.gz
samba-c51e5a23fbeda9ece5697c3c5b60a813ec33010e.tar.xz
samba-c51e5a23fbeda9ece5697c3c5b60a813ec33010e.zip
socket_wrapper: don't crash if we get EAGAIN from real_recv()
This fixes a crash in the ldaps tests with socket wrapper pcap support. metze
Diffstat (limited to 'lib/socket_wrapper')
-rw-r--r--lib/socket_wrapper/socket_wrapper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c
index 1e3927705b2..51f37804ef5 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -1781,7 +1781,7 @@ _PUBLIC_ ssize_t swrap_recv(int s, void *buf, size_t len, int flags)
swrap_dump_packet(si, NULL, SWRAP_RECV_RST, NULL, 0);
} else if (ret == 0) { /* END OF FILE */
swrap_dump_packet(si, NULL, SWRAP_RECV_RST, NULL, 0);
- } else {
+ } else if (ret > 0) {
swrap_dump_packet(si, NULL, SWRAP_RECV, buf, ret);
}