commit 4f69d50: [Minor] Add flag for systemd sockets

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Jun 9 13:49:08 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-06-09 13:36:34 +0100
URL: https://github.com/rspamd/rspamd/commit/4f69d50e5ef648c09b042d9bbca9a1b9106288b2

[Minor] Add flag for systemd sockets

---
 src/rspamd.c | 1 +
 src/rspamd.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/rspamd.c b/src/rspamd.c
index ff9ecfa88..5aff3078c 100644
--- a/src/rspamd.c
+++ b/src/rspamd.c
@@ -517,6 +517,7 @@ systemd_get_socket (struct rspamd_main *rspamd_main, const gchar *fdname)
 			ls = g_malloc0 (sizeof (*ls));
 			ls->addr = rspamd_inet_address_from_sa (&addr_storage.sa, slen);
 			ls->fd = sock;
+			ls->is_systemd = true;
 
 			slen = sizeof (stype);
 			if (getsockopt (sock, SOL_SOCKET, SO_TYPE, &stype, &slen) != -1) {
diff --git a/src/rspamd.h b/src/rspamd.h
index 9e50c054a..0755acc0d 100644
--- a/src/rspamd.h
+++ b/src/rspamd.h
@@ -234,6 +234,7 @@ struct rspamd_worker_listen_socket {
 	const rspamd_inet_addr_t *addr;
 	gint fd;
 	enum rspamd_worker_socket_type type;
+	bool is_systemd;
 };
 
 typedef struct worker_s {


More information about the Commits mailing list