]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Annotate assertion into error printout; we think it may be an
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 3 Aug 2021 12:08:30 +0000 (14:08 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 3 Aug 2021 12:08:30 +0000 (14:08 +0200)
  error, but the situation looks harmless.

doc/Changelog
util/netevent.c

index 8c3c8abc3bc6ce6ab41a1dd58139469c3a519174..c8c9b70410ae41fb17ea89cf27cc9b0879ac1eda 100644 (file)
@@ -5,6 +5,8 @@
 3 August 2021: Wouter
        - Merge PR #517 from dyunwei: #420 breaks the mesh reply list
          function that need to reuse the dns answer.
+       - Annotate assertion into error printout; we think it may be an
+         error, but the situation looks harmless.
 
 2 August 2021: Wouter
        - Prepare for OpenSSL 3.0.0 provider API usage, move the sldns
index d2d1481f77d19ff8eb048eb5964e7cd02b1c6dba..11c642a2bc384cafb8a57d1d737c68699ab1fe80 100644 (file)
@@ -1727,7 +1727,8 @@ comm_point_tcp_handle_read(int fd, struct comm_point* c, int short_ok)
                        (int)sldns_buffer_limit(c->buffer));
        }
 
-       log_assert(sldns_buffer_remaining(c->buffer) > 0);
+       if(sldns_buffer_remaining(c->buffer) == 0)
+               log_err("in comm_point_tcp_handle_read buffer_remaining is not > 0 as expected, continuing with (harmless) 0 length recv");
        r = recv(fd, (void*)sldns_buffer_current(c->buffer), 
                sldns_buffer_remaining(c->buffer), 0);
        if(r == 0) {