diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-04-03 02:17:33 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-04-03 02:17:33 +0200 |
commit | 89208e7de1c477c8a49b559b36c3177ab1ff5645 (patch) | |
tree | ccdc5aacc3e67cdec48a0bdb6b006b18a0975cc7 /src/peer.c | |
parent | 053e3f630a1a90fbb977db307b84e4bf7fb23a96 (diff) | |
download | fastd-89208e7de1c477c8a49b559b36c3177ab1ff5645.tar fastd-89208e7de1c477c8a49b559b36c3177ab1ff5645.zip |
Ignore peer configs with errors in peer dirs instead of exiting
Diffstat (limited to 'src/peer.c')
-rw-r--r-- | src/peer.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -93,6 +93,15 @@ fastd_peer_config* fastd_peer_config_new(fastd_context *ctx, fastd_config *conf) return peer; } +void fastd_peer_config_delete(fastd_context *ctx, fastd_config *conf) { + fastd_peer_config *peer = conf->peers, *next = peer->next; + + free(peer->name); + free(peer->key); + free(peer); + + conf->peers = next; +} void fastd_peer_reset(fastd_context *ctx, fastd_peer *peer) { pr_debug(ctx, "resetting peer %P", peer); |