aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/events.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-10-26 16:22:17 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-10-26 16:22:17 +0100
commit3ce1f7720faad822251c6e07e4eab73c56ac5798 (patch)
tree9d0b480b789804003b4590e3d9a7398d223b5a8b /src/libserver/events.h
parent0c20729f33f07cdcef5f7c10bde04f262c4a4574 (diff)
downloadrspamd-3ce1f7720faad822251c6e07e4eab73c56ac5798.tar.gz
rspamd-3ce1f7720faad822251c6e07e4eab73c56ac5798.zip
[Minor] Improve debug traces for async events
Diffstat (limited to 'src/libserver/events.h')
-rw-r--r--src/libserver/events.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/libserver/events.h b/src/libserver/events.h
index 1cb5dfa11..7e0de8749 100644
--- a/src/libserver/events.h
+++ b/src/libserver/events.h
@@ -46,10 +46,13 @@ struct rspamd_async_session * rspamd_session_create (rspamd_mempool_t *pool,
* @param forced unused
*/
struct rspamd_async_event *
-rspamd_session_add_event (struct rspamd_async_session *session,
+rspamd_session_add_event_full (struct rspamd_async_session *session,
event_finalizer_t fin,
gpointer user_data,
- const gchar *subsystem);
+ const gchar *subsystem,
+ const gchar *loc);
+#define rspamd_session_add_event(session, fin, user_data, subsystem) \
+ rspamd_session_add_event_full(session, fin, user_data, subsystem, G_STRLOC)
/**
* Remove normal event
@@ -57,9 +60,12 @@ rspamd_session_add_event (struct rspamd_async_session *session,
* @param fin final callback
* @param ud user data object
*/
-void rspamd_session_remove_event (struct rspamd_async_session *session,
- event_finalizer_t fin,
- gpointer ud);
+void rspamd_session_remove_event_full (struct rspamd_async_session *session,
+ event_finalizer_t fin,
+ gpointer ud,
+ const gchar *loc);
+#define rspamd_session_remove_event(session, fin, user_data) \
+ rspamd_session_remove_event_full(session, fin, user_data, G_STRLOC)
/**
* Must be called at the end of session, it calls fin functions for all non-forced callbacks