]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix that tcp for auth zone and outgoing does not remove and
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 25 Jan 2019 12:46:15 +0000 (12:46 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 25 Jan 2019 12:46:15 +0000 (12:46 +0000)
  then gets the ssl read again applied to the deleted commpoint.

git-svn-id: file:///svn/unbound/trunk@5074 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
util/netevent.c

index bb96b35b87206801a6ba438e58851d6e2d0d1f48..1bf44c85d0db1472d63488521a6f1864b8b331d1 100644 (file)
@@ -1,3 +1,7 @@
+25 January 2018: Wouter
+       - Fix that tcp for auth zone and outgoing does not remove and
+         then gets the ssl read again applied to the deleted commpoint.
+
 24 January 2018: Wouter
        - Newer aclocal and libtoolize used for generating configure scripts,
          aclocal 1.16.1 and libtoolize 2.4.6.
index 5dbcb03d624fbc52a408c62b971600fea428963c..a507faf7e41189e3ba87d20f8edc122cde40c502 100644 (file)
@@ -1739,6 +1739,7 @@ comm_point_tcp_handle_callback(int fd, short event, void* arg)
 #endif
 
        if(event&UB_EV_READ) {
+               int has_tcpq = (c->tcp_req_info != NULL);
                if(!comm_point_tcp_handle_read(fd, c, 0)) {
                        reclaim_tcp_handler(c);
                        if(!c->tcp_do_close) {
@@ -1748,11 +1749,12 @@ comm_point_tcp_handle_callback(int fd, short event, void* arg)
                                        NETEVENT_CLOSED, NULL);
                        }
                }
-               if(c->tcp_req_info && c->tcp_req_info->read_again)
+               if(has_tcpq && c->tcp_req_info && c->tcp_req_info->read_again)
                        tcp_req_info_read_again(fd, c);
                return;
        }
        if(event&UB_EV_WRITE) {
+               int has_tcpq = (c->tcp_req_info != NULL);
                if(!comm_point_tcp_handle_write(fd, c)) {
                        reclaim_tcp_handler(c);
                        if(!c->tcp_do_close) {
@@ -1762,7 +1764,7 @@ comm_point_tcp_handle_callback(int fd, short event, void* arg)
                                        NETEVENT_CLOSED, NULL);
                        }
                }
-               if(c->tcp_req_info && c->tcp_req_info->read_again)
+               if(has_tcpq && c->tcp_req_info && c->tcp_req_info->read_again)
                        tcp_req_info_read_again(fd, c);
                return;
        }