]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] fixed win32 dig problem v9.10.0a2
authorEvan Hunt <each@isc.org>
Tue, 4 Feb 2014 20:01:20 +0000 (12:01 -0800)
committerEvan Hunt <each@isc.org>
Tue, 4 Feb 2014 20:01:20 +0000 (12:01 -0800)
3724.   [bug]           win32: Fixed a bug that prevented dig and
                        host from exiting properly after completing
                        a UDP query. [RT #35288]

CHANGES
lib/isc/win32/socket.c

diff --git a/CHANGES b/CHANGES
index ade0cdc751191a12d628bd6dc98bc638534a26bf..a4350e85086b2dfae36109e1373ea0afa626f83a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
        --- 9.10.0a2 released ---
 
+3724.  [bug]           win32: Fixed a bug that prevented dig and
+                       host from exiting properly after completing
+                       a UDP query. [RT #35288]
+
 3723.  [cleanup]       Imported keys are now handled the same way
                        regardless of DNSSEC algorithm. [RT #35215]
 
index c93ff8a4f60258fbbc8a82bb026c820c4ebe5ed4..11903eddf2ac7c3f97293a0d17499e15c7641a40 100644 (file)
@@ -1402,7 +1402,7 @@ startio_send(isc_socket_t *sock, isc_socketevent_t *dev, int *nbytes,
 
        *nbytes = internal_sendmsg(sock, lpo, msghdr, 0, send_errno);
 
-       if (*nbytes < 0) {
+       if (*nbytes <= 0) {
                /*
                 * I/O has been initiated
                 * completion will be through the completion port
@@ -3003,13 +3003,14 @@ socket_send(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
 
        io_state = startio_send(sock, dev, &cc, &send_errno);
        switch (io_state) {
-       case DOIO_PENDING:      /* I/O started. Nothing more to do */
+       case DOIO_PENDING:      /* I/O started. Enqueue completion event. */
        case DOIO_SOFT:
                /*
                 * We couldn't send all or part of the request right now, so
                 * queue it unless ISC_SOCKFLAG_NORETRY is set.
                 */
-               if ((flags & ISC_SOCKFLAG_NORETRY) == 0) {
+               if ((flags & ISC_SOCKFLAG_NORETRY) == 0 ||
+                   io_state == DOIO_PENDING) {
                        isc_task_attach(task, &ntask);
                        dev->attributes |= ISC_SOCKEVENTATTR_ATTACHED;