summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2008-02-06 08:58:20 +0300
committerAlexander Bokovoy <ab@samba.org>2008-02-06 08:58:20 +0300
commitd022ed3eecbe4c3bd0c93ee09608c43048e6881a (patch)
treee1d22eead92455edbcccbd291694bf7354b83b5b /source3/nmbd
parentd3ee93596f574be2d0263efb92b2c38cf47a1a9d (diff)
parentb3f48266f353fb93fee35bdcadaec3abc0fe0122 (diff)
downloadsamba-d022ed3eecbe4c3bd0c93ee09608c43048e6881a.tar.gz
samba-d022ed3eecbe4c3bd0c93ee09608c43048e6881a.tar.bz2
samba-d022ed3eecbe4c3bd0c93ee09608c43048e6881a.zip
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into dmapi-integration
(This used to be commit f59d3786abcc53065c838a2fa82ec2f4b577b16f)
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/asyncdns.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/source3/nmbd/asyncdns.c b/source3/nmbd/asyncdns.c
index 33c1cb6cb1..5e5565991e 100644
--- a/source3/nmbd/asyncdns.c
+++ b/source3/nmbd/asyncdns.c
@@ -87,8 +87,13 @@ static void asyncdns_process(void)
DEBUGLEVEL = -1;
while (1) {
- if (read_data(fd_in, (char *)&r, sizeof(r), NULL) != sizeof(r))
+ NTSTATUS status;
+
+ status = read_data(fd_in, (char *)&r, sizeof(r));
+
+ if (!NT_STATUS_IS_OK(status)) {
break;
+ }
pull_ascii_nstring( qname, sizeof(qname), r.name.name);
r.result.s_addr = interpret_addr(qname);
@@ -194,7 +199,7 @@ void run_dns_queue(void)
struct query_record r;
struct packet_struct *p, *p2;
struct name_record *namerec;
- int size;
+ NTSTATUS status;
if (fd_in == -1)
return;
@@ -208,11 +213,11 @@ void run_dns_queue(void)
start_async_dns();
}
- if ((size=read_data(fd_in, (char *)&r, sizeof(r), NULL)) != sizeof(r)) {
- if (size) {
- DEBUG(0,("Incomplete DNS answer from child!\n"));
- fd_in = -1;
- }
+ status = read_data(fd_in, (char *)&r, sizeof(r));
+
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("read from child failed: %s\n", nt_errstr(status)));
+ fd_in = -1;
BlockSignals(True, SIGTERM);
return;
}