diff options
author | David Härdeman <david@hardeman.nu> | 2020-06-10 20:04:01 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2020-06-10 20:04:01 +0200 |
commit | 11e6254179cb78412f40d2a263bf4fb40dd7f2ff (patch) | |
tree | d641877095f16a1c6edb575c41c40b95e43b8004 /uring.c | |
parent | 320f600cd980230b2b2e34c7256c9564af6afae9 (diff) |
Improve memdebug, add basic proxy stats
Diffstat (limited to 'uring.c')
-rw-r--r-- | uring.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -191,7 +191,7 @@ uring_tbuf_write_cb(struct cfg *cfg, struct uring_task *task, int res) /* We wrote some more data */ task->tbuf->done += res; - if (task->tbuf->done >= task->tbuf->len) { + if (task->tbuf->done >= task->tbuf->len || res == 0) { r = task->tbuf->len; goto finished; } @@ -315,7 +315,10 @@ uring_tbuf_read_until_eof(struct cfg *cfg, struct uring_task *task, callback_t c static int uring_tbuf_have_data(struct cfg *cfg, struct uring_task *task, int res) { - return res; + if (res < 0) + return res; + else + return 1; } void |