else {
/* We got only message, no mime headers or anything like this */
/* Construct fake message for it */
- task->message = g_mime_message_new (TRUE);
+ message = g_mime_message_new (TRUE);
+ task->message = message;
if (task->from_envelope) {
g_mime_message_set_sender (task->message,
rspamd_task_get_sender (task));
cnf->bind_host = rspamd_mempool_strdup (cfg->cfg_pool, tokens[0]);
if (tokens[1] == NULL) {
cnf->bind_port = DEFAULT_BIND_PORT;
+ err = NULL;
}
else {
cnf->bind_port = strtoul (tokens[1], &err, 10);
#define NEW_IP(n, o, p) do { \
(n) = g_slice_alloc (sizeof (struct rspamd_lua_ip)); \
- if (o != NULL) { memcpy ((n), (o) ? (o) : (n), sizeof (struct rspamd_lua_ip)); } \
+ if ((o) != NULL) { memcpy ((n), (o) ? (o) : (n), sizeof (struct rspamd_lua_ip)); } \
(p) = lua_newuserdata (L, sizeof (struct rspamd_lua_ip *)); \
rspamd_lua_setclass (L, "rspamd{ip}", -1); \
*(p) = (n); \
{
struct rspamd_lua_ip *ip = lua_check_ip (L, 1),
*nip, **pip;
- const gchar *ip_str;
if (ip) {
NEW_IP(nip, ip, pip);