diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-06-10 13:02:59 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-06-10 13:02:59 +0100 |
commit | 980d8b7d6b4369491bd99df633a8ad88100e9986 (patch) | |
tree | 37508d45f5c2056861edcbd760bc666cae8a90a6 /src/libserver | |
parent | 5dac1cff96ff04cc43d690d3cbaf7ba23b8abaa7 (diff) | |
download | rspamd-980d8b7d6b4369491bd99df633a8ad88100e9986.tar.gz rspamd-980d8b7d6b4369491bd99df633a8ad88100e9986.zip |
[Minor] Explicitly specify af for socketpair
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/rspamd_control.c | 2 | ||||
-rw-r--r-- | src/libserver/worker_util.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libserver/rspamd_control.c b/src/libserver/rspamd_control.c index 2670263f3..f1de1d29c 100644 --- a/src/libserver/rspamd_control.c +++ b/src/libserver/rspamd_control.c @@ -914,7 +914,7 @@ rspamd_srv_handler (EV_P_ ev_io *w, int revents) if (spair == NULL) { spair = g_malloc (sizeof (gint) * 2); - if (rspamd_socketpair (spair, 0) == -1) { + if (rspamd_socketpair (spair, cmd.cmd.spair.af) == -1) { rdata->rep.reply.spair.code = errno; msg_err ("cannot create socket pair: %s", strerror (errno)); } diff --git a/src/libserver/worker_util.c b/src/libserver/worker_util.c index 1c7069521..4c82cb330 100644 --- a/src/libserver/worker_util.c +++ b/src/libserver/worker_util.c @@ -1136,12 +1136,12 @@ rspamd_fork_worker (struct rspamd_main *rspamd_main, /* Starting worker process */ wrk = (struct rspamd_worker *) g_malloc0 (sizeof (struct rspamd_worker)); - if (!rspamd_socketpair (wrk->control_pipe, 0)) { + if (!rspamd_socketpair (wrk->control_pipe, SOCK_DGRAM)) { msg_err ("socketpair failure: %s", strerror (errno)); rspamd_hard_terminate (rspamd_main); } - if (!rspamd_socketpair (wrk->srv_pipe, 0)) { + if (!rspamd_socketpair (wrk->srv_pipe, SOCK_DGRAM)) { msg_err ("socketpair failure: %s", strerror (errno)); rspamd_hard_terminate (rspamd_main); } |