diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-12-08 18:03:51 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-12-08 18:03:51 +0300 |
commit | 55ec0f5776109efcd191c1a91e5107ca52a41c83 (patch) | |
tree | 72a438c865a543fdf9167cb0582e3eb615107ee0 /src/cfg_file.h | |
parent | 618e3f4887b61c69915f1c641ea47044695d6e7f (diff) | |
download | rspamd-55ec0f5776109efcd191c1a91e5107ca52a41c83.tar.gz rspamd-55ec0f5776109efcd191c1a91e5107ca52a41c83.zip |
Add module options checker
Improve time limits handling
Fix smtp proxy options parsing
Diffstat (limited to 'src/cfg_file.h')
-rw-r--r-- | src/cfg_file.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/cfg_file.h b/src/cfg_file.h index 9045d3a7a..2595cc779 100644 --- a/src/cfg_file.h +++ b/src/cfg_file.h @@ -43,6 +43,15 @@ struct classifier; enum { VAL_UNDEF=0, VAL_TRUE, VAL_FALSE }; /** + * Type of time configuration parameter + */ +enum time_type { + TIME_SECONDS = 0, + TIME_MILLISECONDS, + TIME_MINUTES, + TIME_HOURS +}; +/** * Types of rspamd bind lines */ enum rspamd_cred_type { @@ -357,11 +366,12 @@ gchar* get_module_opt (struct config_file *cfg, gchar *module_name, gchar *opt_n gsize parse_limit (const gchar *limit); /** - * Parse seconds + * Parse time * @param t string representation of seconds (eg. 1D) - * @return numeric value of string + * @param default_type dimension of time if no suffix is specified + * @return value of time in milliseconds */ -guint parse_seconds (const gchar *t); +guint parse_time (const gchar *t, enum time_type default_type); /** * Parse flag |