diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-13 13:31:40 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-13 13:31:40 +0000 |
commit | df94595caf6890037a1178a8bdcb753653b1133d (patch) | |
tree | 03b87b79602fbb7b3a2a12de9b925ef9cc60475a | |
parent | 1e9de7b24eb911e318a72b66e27b8f4922d0e2f0 (diff) | |
download | rspamd-df94595caf6890037a1178a8bdcb753653b1133d.tar.gz rspamd-df94595caf6890037a1178a8bdcb753653b1133d.zip |
Use "unknown" for absent hostname.
-rw-r--r-- | src/libserver/protocol.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index e702bfc14..1b38c2b2c 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -428,6 +428,11 @@ rspamd_protocol_handle_headers (struct rspamd_task *task, return FALSE; } + if (task->hostname == NULL || task->hostname[0] == '\0') { + /* We assume that hostname is either "unknown" or existing */ + task->hostname = rspamd_mempool_strdup (task->task_pool, "unknown"); + } + return TRUE; } |