dovecot-2.2: lib-settings: Support also "seconds" and "minutes" ...

dovecot at dovecot.org dovecot at dovecot.org
Wed May 29 12:44:27 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/f294d40a8978
changeset: 16416:f294d40a8978
user:      Timo Sirainen <tss at iki.fi>
date:      Wed May 29 12:44:15 2013 +0300
description:
lib-settings: Support also "seconds" and "minutes" (instead of just secs/mins)

diffstat:

 src/lib-settings/settings-parser.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 239e0e2098c1 -r f294d40a8978 src/lib-settings/settings-parser.c
--- a/src/lib-settings/settings-parser.c	Wed May 29 12:33:17 2013 +0300
+++ b/src/lib-settings/settings-parser.c	Wed May 29 12:44:15 2013 +0300
@@ -362,12 +362,14 @@
 	switch (i_toupper(*p)) {
 	case 'S':
 		multiply = 1;
-		if (strncasecmp(p, "secs", strlen(p)) == 0)
+		if (strncasecmp(p, "secs", strlen(p)) == 0 ||
+		    strncasecmp(p, "seconds", strlen(p)) == 0)
 			p = "";
 		break;
 	case 'M':
 		multiply = 60;
-		if (strncasecmp(p, "mins", strlen(p)) == 0)
+		if (strncasecmp(p, "mins", strlen(p)) == 0 ||
+		    strncasecmp(p, "minutes", strlen(p)) == 0)
 			p = "";
 		break;
 	case 'H':


More information about the dovecot-cvs mailing list