git.samba.org
/
vlendec
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c81a3b8
)
allow for zero size reads in asyncdns. These can happen after a signal
author
Andrew Tridgell
<tridge@samba.org>
Thu, 4 Dec 1997 08:10:49 +0000
(08:10 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Thu, 4 Dec 1997 08:10:49 +0000
(08:10 +0000)
(This used to be commit
8bac91a6e7a3601b093cb64e9cb3bcc1663fb4d4
)
source3/nmbd/asyncdns.c
patch
|
blob
|
history
diff --git
a/source3/nmbd/asyncdns.c
b/source3/nmbd/asyncdns.c
index c87e0907543bf50bc1ab4fd97d9379f34781df99..f15880080f5e5bec7f78b0828915f5e36e789499 100644
(file)
--- 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;
}