From: Vsevolod Stakhov Date: Mon, 3 Jun 2013 16:08:04 +0000 (+0100) Subject: Correctly use ai_family for socket(2) call. X-Git-Tag: 0.5.5~10 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5e1cff52d87522e66b7915a89e769ae0149eddd3;p=rspamd.git Correctly use ai_family for socket(2) call. --- diff --git a/src/util.c b/src/util.c index 4a8f1aa05..56f6c5f26 100644 --- a/src/util.c +++ b/src/util.c @@ -95,7 +95,7 @@ make_inet_socket (gint type, struct addrinfo *addr, gboolean is_server, gboolean cur = addr; while (cur) { /* Create socket */ - fd = socket (cur->ai_protocol, type, 0); + fd = socket (cur->ai_family, type, 0); if (fd == -1) { msg_warn ("socket failed: %d, '%s'", errno, strerror (errno)); goto out;