From 1ed3dba46ce3a8e24cfa484f6168348e796e2c73 Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 21 May 2000 17:02:54 +0000 Subject: [PATCH] + Bug fixes: @@ -1,8 +1,13 @@ adns (0.9) unstable; urgency=low - * Move `extern "C" {' to after #include <...>'s. + Bug fixes: + * Don't make _processany always kill the TCP connection with the message + `TCP connection failed: poll/select: exceptional condition detected'. * Call MEM_ROUND in __transfer_interim (avoids assert fail `qu->interim_allocd>=0' on some platforms eg 64 bit). + + Portability/compilation fixes: + * Move `extern "C" {' to after #include <...>'s. -- --- changelog | 7 +++- regress/case-norecurse.out | 9 ++--- regress/case-norecurse.sys | 73 ++++++++++++++++++++------------------ src/event.c | 2 +- 4 files changed, 48 insertions(+), 43 deletions(-) diff --git a/changelog b/changelog index 2b3bbf5..a1e8d75 100644 --- a/changelog +++ b/changelog @@ -1,9 +1,14 @@ adns (0.9) unstable; urgency=low - * Move `extern "C" {' to after #include <...>'s. + Bug fixes: + * Don't make _processany always kill the TCP connection with the message + `TCP connection failed: poll/select: exceptional condition detected'. * Call MEM_ROUND in __transfer_interim (avoids assert fail `qu->interim_allocd>=0' on some platforms eg 64 bit). + Portability/compilation fixes: + * Move `extern "C" {' to after #include <...>'s. + -- adns (0.8) BETA; urgency=medium diff --git a/regress/case-norecurse.out b/regress/case-norecurse.out index f0d2a0f..8691f47 100644 --- a/regress/case-norecurse.out +++ b/regress/case-norecurse.out @@ -6,17 +6,14 @@ adns debug: using nameserver 172.18.45.6 4.204.50.158.in-addr.arpa flags 0 type 12 PTR(raw) submitted 4.204.50.158.in-addr.arpa flags 0 type 13adns debug: TCP connected (NS=172.18.45.6) HINFO(-) submitted -4.204.50.158.in-addr.arpa flags 0 type 15adns warning: TCP connection failed: poll/select: exceptional condition detected (NS=172.18.45.6) - MX(raw) submitted +4.204.50.158.in-addr.arpa flags 0 type 15 MX(raw) submitted 4.204.50.158.in-addr.arpa flags 0 type 16 TXT(-) submitted 4.204.50.158.in-addr.arpa flags 0 type 17 RP(raw) submitted 4.204.50.158.in-addr.arpa flags 0 type 65537 A(addr) submitted 4.204.50.158.in-addr.arpa flags 0 type 65538 NS(+addr) submitted 4.204.50.158.in-addr.arpa flags 0 type 65548 PTR(checked) submitted -4.204.50.158.in-addr.arpa flags 0 type 65551adns debug: TCP connected (NS=172.18.45.6) - MX(+addr) submitted -4.204.50.158.in-addr.arpa flags 0 type 131078adns warning: TCP connection failed: poll/select: exceptional condition detected (NS=172.18.45.6) - SOA(822) submitted +4.204.50.158.in-addr.arpa flags 0 type 65551 MX(+addr) submitted +4.204.50.158.in-addr.arpa flags 0 type 131078 SOA(822) submitted 4.204.50.158.in-addr.arpa flags 0 type 131089adns debug: reply not found, id 3141, query owner ns2.afpdoc.com (NS=172.18.45.6) adns debug: reply not found, id 3142, query owner ns2.afp-notes.com (NS=172.18.45.6) adns debug: reply not found, id 3143, query owner ns2.afp-domino.com (NS=172.18.45.6) diff --git a/regress/case-norecurse.sys b/regress/case-norecurse.sys index 3f3adf6..bbeff65 100644 --- a/regress/case-norecurse.sys +++ b/regress/case-norecurse.sys @@ -161,10 +161,7 @@ default -0x16 +0.002445 read fd=5 buflen=686 read=EAGAIN - +0.003282 - close fd=5 - close=OK - +0.000529 + +0.003811 sendto fd=4 addr=172.18.45.6:53 31260100 00010000 00000000 01340332 30340235 30033135 3807696e 2d616464 72046172 70610000 100001. @@ -177,7 +174,10 @@ default -0x16 +0.000256 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=EAGAIN - +0.000116 + +0.000115 + read fd=5 buflen=686 + read=EAGAIN + +0.000001 sendto fd=4 addr=172.18.45.6:53 31270100 00010000 00000000 01340332 30340235 30033135 3807696e 2d616464 72046172 70610000 110001. @@ -190,7 +190,10 @@ default -0x16 +0.000259 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=EAGAIN - +0.000113 + +0.000112 + read fd=5 buflen=686 + read=EAGAIN + +0.000001 sendto fd=4 addr=172.18.45.6:53 31280100 00010000 00000000 01340332 30340235 30033135 3807696e 2d616464 72046172 70610000 010001. @@ -203,7 +206,10 @@ default -0x16 +0.000259 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=EAGAIN - +0.000125 + +0.000124 + read fd=5 buflen=686 + read=EAGAIN + +0.000001 sendto fd=4 addr=172.18.45.6:53 31290100 00010000 00000000 01340332 30340235 30033135 3807696e 2d616464 72046172 70610000 020001. @@ -216,7 +222,10 @@ default -0x16 +0.000262 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=EAGAIN - +0.000124 + +0.000123 + read fd=5 buflen=686 + read=EAGAIN + +0.000001 sendto fd=4 addr=172.18.45.6:53 312a0100 00010000 00000000 01340332 30340235 30033135 3807696e 2d616464 72046172 70610000 0c0001. @@ -240,22 +249,18 @@ default -0x16 6dc03fc0 0c000c00 01000130 7c000704 6e657773 c196c00c 000c0001 0001307c 0014036e 73320a69 6d616765 666f7275 6d02746d c07cc00c 000c0001 0001307c 0007046e 657773c1 c6. - +0.001723 - socket type=SOCK_STREAM - socket=5 - +0.000993 - fcntl fd=5 cmd=F_GETFL - fcntl=~O_NONBLOCK&... - +0.000044 - fcntl fd=5 cmd=F_SETFL O_NONBLOCK|... - fcntl=OK - +0.000039 - connect fd=5 addr=172.18.45.6:53 - connect=EINPROGRESS - +0.000436 + +0.001724 + write fd=5 + 002b312a 01000001 00000000 00000134 03323034 02353003 31353807 696e2d61 + 64647204 61727061 00000c00 01. + write=45 + +0.001513 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=EAGAIN - +0.000079 + +0.000078 + read fd=5 buflen=686 + read=EAGAIN + +0.000001 sendto fd=4 addr=172.18.45.6:53 312b0100 00010000 00000000 01340332 30340235 30033135 3807696e 2d616464 72046172 70610000 0f0001. @@ -269,14 +274,9 @@ default -0x16 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=EAGAIN +0.000118 - read fd=5 buflen=1 + read fd=5 buflen=686 read=EAGAIN - +0.000068 - write fd=5 - 002b312a 01000001 00000000 00000134 03323034 02353003 31353807 696e2d61 - 64647204 61727061 00000c00 01. - write=45 - +0.001361 + +0.001429 sendto fd=4 addr=172.18.45.6:53 312c0100 00010000 00000000 01340332 30340235 30033135 3807696e 2d616464 72046172 70610000 060001. @@ -425,10 +425,7 @@ default -0x16 +0.001187 read fd=5 buflen=686 read=EAGAIN - +0.000096 - close fd=5 - close=OK - +0.000598 + +0.000694 sendto fd=4 addr=172.18.45.6:53 31440100 00010000 00000000 01340332 30340235 30033135 3807696e 2d616464 72046172 70610000 110001. @@ -616,8 +613,11 @@ default -0x16 +0.000317 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=EAGAIN - +0.000116 - select max=5 rfds=[4] wfds=[] efds=[] to=1.920611 + +0.000001 + read fd=5 buflen=686 + read=EAGAIN + +0.000115 + select max=6 rfds=[4,5] wfds=[] efds=[5] to=1.920609 select=1 rfds=[4] wfds=[] efds=[] +1.-754319 recvfrom fd=4 buflen=512 *addrlen=16 @@ -631,3 +631,6 @@ default -0x16 close fd=4 close=OK +0.000208 + close fd=5 + close=OK + +0.000001 diff --git a/src/event.c b/src/event.c index 71b6638..88e5d03 100644 --- a/src/event.c +++ b/src/event.c @@ -619,7 +619,7 @@ int adns_processany(adns_state ads) { * likely just to want to do a read on one or two fds anyway. */ npollfds= adns__pollfds(ads,pollfds); - for (i=0; i