summaryrefslogtreecommitdiffstats
path: root/test/rspamd_expression_test.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-07-08 20:07:07 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-07-08 20:07:07 +0400
commit3d1c40c972d68623f88875ec03ae7c8bafbadad5 (patch)
tree75a34069f368ebb52b47e8c3f605dcde1de3e9cd /test/rspamd_expression_test.c
parent75bf13b9bda0d1eb98671b68064becd4f6946c14 (diff)
downloadrspamd-3d1c40c972d68623f88875ec03ae7c8bafbadad5.tar.gz
rspamd-3d1c40c972d68623f88875ec03ae7c8bafbadad5.zip
* Make DNS resolver working
* Many improvements to rspamd test suite: now it CAN be used for testing rspamd functionality * Write DNS resolver tests * Fix issues with memory_pool mutexes and with creating of statfiles
Diffstat (limited to 'test/rspamd_expression_test.c')
-rw-r--r--test/rspamd_expression_test.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/rspamd_expression_test.c b/test/rspamd_expression_test.c
index 5ccaecdbd..7cf4bb123 100644
--- a/test/rspamd_expression_test.c
+++ b/test/rspamd_expression_test.c
@@ -33,26 +33,26 @@ rspamd_expression_test_func ()
outstr = memory_pool_alloc (pool, s);
while (cur) {
if (cur->type == EXPR_REGEXP) {
- r += snprintf (outstr + r, s - r, "OP:%s ", (char *)cur->content.operand);
+ r += rspamd_snprintf (outstr + r, s - r, "OP:%s ", (char *)cur->content.operand);
} else if (cur->type == EXPR_STR) {
- r += snprintf (outstr + r, s - r, "S:%s ", (char *)cur->content.operand);
+ r += rspamd_snprintf (outstr + r, s - r, "S:%s ", (char *)cur->content.operand);
} else if (cur->type == EXPR_FUNCTION) {
- r += snprintf (outstr + r, s - r, "F:%s ", ((struct expression_function *)cur->content.operand)->name);
+ r += rspamd_snprintf (outstr + r, s - r, "F:%s ", ((struct expression_function *)cur->content.operand)->name);
cur_arg = ((struct expression_function *)cur->content.operand)->args;
while (cur_arg) {
arg = cur_arg->data;
if (arg->type == EXPRESSION_ARGUMENT_NORMAL) {
- r += snprintf (outstr + r, s - r, "A:%s ", (char *)arg->data);
+ r += rspamd_snprintf (outstr + r, s - r, "A:%s ", (char *)arg->data);
}
else {
- r += snprintf (outstr + r, s - r, "AF:%s ", ((struct expression_function *)arg->data)->name);
+ r += rspamd_snprintf (outstr + r, s - r, "AF:%p ", arg->data);
}
cur_arg = g_list_next (cur_arg);
}
}
else {
- r += snprintf (outstr + r, s - r, "O:%c ", cur->content.operation);
+ r += rspamd_snprintf (outstr + r, s - r, "O:%c ", cur->content.operation);
}
cur = cur->next;
}