summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
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);