diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-04-14 14:28:14 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-04-14 14:28:14 +0100 |
commit | 8d84fd154d87a84eb2775f2d7ff7ca0868c30e10 (patch) | |
tree | c247448efb375b062c46ef3f50d4787ab7bfd4f0 | |
parent | 9e1dd854f40a8c782eb2dd436c259817b1ac783a (diff) | |
download | rspamd-8d84fd154d87a84eb2775f2d7ff7ca0868c30e10.tar.gz rspamd-8d84fd154d87a84eb2775f2d7ff7ca0868c30e10.zip |
Remove connection entries from HTTP router.
-rw-r--r-- | src/libutil/http.c | 6 | ||||
-rw-r--r-- | src/libutil/http.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/libutil/http.c b/src/libutil/http.c index 9e95462b4..d7181c674 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -1381,6 +1381,8 @@ rspamd_http_entry_free (struct rspamd_http_connection_entry *entry) if (entry->rt->finish_handler) { entry->rt->finish_handler (entry); } + + DL_DELETE (entry->rt->conns, entry); g_slice_free1 (sizeof (struct rspamd_http_connection_entry), entry); } } @@ -1687,7 +1689,7 @@ rspamd_http_router_handle_socket (struct rspamd_http_connection_router *router, rspamd_http_connection_read_message (conn->conn, conn, fd, router->ptv, router->ev_base); - LL_PREPEND (router->conns, conn); + DL_PREPEND (router->conns, conn); } void @@ -1697,7 +1699,7 @@ rspamd_http_router_free (struct rspamd_http_connection_router *router) struct rspamd_http_keypair *kp; if (router) { - LL_FOREACH_SAFE (router->conns, conn, tmp) + DL_FOREACH_SAFE (router->conns, conn, tmp) { rspamd_http_entry_free (conn); } diff --git a/src/libutil/http.h b/src/libutil/http.h index 3ecfc1c99..0c1515b47 100644 --- a/src/libutil/http.h +++ b/src/libutil/http.h @@ -130,7 +130,7 @@ struct rspamd_http_connection_entry { struct rspamd_http_connection *conn; gpointer ud; gboolean is_reply; - struct rspamd_http_connection_entry *next; + struct rspamd_http_connection_entry *prev, *next; }; struct rspamd_http_connection_router { |