[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] [PATCH] Fix filter bufferevent output reentrantness



Make the code do what the comment says it should do.
---
 bufferevent_filter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bufferevent_filter.c b/bufferevent_filter.c
index 6c3ffc4..5d5f992 100644
--- a/bufferevent_filter.c
+++ b/bufferevent_filter.c
@@ -345,7 +345,8 @@ be_filter_process_output(struct bufferevent_filtered *bevf,
 
 	/* disable the callback that calls this function
 	   when the user adds to the output buffer. */
-	evbuffer_cb_set_flags(bufev->output, bevf->outbuf_cb, 0);
+	evbuffer_cb_clear_flags(bufev->output, bevf->outbuf_cb,
+	    EVBUFFER_CB_ENABLED);
 
 	do {
 		int processed = 0;
-- 
2.5.0

***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.