mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-08 11:53:00 -04:00
Make overlapped reads result in evbuffer callbacks getting invoked
This commit is contained in:
parent
495c227f59
commit
6acfbdd83a
2
buffer.c
2
buffer.c
@ -444,7 +444,7 @@ evbuffer_run_callbacks(struct evbuffer *buffer, int running_deferred)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
void
|
||||
evbuffer_invoke_callbacks(struct evbuffer *buffer)
|
||||
{
|
||||
if (TAILQ_EMPTY(&buffer->callbacks)) {
|
||||
|
@ -126,6 +126,9 @@ evbuffer_commit_read(struct evbuffer *evbuf, ev_ssize_t nBytes)
|
||||
buf->read_in_progress = 0;
|
||||
|
||||
evbuf->total_len += nBytes;
|
||||
evbuf->n_add_for_cb += nBytes;
|
||||
|
||||
evbuffer_invoke_callbacks(evbuf);
|
||||
|
||||
_evbuffer_decref_and_unlock(evbuf);
|
||||
}
|
||||
|
@ -270,6 +270,8 @@ int _evbuffer_read_setup_vecs(struct evbuffer *buf, ev_ssize_t howmuch,
|
||||
/** Set the parent bufferevent object for buf to bev */
|
||||
void evbuffer_set_parent(struct evbuffer *buf, struct bufferevent *bev);
|
||||
|
||||
void evbuffer_invoke_callbacks(struct evbuffer *buf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user