struct rspamd_controller_session *session = conn_ent->ud;
session->ctx->worker->srv->stat->control_connections_count++;
- msg_debug_session ("destroy session %p", session);
if (session->task != NULL) {
rspamd_session_destroy (session->task->s);
if (session->pool) {
rspamd_mempool_delete (session->pool);
+ msg_debug_session ("destroy session %p", session);
}
session->wrk->nconns --;
msg.msg_control = fdspace;
msg.msg_controllen = sizeof (fdspace);
cmsg = CMSG_FIRSTHDR (&msg);
- cmsg->cmsg_level = SOL_SOCKET;
- cmsg->cmsg_type = SCM_RIGHTS;
- cmsg->cmsg_len = CMSG_LEN (sizeof (int));
- memcpy (CMSG_DATA (cmsg), &outfd, sizeof (int));
+
+ if (cmsg) {
+ cmsg->cmsg_level = SOL_SOCKET;
+ cmsg->cmsg_type = SCM_RIGHTS;
+ cmsg->cmsg_len = CMSG_LEN (sizeof (int));
+ memcpy (CMSG_DATA (cmsg), &outfd, sizeof (int));
+ }
}
iov.iov_base = &rep;
while (remain > 0 && shift <= 57) {
if (*p & 0x80) {
- t |= (*p & 0x7f) << shift;
+ t |= ((guint64)(*p & 0x7f)) << shift;
}
else {
- t |= (*p & 0x7f) << shift;
+ t |= ((guint64)(*p & 0x7f)) << shift;
p ++;
break;
}
* Here we count number of octets encoded in this element
*/
for (i = 0; i < 4; i++) {
- if ((t >> 8 * i) > 0) {
+ if ((t >> (8 * i)) > 0) {
nshift += 8;
}
else {
rspamd_chartable_process_word_ascii (struct rspamd_task *task, rspamd_ftok_t *w,
gboolean is_url)
{
- const gchar *p, *end, *c;
+ const guchar *p, *end, *c;
gdouble badness = 0.0;
enum {
ascii = 1,
gpointer k, v;
struct fuzzy_mapping *map;
+ symbol = lua_tostring (L, 2);
+
for (cur = fuzzy_module_ctx->fuzzy_rules; cur != NULL && flag == 0;
cur = g_list_next (cur)) {
rule = cur->data;