summaryrefslogtreecommitdiffstats
path: root/src/cfg_utils.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-07-28 20:09:50 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-07-28 20:09:50 +0400
commitb92225677f444858c81b9bd4900d5ddcf9eb801a (patch)
tree833cb69b4a62948636e20ddc5808a2913fd0bd19 /src/cfg_utils.c
parent188018fe88416dbe918402a650da4153066d1658 (diff)
downloadrspamd-b92225677f444858c81b9bd4900d5ddcf9eb801a.tar.gz
rspamd-b92225677f444858c81b9bd4900d5ddcf9eb801a.zip
* Add client part for fuzzy checksums storage
* Add fuzzy storage syncing to file
Diffstat (limited to 'src/cfg_utils.c')
-rw-r--r--src/cfg_utils.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/cfg_utils.c b/src/cfg_utils.c
index 6b095e6d8..21092356f 100644
--- a/src/cfg_utils.c
+++ b/src/cfg_utils.c
@@ -278,6 +278,21 @@ parse_seconds (const char *t)
if (*err_str == 's' || *err_str == 'S') {
result *= 1000;
}
+ /* Minutes */
+ else if (*err_str == 'm' || *err_str == 'M') {
+ /* Handle ms correctly */
+ if (*(err_str + 1) == 's' || *(err_str + 1) == 'S') {
+ result *= 60 * 1000;
+ }
+ }
+ /* Hours */
+ else if (*err_str == 'h' || *err_str == 'H') {
+ result *= 60 * 60 * 1000;
+ }
+ /* Days */
+ else if (*err_str == 'd' || *err_str == 'D') {
+ result *= 24 * 60 * 60 * 1000;
+ }
}
return result;