]> git.meshlink.io Git - utcp/commitdiff
Fix handling retransmitted data when the receive buffer is full.
authorGuus Sliepen <guus@meshlink.io>
Sun, 2 Jul 2017 13:43:57 +0000 (15:43 +0200)
committerGuus Sliepen <guus@meshlink.io>
Sun, 2 Jul 2017 13:43:57 +0000 (15:43 +0200)
utcp.c

diff --git a/utcp.c b/utcp.c
index b0ba05428926ba1dd11c7b91c942d27d1fae97e7..6b882c6f4cd4a0a888aff9dfafe18d080681dc5c 100644 (file)
--- a/utcp.c
+++ b/utcp.c
@@ -142,9 +142,6 @@ static int32_t seqdiff(uint32_t a, uint32_t b) {
 
 // Store data into the buffer
 static ssize_t buffer_put_at(struct buffer *buf, size_t offset, const void *data, size_t len) {
-       if(buf->maxsize <= buf->used)
-               return 0;
-
        debug("buffer_put_at %lu %lu %lu\n", (unsigned long)buf->used, (unsigned long)offset, (unsigned long)len);
 
        size_t required = offset + len;