diff options
-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 { |