From: Vsevolod Stakhov Date: Thu, 21 Aug 2014 13:07:27 +0000 (+0100) Subject: Allow usage of default event base. X-Git-Tag: 0.7.0~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0481887fdf5ecfccca2b703efadf84823b245f13;p=thirdparty%2Frspamd.git Allow usage of default event base. --- diff --git a/src/libutil/http.c b/src/libutil/http.c index f245ca07c1..7146a33c11 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -821,7 +821,9 @@ rspamd_http_connection_read_message (struct rspamd_http_connection *conn, EV_READ | EV_PERSIST, rspamd_http_event_handler, conn); - event_base_set (base, &priv->ev); + if (base != NULL) { + event_base_set (base, &priv->ev); + } event_add (&priv->ev, priv->ptv); } @@ -968,7 +970,9 @@ rspamd_http_connection_write_message (struct rspamd_http_connection *conn, } event_set (&priv->ev, fd, EV_WRITE, rspamd_http_event_handler, conn); - event_base_set (base, &priv->ev); + if (base != NULL) { + event_base_set (base, &priv->ev); + } event_add (&priv->ev, priv->ptv); }