From c2d4fc63c8c7834570c855bc7547f3437c6af6b1 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 18 Jul 2016 17:50:39 +0100 Subject: [Feature] Implement refcount for messages --- src/libutil/http.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/libutil/http.h') diff --git a/src/libutil/http.h b/src/libutil/http.h index 140684b79..2755638db 100644 --- a/src/libutil/http.h +++ b/src/libutil/http.h @@ -268,7 +268,7 @@ struct rspamd_http_message * rspamd_http_connection_steal_msg ( * @return */ struct rspamd_http_message * rspamd_http_connection_copy_msg ( - struct rspamd_http_connection *conn); + struct rspamd_http_message *msg); /** * Create new HTTP message @@ -277,6 +277,17 @@ struct rspamd_http_message * rspamd_http_connection_copy_msg ( */ struct rspamd_http_message * rspamd_http_new_message (enum http_parser_type type); +/** + * Increase refcount number for an HTTP message + * @param msg message to use + * @return + */ +struct rspamd_http_message * rspamd_http_message_ref (struct rspamd_http_message *msg); +/** + * Decrease number of refcounts for http message + * @param msg + */ +void rspamd_http_message_unref (struct rspamd_http_message *msg); /** * Create HTTP message from URL * @param url -- cgit v1.2.3