diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-11-09 21:05:38 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-11-09 21:05:38 +0300 |
commit | 161f4d012cb00bf40853a0bb59f22d1373dbff53 (patch) | |
tree | 49e5f5941760d871fc5229b235ac9dae2dce2034 /src/cfg_file.h | |
parent | 19857603612f664b37ac627aab2325a5497131ee (diff) | |
download | rspamd-161f4d012cb00bf40853a0bb59f22d1373dbff53.tar.gz rspamd-161f4d012cb00bf40853a0bb59f22d1373dbff53.zip |
* Avoid mmap'ing in binlog as mmapped areas must be aligned
* Make binlog working for writing
* Add config params for binlog
Diffstat (limited to 'src/cfg_file.h')
-rw-r--r-- | src/cfg_file.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/cfg_file.h b/src/cfg_file.h index f2cd97e23..43d424c70 100644 --- a/src/cfg_file.h +++ b/src/cfg_file.h @@ -129,6 +129,25 @@ struct statfile_autolearn_params { GList *symbols; /**< list of symbols */ }; +/** + * Sync affinity + */ +enum sync_affinity { + AFFINITY_NONE = 0, + AFFINITY_MASTER, + AFFINITY_SLAVE +}; + +/** + * Binlog params + */ +struct statfile_binlog_params { + enum sync_affinity affinity; + time_t rotate_time; + struct in_addr master_addr; + uint16_t master_port; +}; + /** * Statfile config definition */ @@ -138,6 +157,7 @@ struct statfile { size_t size; /**< size of statfile */ GList *sections; /**< list of sections in statfile */ struct statfile_autolearn_params *autolearn; /**< autolearn params */ + struct statfile_binlog_params *binlog; /**< binlog params */ }; /** @@ -256,6 +276,14 @@ struct config_file { int add_memcached_server (struct config_file *cf, char *str); /** + * Parse host:port line + * @param ina host address + * @param port port + * @return TRUE if string was parsed + */ +gboolean parse_host_port (const char *str, struct in_addr *ina, uint16_t *port); + +/** * Parse bind credits * @param cf config file to use * @param str line that presents bind line |