]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix TCPreply on systems with no writev, if just 1 byte could be sent.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 15 Jun 2010 09:40:36 +0000 (09:40 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 15 Jun 2010 09:40:36 +0000 (09:40 +0000)
git-svn-id: file:///svn/unbound/trunk@2149 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
util/netevent.c

index 30e28c9ec20daa60dd94c64d31b6fc63e46a56d3..43b3a4af27b93c4a7bda535c82f3b8ae86cdccd9 100644 (file)
@@ -1,6 +1,7 @@
 15 June 2010: Wouter
        - tag 1.4.5 created.
        - trunk contains 1.4.6 in development.
+       - Fix TCPreply on systems with no writev, if just 1 byte could be sent.
 
 11 June 2010: Wouter
        - When retry to parent the retrycount is not wiped, so failed 
index 3f3c6ce037e901837cf63f5e6c92d7082ed7a93f..e5a8a4002c025bcddeaf6505414fdaed2b68849d 100644 (file)
@@ -923,7 +923,8 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c)
                log_assert(iov[1].iov_len > 0);
                r = writev(fd, iov, 2);
 #else /* HAVE_WRITEV */
-               r = send(fd, (void*)&len, sizeof(uint16_t), 0);
+               r = send(fd, (void*)(((uint8_t*)&len)+c->tcp_byte_count),
+                       sizeof(uint16_t)-c->tcp_byte_count, 0);
 #endif /* HAVE_WRITEV */
                if(r == -1) {
 #ifndef USE_WINSOCK