commit d4871e2: [Minor] Create a standard io loop in rspamadm
Vsevolod Stakhov
vsevolod at highsecure.ru
Fri Aug 6 15:42:04 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-08-06 15:17:31 +0100
URL: https://github.com/rspamd/rspamd/commit/d4871e22d6a02939283e50407d4d839f2119a9b7
[Minor] Create a standard io loop in rspamadm
---
src/libmime/message.c | 4 ++--
src/rspamadm/rspamadm.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/libmime/message.c b/src/libmime/message.c
index 9ec00d74c..91c5114e8 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -229,7 +229,7 @@ rspamd_strip_newlines_parse (struct rspamd_task *task,
struct rspamd_mime_text_part *part)
{
const gchar *p = begin, *c = begin;
- gboolean crlf_added = FALSE;
+ gboolean crlf_added = FALSE, is_utf = IS_TEXT_PART_UTF (part);
gboolean url_open_bracket = FALSE;
UChar32 uc;
@@ -240,7 +240,7 @@ rspamd_strip_newlines_parse (struct rspamd_task *task,
} state = normal_char;
while (p < pe) {
- if (IS_TEXT_PART_UTF (part)) {
+ if (G_LIKELY(is_utf)) {
gint32 off = p - begin;
U8_NEXT (begin, off, pe - begin, uc);
diff --git a/src/rspamadm/rspamadm.c b/src/rspamadm/rspamadm.c
index 94fa4881d..ae766aae6 100644
--- a/src/rspamadm/rspamadm.c
+++ b/src/rspamadm/rspamadm.c
@@ -451,7 +451,7 @@ main (gint argc, gchar **argv, gchar **env)
rspamd_log_set_log_level (rspamd_main->logger, G_LOG_LEVEL_MESSAGE);
}
- rspamd_main->event_loop = ev_default_loop (EVFLAG_SIGNALFD|EVBACKEND_ALL);
+ rspamd_main->event_loop = ev_default_loop (rspamd_config_ev_backend_get (cfg));
resolver = rspamd_dns_resolver_init (rspamd_main->logger,
rspamd_main->event_loop,
More information about the Commits
mailing list