diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2008-10-25 05:06:16 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2008-10-25 05:06:16 +0400 |
commit | 9a7ba3e09a318d9f1ef66b41377b4f66029915db (patch) | |
tree | 33b4bfed2e79b94cf64d86e7a70962d0591c98c9 /perl | |
parent | fb659154cb491bed9b158adfbb34337cadad7a7e (diff) | |
download | rspamd-9a7ba3e09a318d9f1ef66b41377b4f66029915db.tar.gz rspamd-9a7ba3e09a318d9f1ef66b41377b4f66029915db.zip |
* Add ability to handle multiply recipients
* Reflect changes to perl library
Diffstat (limited to 'perl')
-rw-r--r-- | perl/rspamd.xs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/perl/rspamd.xs b/perl/rspamd.xs index 60c670f6c..b22dc849f 100644 --- a/perl/rspamd.xs +++ b/perl/rspamd.xs @@ -102,6 +102,33 @@ get_part (r, num) RETVAL void +ip (r) + CODE: + dXSTARG; + struct worker_task *r; + char *ip_str; + + perl_set_session (r); + sv_upgrade(TARG, SVt_PV); + ip_str = inet_ntoa (r->from_addr); + sv_setpv(TARG, ip_str); + ST(0) = TARG; + +void +from (r) + CODE: + dXSTARG; + struct worker_task *r; + + perl_set_session (r); + if (r->from == NULL) { + XSRETURN_UNDEF; + } + sv_upgrade(TARG, SVt_PV); + sv_setpv(TARG, r->from); + ST(0) = TARG; + +void save_point (r) CODE: struct worker_task *r; |