diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-06 13:35:14 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-06 13:35:14 +0100 |
commit | 915a460b6a425cc5694f4166c86ee8138ffd0ace (patch) | |
tree | 9bb4d5be1cdbc13522241a1035367ab58298b001 /src/libutil/http.c | |
parent | 619fdbc7b82eea8f7b4f38fa9f29c02802619727 (diff) | |
download | rspamd-915a460b6a425cc5694f4166c86ee8138ffd0ace.tar.gz rspamd-915a460b6a425cc5694f4166c86ee8138ffd0ace.zip |
[Minor] Fix event pending checks
Diffstat (limited to 'src/libutil/http.c')
-rw-r--r-- | src/libutil/http.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libutil/http.c b/src/libutil/http.c index 2f78def47..637548dac 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -629,7 +629,7 @@ rspamd_http_on_headers_complete (http_parser * parser) if (msg->method == HTTP_HEAD) { /* We don't care about the rest */ - if (event_pending (&priv->ev, EV_READ, NULL)) { + if (rspamd_event_pending (&priv->ev, EV_READ)) { event_del (&priv->ev); } @@ -804,7 +804,7 @@ rspamd_http_on_headers_complete_decrypted (http_parser *parser) if (msg->method == HTTP_HEAD) { /* We don't care about the rest */ - if (event_pending (&priv->ev, EV_READ, NULL)) { + if (rspamd_event_pending (&priv->ev, EV_READ)) { event_del (&priv->ev); } @@ -949,7 +949,7 @@ rspamd_http_on_message_complete (http_parser * parser) } if (ret == 0) { - if (event_pending (&priv->ev, EV_READ, NULL)) { + if (rspamd_event_pending (&priv->ev, EV_READ)) { event_del (&priv->ev); } @@ -1370,7 +1370,7 @@ rspamd_http_connection_reset (struct rspamd_http_connection *conn) if (!(priv->flags & RSPAMD_HTTP_CONN_FLAG_RESETED)) { - if (event_get_base (&priv->ev)) { + if (rspamd_event_pending (&priv->ev, EV_READ|EV_WRITE|EV_TIMEOUT)) { event_del (&priv->ev); } @@ -2296,7 +2296,7 @@ rspamd_http_connection_write_message_common (struct rspamd_http_connection *conn priv->flags &= ~RSPAMD_HTTP_CONN_FLAG_RESETED; - if (base != NULL && event_get_base (&priv->ev) == base) { + if (rspamd_event_pending (&priv->ev, EV_TIMEOUT|EV_WRITE|EV_READ)) { event_del (&priv->ev); } |