]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add some more info about systemd failures
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 19 Mar 2016 14:36:13 +0000 (14:36 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 19 Mar 2016 14:36:13 +0000 (14:36 +0000)
src/rspamd.c

index cada080b902383631554c1ae774257fc892dd66e..c47056562e53b2693caada547bbc2a03dbe161b7 100644 (file)
@@ -384,13 +384,13 @@ systemd_get_socket (struct rspamd_main *rspamd_main, gint number)
                        result = g_list_prepend (result, GINT_TO_POINTER (sock));
                }
                else if (num_passed <= number) {
-                       msg_warn_main ("systemd LISTEN_FDS does not contain the expected fd: %d",
+                       msg_err_main ("systemd LISTEN_FDS does not contain the expected fd: %d",
                                        num_passed);
                        errno = EOVERFLOW;
                }
        }
        else {
-               msg_warn_main ("cannot get systemd variable 'LISTEN_FDS'");
+               msg_err_main ("cannot get systemd variable 'LISTEN_FDS'");
                errno = ENOENT;
        }
 
@@ -484,6 +484,7 @@ spawn_workers (struct rspamd_main *rspamd_main, struct event_base *ev_base)
                                        if ((p =
                                                g_hash_table_lookup (listen_sockets,
                                                GINT_TO_POINTER (key))) == NULL) {
+
                                                if (!bcf->is_systemd) {
                                                        /* Create listen socket */
                                                        ls = create_listen_socket (bcf->addrs, bcf->cnt,
@@ -492,8 +493,10 @@ spawn_workers (struct rspamd_main *rspamd_main, struct event_base *ev_base)
                                                else {
                                                        ls = systemd_get_socket (rspamd_main, bcf->cnt);
                                                }
+
                                                if (ls == NULL) {
-                                                       msg_err_main ("cannot listen on socket %s: %s",
+                                                       msg_err_main ("cannot listen on %s socket %s: %s",
+                                                               bcf->is_systemd ? "systemd" : "normal",
                                                                bcf->name,
                                                                strerror (errno));
                                                }