From c031215d532c97f1d82efd672ecd622d31d3342d Mon Sep 17 00:00:00 2001
From: Simon Perreault <sperreault@jive.com>
Date: Sun, 28 Feb 2016 16:49:15 -0500
Subject: [PATCH] be_filter: actually disable output_filter during processing
 output

IOW: 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 6c3ffc4f..5d5f992b 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.40.0