aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cfg_file.h2
-rw-r--r--src/cfg_utils.c2
-rw-r--r--src/cfg_xml.c6
-rw-r--r--src/greylist_storage.c4
-rw-r--r--src/plugins/fuzzy_check.c2
-rw-r--r--src/plugins/spf.c2
-rw-r--r--src/plugins/surbl.c6
7 files changed, 12 insertions, 12 deletions
diff --git a/src/cfg_file.h b/src/cfg_file.h
index 184a1aa16..797f32837 100644
--- a/src/cfg_file.h
+++ b/src/cfg_file.h
@@ -386,7 +386,7 @@ gsize parse_limit (const gchar *limit, guint len);
* @param default_type dimension of time if no suffix is specified
* @return value of time in milliseconds
*/
-guint parse_time (const gchar *t, enum time_type default_type);
+guint cfg_parse_time (const gchar *t, enum time_type default_type);
/**
* Parse flag
diff --git a/src/cfg_utils.c b/src/cfg_utils.c
index 48e95cf59..f4c708b83 100644
--- a/src/cfg_utils.c
+++ b/src/cfg_utils.c
@@ -304,7 +304,7 @@ parse_limit (const gchar *limit, guint len)
}
guint
-parse_time (const gchar *t, enum time_type default_type)
+cfg_parse_time (const gchar *t, enum time_type default_type)
{
union {
guint i;
diff --git a/src/cfg_xml.c b/src/cfg_xml.c
index ef47ec0bf..3709b496a 100644
--- a/src/cfg_xml.c
+++ b/src/cfg_xml.c
@@ -1441,7 +1441,7 @@ handle_statfile_binlog_rotate (struct config_file *cfg, struct rspamd_xml_userda
if (st->binlog == NULL) {
st->binlog = memory_pool_alloc0 (cfg->cfg_pool, sizeof (struct statfile_binlog_params));
}
- st->binlog->rotate_time = parse_time (data, TIME_SECONDS);
+ st->binlog->rotate_time = cfg_parse_time (data, TIME_SECONDS);
return TRUE;
}
@@ -1537,7 +1537,7 @@ xml_handle_seconds (struct config_file *cfg, struct rspamd_xml_userdata *ctx, GH
guint32 *dest;
dest = (guint32 *)G_STRUCT_MEMBER_P (dest_struct, offset);
- *dest = parse_time (data, TIME_SECONDS);
+ *dest = cfg_parse_time (data, TIME_SECONDS);
return TRUE;
}
@@ -2153,7 +2153,7 @@ check_module_option (const gchar *mname, const gchar *optname, const gchar *data
}
break;
case MODULE_OPT_TYPE_TIME:
- (void)parse_time (data, TIME_SECONDS);
+ (void)cfg_parse_time (data, TIME_SECONDS);
if (errno != 0) {
msg_warn ("non-numeric data for option: '%s' for module: '%s': %s", optname, mname, strerror (errno));
return FALSE;
diff --git a/src/greylist_storage.c b/src/greylist_storage.c
index ec26ae27e..42e94320b 100644
--- a/src/greylist_storage.c
+++ b/src/greylist_storage.c
@@ -302,10 +302,10 @@ config_greylist_worker (struct rspamd_worker *worker)
ctx->expire_time = DEFAULT_EXPIRE_TIME;
if ((value = g_hash_table_lookup (worker->cf->params, "greylist_time")) != NULL) {
- ctx->greylist_time = parse_time (value, TIME_SECONDS) / 1000;
+ ctx->greylist_time = cfg_parse_time (value, TIME_SECONDS) / 1000;
}
if ((value = g_hash_table_lookup (worker->cf->params, "expire_time")) != NULL) {
- ctx->expire_time = parse_time (value, TIME_SECONDS) / 1000;
+ ctx->expire_time = cfg_parse_time (value, TIME_SECONDS) / 1000;
}
worker->ctx = ctx;
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index 622d169fa..f330e7ecd 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -395,7 +395,7 @@ fuzzy_check_module_config (struct config_file *cfg)
fuzzy_module_ctx->min_width = 0;
}
if ((value = get_module_opt (cfg, "fuzzy_check", "timeout")) != NULL) {
- fuzzy_module_ctx->io_timeout = parse_time (value, TIME_SECONDS);
+ fuzzy_module_ctx->io_timeout = cfg_parse_time (value, TIME_SECONDS);
}
else {
fuzzy_module_ctx->io_timeout = DEFAULT_IO_TIMEOUT;
diff --git a/src/plugins/spf.c b/src/plugins/spf.c
index 4372f94b9..e9b1531ac 100644
--- a/src/plugins/spf.c
+++ b/src/plugins/spf.c
@@ -120,7 +120,7 @@ spf_module_config (struct config_file *cfg)
cache_size = DEFAULT_CACHE_SIZE;
}
if ((value = get_module_opt (cfg, "spf", "spf_cache_expire")) != NULL) {
- cache_expire = parse_time (value, TIME_SECONDS) / 1000;
+ cache_expire = cfg_parse_time (value, TIME_SECONDS) / 1000;
}
else {
cache_expire = DEFAULT_CACHE_MAXAGE;
diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c
index 3c4a0e53f..b848d2a30 100644
--- a/src/plugins/surbl.c
+++ b/src/plugins/surbl.c
@@ -333,19 +333,19 @@ surbl_module_config (struct config_file *cfg)
surbl_module_ctx->weight = DEFAULT_SURBL_WEIGHT;
}
if ((value = get_module_opt (cfg, "surbl", "url_expire")) != NULL) {
- surbl_module_ctx->url_expire = parse_time (value, TIME_SECONDS) / 1000;
+ surbl_module_ctx->url_expire = cfg_parse_time (value, TIME_SECONDS) / 1000;
}
else {
surbl_module_ctx->url_expire = DEFAULT_SURBL_URL_EXPIRE;
}
if ((value = get_module_opt (cfg, "surbl", "redirector_connect_timeout")) != NULL) {
- surbl_module_ctx->connect_timeout = parse_time (value, TIME_SECONDS);
+ surbl_module_ctx->connect_timeout = cfg_parse_time (value, TIME_SECONDS);
}
else {
surbl_module_ctx->connect_timeout = DEFAULT_REDIRECTOR_CONNECT_TIMEOUT;
}
if ((value = get_module_opt (cfg, "surbl", "redirector_read_timeout")) != NULL) {
- surbl_module_ctx->read_timeout = parse_time (value, TIME_SECONDS);
+ surbl_module_ctx->read_timeout = cfg_parse_time (value, TIME_SECONDS);
}
else {
surbl_module_ctx->read_timeout = DEFAULT_REDIRECTOR_READ_TIMEOUT;