diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-04-03 23:07:55 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-04-03 23:07:55 +0200 |
commit | cbf0166a7f12f71747c495b5ea68ff676c1a7868 (patch) | |
tree | 788384915d35c2cf504f9ee3668b692c9ddf2cef /src | |
parent | 320e76e0deb763f2d5cff8eed39d844619e46cc2 (diff) | |
download | fastd-cbf0166a7f12f71747c495b5ea68ff676c1a7868.tar fastd-cbf0166a7f12f71747c495b5ea68ff676c1a7868.zip |
Save absolute path in peer configs from peer dirs
Diffstat (limited to 'src')
-rw-r--r-- | src/config.c | 2 | ||||
-rw-r--r-- | src/peer.c | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/config.c b/src/config.c index aa10b10..c708609 100644 --- a/src/config.c +++ b/src/config.c @@ -137,7 +137,7 @@ void fastd_read_config_dir(fastd_context *ctx, fastd_config *conf, const char *d fastd_peer_config_new(ctx, conf); conf->peers->name = strdup(result->d_name); - conf->peers->config_source_dir = strdup(dir); + conf->peers->config_source_dir = conf->peer_dirs->str; if (!fastd_read_config(ctx, conf, result->d_name, true, depth)) { pr_warn(ctx, "peer config `%s' will be ignored", result->d_name); @@ -98,7 +98,6 @@ fastd_peer_config* fastd_peer_config_new(fastd_context *ctx, fastd_config *conf) void fastd_peer_config_delete(fastd_context *ctx, fastd_config *conf) { fastd_peer_config *peer = conf->peers, *next = peer->next; - free(peer->config_source_dir); free(peer->name); free(peer->key); free(peer); |