]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dict: Previous changes caused it to fail with "Socket already exists".
authorTimo Sirainen <tss@iki.fi>
Sun, 5 Oct 2008 11:03:35 +0000 (14:03 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 5 Oct 2008 11:03:35 +0000 (14:03 +0300)
--HG--
branch : HEAD

src/dict/dict-server.c

index 2ac889fc85ec828ee5c1b051e74f0a5e4142e877..81391564e7fabbde29bb2c24d9b45d643ffe9e1f 100644 (file)
@@ -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);