]> git.ipfire.org Git - pakfire.git/commit
xfer: Fix logic error in reading WebSocket messages
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 3 May 2025 14:03:46 +0000 (14:03 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 3 May 2025 14:03:46 +0000 (14:03 +0000)
commit2789d05944048a87528e4b26f5992a7046b264c0
treeb48fb02b7ce7c95bb4a2c0c444a2b488310d3889
parenteb38b05c8c8b6b9177180478eff8c4037339199e
xfer: Fix logic error in reading WebSocket messages

After the message was read we never cleared the buffer which resulted
that on every message, the callback was called with the entire buffer.
Usually that meant that only the first JSON message was parsed and
handled. Again and again and again...

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