diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-08-24 01:00:45 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-08-24 01:00:45 +0200 |
commit | a04bcf247f4be7e3da4fe3895200f0b9709fc0bb (patch) | |
tree | 5e749b81799bb82a751ed632d91b801abe624008 /src/config.h | |
parent | ad4999488eadac3a10de99caf50b732af8b771b9 (diff) | |
download | fastd-a04bcf247f4be7e3da4fe3895200f0b9709fc0bb.tar fastd-a04bcf247f4be7e3da4fe3895200f0b9709fc0bb.zip |
Merge peer config into peer structure
With this refactoring, the structure fastd_peer_config_t is merged into
fastd_peer_t, and fastd_remote_config_t into fastd_remote_t. This also means we
now create peers directly when reading their configurations, which significantly
simplifies the whole reload process, and prepares for some future optimizations
like a key hash table.
Note: This commit is too big, but I couldn't come up with a nice way to split it
into smaller pieces...
Diffstat (limited to 'src/config.h')
-rw-r--r-- | src/config.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config.h b/src/config.h index f4e1de5..b076266 100644 --- a/src/config.h +++ b/src/config.h @@ -38,7 +38,7 @@ /** State of the config parser */ struct fastd_parser_state { fastd_peer_group_t *peer_group; /**< The current peer group */ - fastd_peer_config_t *peer; /**< The peer currently being loaded */ + fastd_peer_t *peer; /**< The peer currently being loaded */ const char *const filename; /**< The filename of the currently parsed file */ const int depth; /**< The include depth */ @@ -54,7 +54,7 @@ void fastd_config_release(void); void fastd_config_handle_options(int argc, char *const argv[]); void fastd_config_verify(void); -bool fastd_config_read(const char *filename, fastd_peer_group_t *peer_group, fastd_peer_config_t *peer_config, int depth); +bool fastd_config_read(const char *filename, fastd_peer_group_t *peer_group, fastd_peer_t *peer, int depth); void fastd_config_peer_group_push(fastd_parser_state_t *state, const char *name); void fastd_config_peer_group_pop(fastd_parser_state_t *state); void fastd_config_add_peer_dir(fastd_peer_group_t *group, const char *dir); |