diff options
author | Andrew Tridgell <tridge@samba.org> | 1997-12-04 08:10:49 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1997-12-04 08:10:49 +0000 |
commit | bb97a6adacefe2d01ed94a82c0d02801c7e884b1 (patch) | |
tree | bf937c038d88c87a18b2cd24532f975b65437974 | |
parent | c81a3b8a56584da5d272e5b4f7572c723f801285 (diff) | |
download | samba-bb97a6adacefe2d01ed94a82c0d02801c7e884b1.tar.gz samba-bb97a6adacefe2d01ed94a82c0d02801c7e884b1.tar.bz2 samba-bb97a6adacefe2d01ed94a82c0d02801c7e884b1.zip |
allow for zero size reads in asyncdns. These can happen after a signal
(This used to be commit 8bac91a6e7a3601b093cb64e9cb3bcc1663fb4d4)
-rw-r--r-- | source3/nmbd/asyncdns.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/nmbd/asyncdns.c b/source3/nmbd/asyncdns.c index c87e090754..f15880080f 100644 --- a/source3/nmbd/asyncdns.c +++ b/source3/nmbd/asyncdns.c @@ -162,13 +162,16 @@ void run_dns_queue(void) { struct query_record r; struct packet_struct *p, *p2; + int size; if (fd_in == -1) return; - if (read_data(fd_in, (char *)&r, sizeof(r)) != sizeof(r)) { - DEBUG(0,("Incomplete DNS answer from child!\n")); - fd_in = -1; + if ((size=read_data(fd_in, (char *)&r, sizeof(r))) != sizeof(r)) { + if (size) { + DEBUG(0,("Incomplete DNS answer from child!\n")); + fd_in = -1; + } return; } |