diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-11-02 13:38:57 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-11-02 13:38:57 +0000 |
commit | a1bdb1f4f56ea6b3877e9c9d030d085728f0d566 (patch) | |
tree | 58ad60e9c78d8dfbcd06f5d314a5c21465f8f1e2 /src/libserver/task.c | |
parent | 99488d5a2a601f4a4ae30036b07189ff9c17ed3c (diff) | |
download | rspamd-a1bdb1f4f56ea6b3877e9c9d030d085728f0d566.tar.gz rspamd-a1bdb1f4f56ea6b3877e9c9d030d085728f0d566.zip |
[Rework] Make rspamd protocol messages useful
Each message is now represented by a string and category, so messages in
metric is an UCL object of the following format:
{
"category": "string"
}
The significant category is `smtp_message` which should be used by
rmilter to send a custom SMTP reply to a client.
Diffstat (limited to 'src/libserver/task.c')
-rw-r--r-- | src/libserver/task.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libserver/task.c b/src/libserver/task.c index 6b92593de..b9fca4d4a 100644 --- a/src/libserver/task.c +++ b/src/libserver/task.c @@ -128,6 +128,7 @@ rspamd_task_new (struct rspamd_worker *worker, struct rspamd_config *cfg) new_task->pre_result.action = METRIC_ACTION_MAX; new_task->message_id = new_task->queue_id = "undef"; + new_task->messages = ucl_object_typed_new (UCL_OBJECT); return new_task; } @@ -233,9 +234,7 @@ rspamd_task_free (struct rspamd_task *task) rspamd_email_address_unref (task->from_envelope); } - if (task->messages) { - g_list_free (task->messages); - } + ucl_object_unref (task->messages); if (task->http_conn != NULL) { rspamd_http_connection_reset (task->http_conn); |