summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/nmbd/asyncdns.c9
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;
}