]> git.meshlink.io Git - meshlink/commitdiff
Report the amount of actual data sent/received in AIO callbacks.
authorGuus Sliepen <guus@meshlink.io>
Mon, 18 May 2020 21:23:32 +0000 (23:23 +0200)
committerGuus Sliepen <guus@meshlink.io>
Mon, 18 May 2020 21:23:32 +0000 (23:23 +0200)
We did this for fds but not for memory buffers.

src/meshlink.c

index 55b1e04fcd7d807d5e0304a2887026322e1f98c3..5815a7772e9e9e5c738dd3f1e94ca140b2d9bbd5 100644 (file)
@@ -3465,7 +3465,7 @@ static bool aio_finish_one(meshlink_handle_t *mesh, meshlink_channel_t *channel,
 
                if(aio->data) {
                        if(aio->cb.buffer) {
-                               aio->cb.buffer(mesh, channel, aio->data, aio->len, aio->priv);
+                               aio->cb.buffer(mesh, channel, aio->data, aio->done, aio->priv);
                        }
                } else {
                        if(aio->cb.fd) {