]> git.meshlink.io Git - meshlink/commit
Clear send and receive buffers before channel close/error callbacks.
authorGuus Sliepen <guus@meshlink.io>
Thu, 29 Apr 2021 16:59:18 +0000 (18:59 +0200)
committerGuus Sliepen <guus@meshlink.io>
Thu, 29 Apr 2021 16:59:18 +0000 (18:59 +0200)
commit32ab3f06ce82167e2670bd9c7c58a0c21a2550c2
tree20d3ff7073f592652dcc8a498ea930dd0056f7bf
parent526dafffcaee26fb715e603b115964b0b080e2b0
Clear send and receive buffers before channel close/error callbacks.

When there is an error that would cause the poll callback to be called
with length zero, make sure we drop the buffers first, so that calls to
meshlink_channel_get_sendq() will also return zero. This allows poll
callbacks that wait for the send buffer to be emptied to work correctly.
src/utcp.c