]> git.ipfire.org Git - pakfire.git/commitdiff
xfer: Clear the overflow buffer after the segment could be sent
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 16 Apr 2025 15:37:07 +0000 (15:37 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 16 Apr 2025 15:37:07 +0000 (15:37 +0000)
This is a stub and I will replace the send and receive buffers with our
own buffer implementation.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/xfer.c

index b9ae2d1611cb35a32ece78dbe46092a76b875ad0..e851d565cfb0e423d98f3f0fbc3f7898a9fdcd8e 100644 (file)
@@ -1732,6 +1732,8 @@ int pakfire_xfer_send_message(struct pakfire_xfer* self,
                        ERROR(self->ctx, "Failed to send previous fragment: %s\n", strerror(-r));
                        return r;
                }
+
+               self->send_buffer.length = 0;
        }
 
        // Send the actual message