diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-06-15 16:37:58 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-06-22 10:57:29 +0100 |
commit | 98897c179754fb04762d325c83f1e057b44697a3 (patch) | |
tree | d53ea0de2cf2fb2e50cefe5496aa80963f8621f5 /utils | |
parent | 36ab21685bbf354108a7f12e1dda36761f655e68 (diff) | |
download | rspamd-98897c179754fb04762d325c83f1e057b44697a3.tar.gz rspamd-98897c179754fb04762d325c83f1e057b44697a3.zip |
[Project] First refactoring step libevent->libev
Diffstat (limited to 'utils')
-rw-r--r-- | utils/rspamd_http_bench.c | 8 | ||||
-rw-r--r-- | utils/rspamd_http_server.c | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/utils/rspamd_http_bench.c b/utils/rspamd_http_bench.c index 32aedb334..14d2db4f9 100644 --- a/utils/rspamd_http_bench.c +++ b/utils/rspamd_http_bench.c @@ -94,7 +94,7 @@ struct client_cbdata { struct lat_elt *lat; guint32 *wconns; gdouble ts; - struct event_base *ev_base; + struct ev_loop *ev_base; }; static void @@ -130,7 +130,7 @@ rspamd_client_finish (struct rspamd_http_connection *conn, } static void -rspamd_http_client_func (struct event_base *ev_base, struct lat_elt *latency, +rspamd_http_client_func (struct ev_loop *ev_base, struct lat_elt *latency, guint32 *wconns, struct rspamd_cryptobox_pubkey *peer_key, struct rspamd_cryptobox_keypair* client_key, @@ -178,7 +178,7 @@ static void rspamd_worker_func (struct lat_elt *plat, guint32 *wconns) { guint i, j; - struct event_base *ev_base; + struct ev_loop *ev_base; struct itimerval itv; struct rspamd_keypair_cache *c = NULL; struct rspamd_cryptobox_keypair *client_key = NULL; @@ -313,7 +313,7 @@ main (int argc, char **argv) GOptionContext *context; GError *error = NULL; pid_t *sfd; - struct event_base *ev_base; + struct ev_loop *ev_base; rspamd_mempool_t *pool = rspamd_mempool_new (8192, "http-bench"); struct event term_ev, int_ev, cld_ev; guint64 total_done; diff --git a/utils/rspamd_http_server.c b/utils/rspamd_http_server.c index 722a52103..8e6b1dadc 100644 --- a/utils/rspamd_http_server.c +++ b/utils/rspamd_http_server.c @@ -58,7 +58,7 @@ static GOptionEntry entries[] = { struct rspamd_http_server_session { struct rspamd_http_connection *conn; - struct event_base *ev_base; + struct ev_loop *ev_base; guint req_size; gboolean reply; gint fd; @@ -132,7 +132,7 @@ rspamd_server_finish (struct rspamd_http_connection *conn, static void rspamd_server_accept (gint fd, short what, void *arg) { - struct event_base *ev_base = arg; + struct ev_loop *ev_base = arg; struct rspamd_http_server_session *session; rspamd_inet_addr_t *addr; gint nfd; @@ -172,7 +172,7 @@ rspamd_server_accept (gint fd, short what, void *arg) static void rspamd_http_term_handler (gint fd, short what, void *arg) { - struct event_base *ev_base = arg; + struct ev_loop *ev_base = arg; struct timeval tv = {0, 0}; event_base_loopexit (ev_base, &tv); @@ -181,7 +181,7 @@ rspamd_http_term_handler (gint fd, short what, void *arg) static void rspamd_http_server_func (gint fd, rspamd_inet_addr_t *addr) { - struct event_base *ev_base = event_init (); + struct ev_loop *ev_base = event_init (); struct event accept_ev, term_ev; event_set (&accept_ev, fd, EV_READ | EV_PERSIST, rspamd_server_accept, ev_base); @@ -245,7 +245,7 @@ main (int argc, gchar **argv) { GOptionContext *context; GError *error = NULL; - struct event_base *ev_base; + struct ev_loop *ev_base; GString *b32_key; pid_t *sfd; rspamd_inet_addr_t *addr; |