From: Timo Sirainen Date: Sun, 5 Oct 2008 11:03:35 +0000 (+0300) Subject: dict: Previous changes caused it to fail with "Socket already exists". X-Git-Tag: 1.2.alpha2~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1927db6ee58e9c7c1c195b87342764f94a97b466;p=thirdparty%2Fdovecot%2Fcore.git dict: Previous changes caused it to fail with "Socket already exists". --HG-- branch : HEAD --- diff --git a/src/dict/dict-server.c b/src/dict/dict-server.c index 2ac889fc85..81391564e7 100644 --- a/src/dict/dict-server.c +++ b/src/dict/dict-server.c @@ -524,9 +524,8 @@ struct dict_server *dict_server_init(const char *path, int fd) server = i_new(struct dict_server, 1); server->path = i_strdup(path); - server->fd = fd; - - server->fd = net_listen_unix_unlink_stale(path, 64); + server->fd = fd != -1 ? fd : + net_listen_unix_unlink_stale(path, 64); if (server->fd == -1) { if (errno == EADDRINUSE) i_fatal("Socket already exists: %s", path);