aboutsummaryrefslogtreecommitdiffstats
path: root/perl
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2008-08-22 18:15:02 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2008-08-22 18:15:02 +0400
commita4473aedcb7c49b494112bce63d06c98d88e0e0d (patch)
tree17c39ecf0b973dd3b74db3b02d678944eac649d9 /perl
parentf3b6712e04fd993caccaa18e425639d85d81b1eb (diff)
downloadrspamd-a4473aedcb7c49b494112bce63d06c98d88e0e0d.tar.gz
rspamd-a4473aedcb7c49b494112bce63d06c98d88e0e0d.zip
* Add implementation of save point for async events in rspamd filters
Diffstat (limited to 'perl')
-rw-r--r--perl/rspamd.xs22
1 files changed, 22 insertions, 0 deletions
diff --git a/perl/rspamd.xs b/perl/rspamd.xs
index 4ec40f0fb..1632ebade 100644
--- a/perl/rspamd.xs
+++ b/perl/rspamd.xs
@@ -100,6 +100,22 @@ get_part (r, num)
RETVAL
void
+save_point (r)
+ CODE:
+ struct worker_task *r;
+
+ perl_set_session (r);
+ r->save.saved = 1;
+
+void
+recall_filter (r)
+ CODE:
+ struct worker_task *r;
+
+ perl_set_session (r);
+ process_filters (r);
+
+void
read_memcached_key (r, key, datalen, callback)
CODE:
struct worker_task *r;
@@ -144,6 +160,8 @@ read_memcached_key (r, key, datalen, callback)
param.expire = 0;
memc_get (ctx, &param);
+ /* Set save point */
+ r->save.saved = 1;
XSRETURN_EMPTY;
void
@@ -190,6 +208,8 @@ write_memcached_key (r, key, data, expire, callback)
param.expire = expire;
memc_set (ctx, &param, expire);
+ /* Set save point */
+ r->save.saved = 1;
XSRETURN_EMPTY;
void
@@ -233,5 +253,7 @@ delete_memcached_key (r, key, callback)
param.expire = 0;
memc_delete (ctx, &param);
+ /* Set save point */
+ r->save.saved = 1;
XSRETURN_EMPTY;