dovecot-2.0: lib-master: Fixed getopt_string containing "+" GNU ...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Oct 23 03:53:34 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/ef1ca7e1a9f9
changeset: 10147:ef1ca7e1a9f9
user: Timo Sirainen <tss at iki.fi>
date: Thu Oct 22 20:53:27 2009 -0400
description:
lib-master: Fixed getopt_string containing "+" GNU extension.
diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
src/lib-master/master-service.c | 6 ++++--
diffs (16 lines):
diff -r b8df77326978 -r ef1ca7e1a9f9 src/lib-master/master-service.c
--- a/src/lib-master/master-service.c Thu Oct 22 20:32:55 2009 -0400
+++ b/src/lib-master/master-service.c Thu Oct 22 20:53:27 2009 -0400
@@ -114,8 +114,10 @@ master_service_init(const char *name, en
service->argc = *argc;
service->argv = *argv;
service->name = i_strdup(name);
- service->getopt_str =
- i_strconcat(master_service_getopt_string(), getopt_str, NULL);
+ /* keep getopt_str first in case it contains "+" */
+ service->getopt_str = getopt_str == NULL ?
+ i_strdup(master_service_getopt_string()) :
+ i_strconcat(getopt_str, master_service_getopt_string(), NULL);
service->flags = flags;
service->ioloop = io_loop_create();
service->service_count_left = (unsigned int)-1;
More information about the dovecot-cvs
mailing list