aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-07-23 15:17:31 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-07-23 15:17:31 +0100
commit2c8ed95980462b03fb3ca0ae7721357952d7361b (patch)
tree504219e0af7c9d7902da21e318585fdb9f866ac9 /src/util.c
parentf59c88c67b8a546e5067a7f979c09f683097658b (diff)
downloadrspamd-2c8ed95980462b03fb3ca0ae7721357952d7361b.tar.gz
rspamd-2c8ed95980462b03fb3ca0ae7721357952d7361b.zip
Fix a problem with listening on sockets.
Add stat_reset command to rspamc while I'm here.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 4936b37dc..ce95e6c9e 100644
--- a/src/util.c
+++ b/src/util.c
@@ -152,6 +152,8 @@ make_inet_socket (gint type, struct addrinfo *addr, gboolean is_server, gboolean
}
else if (fd != -1) {
*list = g_list_prepend (*list, GINT_TO_POINTER (fd));
+ cur = cur->ai_next;
+ continue;
}
out:
if (fd != -1) {
@@ -470,6 +472,7 @@ err:
if (fd != -1) {
close (fd);
}
+ rcur = g_list_next (rcur);
}
if (result != NULL) {
g_list_free (result);