summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-04-03 02:17:33 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-04-03 02:17:33 +0200
commit89208e7de1c477c8a49b559b36c3177ab1ff5645 (patch)
treeccdc5aacc3e67cdec48a0bdb6b006b18a0975cc7 /src/peer.c
parent053e3f630a1a90fbb977db307b84e4bf7fb23a96 (diff)
downloadfastd-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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/peer.c b/src/peer.c
index c88152d..92e6aa5 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -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);