mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Fix n_add_for_cb in evbuffer_prepend() in case of new buffer required
Signed-off-by: @luoming1224 Fixes: #349
This commit is contained in:
parent
b8d7c6211a
commit
0abd0393ea
2
buffer.c
2
buffer.c
@ -1883,7 +1883,7 @@ evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen)
|
||||
|
||||
memcpy(tmp->buffer + tmp->misalign, data, datlen);
|
||||
buf->total_len += datlen;
|
||||
buf->n_add_for_cb += (size_t)chain->misalign;
|
||||
buf->n_add_for_cb += datlen;
|
||||
|
||||
out:
|
||||
evbuffer_invoke_callbacks_(buf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user