summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/peer.c')
-rw-r--r--src/peer.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/peer.c b/src/peer.c
index fd123f7..5de7831 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -431,13 +431,9 @@ static void delete_peer(fastd_peer_t *peer) {
/** Allocates a new peer config */
-fastd_peer_config_t* fastd_peer_config_new(void) {
+fastd_peer_config_t* fastd_peer_config_new(fastd_peer_group_t *group) {
fastd_peer_config_t *peer = calloc(1, sizeof(fastd_peer_config_t));
-
- peer->group = conf.peer_group;
-
- peer->next = conf.peers;
- conf.peers = peer;
+ peer->group = group;
return peer;
}
@@ -458,13 +454,6 @@ void fastd_peer_config_free(fastd_peer_config_t *peer) {
free(peer);
}
-/** Deletes the peer config created last */
-void fastd_peer_config_delete(void) {
- fastd_peer_config_t *peer = conf.peers, *next = peer->next;
- fastd_peer_config_free(peer);
- conf.peers = next;
-}
-
/** Deletes a peer config, and removes the peer assiciated with the peer config */
void fastd_peer_config_purge(fastd_peer_config_t *config) {
size_t i;