aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/upstream.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-13 14:40:06 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-13 14:40:06 +0100
commite89fc350172a710d97eb301d8dfc9a9667610ed3 (patch)
tree1fbdf4a4b2091f9993aa885568b4ed819f8ccd1b /src/libutil/upstream.h
parentbceef07323959f7e1a6bf09248c1ee08d5923bd0 (diff)
downloadrspamd-e89fc350172a710d97eb301d8dfc9a9667610ed3.tar.gz
rspamd-e89fc350172a710d97eb301d8dfc9a9667610ed3.zip
[Minor] Allow to capture upstream object
Diffstat (limited to 'src/libutil/upstream.h')
-rw-r--r--src/libutil/upstream.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libutil/upstream.h b/src/libutil/upstream.h
index 89bcd9b52..72a768892 100644
--- a/src/libutil/upstream.h
+++ b/src/libutil/upstream.h
@@ -299,6 +299,18 @@ struct upstream *rspamd_upstream_get_except (struct upstream_list *ups,
*/
void rspamd_upstream_reresolve (struct upstream_ctx *ctx);
+/**
+ * Share ownership on upstream
+ * @param up
+ * @return
+ */
+struct upstream* rspamd_upstream_ref (struct upstream *up);
+/**
+ * Unshare ownership on upstream
+ * @param up
+ */
+void rspamd_upstream_unref (struct upstream *up);
+
#ifdef __cplusplus
}
#endif