dovecot-2.0-pigeonhole: Testsuite: fixed segfault problem.
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Tue Aug 3 04:10:32 EEST 2010
details: http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/3f718ad2060c
changeset: 1353:3f718ad2060c
user: Stephan Bosch <stephan at rename-it.nl>
date: Tue Aug 03 03:10:22 2010 +0200
description:
Testsuite: fixed segfault problem.
diffstat:
src/lib-sieve-tool/sieve-tool.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (23 lines):
diff -r 350f02ff8d83 -r 3f718ad2060c src/lib-sieve-tool/sieve-tool.c
--- a/src/lib-sieve-tool/sieve-tool.c Mon Aug 02 16:14:10 2010 +0200
+++ b/src/lib-sieve-tool/sieve-tool.c Tue Aug 03 03:10:22 2010 +0200
@@ -137,7 +137,8 @@
tool->sieve_extensions = i_strdup(optarg);
break;
case 'u':
- tool->username = i_strdup(optarg);
+ if ( tool->username == NULL )
+ tool->username = i_strdup(optarg);
break;
case 'P':
/* Plugin */
@@ -383,6 +384,9 @@
const char *sieve_tool_get_username
(struct sieve_tool *tool)
{
+ if ( tool->username == NULL )
+ return getenv("USER");
+
return tool->username;
}
More information about the dovecot-cvs
mailing list