]> granicus.if.org Git - libevent/commitdiff
be_filter: actually disable output_filter during processing output
authorSimon Perreault <sperreault@jive.com>
Sun, 28 Feb 2016 21:49:15 +0000 (16:49 -0500)
committerAzat Khuzhin <a3at.mail@gmail.com>
Mon, 18 Apr 2016 10:32:05 +0000 (13:32 +0300)
IOW: Make the code do what the comment says it should do.

bufferevent_filter.c

index 6c3ffc4f2d9e2b8b947d6d51e2eae14134fd3fa1..5d5f992bdcc509ed1100236e10545520dcd9a5eb 100644 (file)
@@ -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;