dovecot-2.0: dict client: If connect to server socket fails with...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Sep 21 17:00:02 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/c6783cbd0235
changeset: 12143:c6783cbd0235
user: Timo Sirainen <tss at iki.fi>
date: Tue Sep 21 14:59:59 2010 +0100
description:
dict client: If connect to server socket fails with EACCES, give better error message.
diffstat:
src/lib-dict/dict-client.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (26 lines):
diff -r 0c22286d5fc7 -r c6783cbd0235 src/lib-dict/dict-client.c
--- a/src/lib-dict/dict-client.c Tue Sep 21 14:55:33 2010 +0100
+++ b/src/lib-dict/dict-client.c Tue Sep 21 14:59:59 2010 +0100
@@ -6,6 +6,7 @@
#include "network.h"
#include "istream.h"
#include "ostream.h"
+#include "eacces-error.h"
#include "dict-private.h"
#include "dict-client.h"
@@ -408,7 +409,13 @@
dict->fd = net_connect_unix(dict->path);
if (dict->fd == -1) {
dict->last_failed_connect = ioloop_time;
- i_error("net_connect_unix(%s) failed: %m", dict->path);
+ if (errno == EACCES) {
+ i_fatal("%s", eacces_error_get("net_connect_unix",
+ dict->path));
+ } else {
+ i_fatal("net_connect_unix(%s) failed: %m",
+ dict->path);
+ }
return -1;
}
More information about the dovecot-cvs
mailing list