ENDIF(GMIME24)
IF(ENABLE_STATIC MATCHES "ON")
TARGET_LINK_LIBRARIES(rspamd ${PCRE_LIBRARIES})
- TARGET_LINK_LIBRARIES(rspamd ffi)
ENDIF(ENABLE_STATIC MATCHES "ON")
IF(ENABLE_LUAJIT MATCHES "ON")
* @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
}
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;
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;
}
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;
}
}
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;
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;
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;
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;
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;