diff options
author | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-02-25 14:33:19 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-03-24 17:04:20 +0100 |
commit | 9a88f7da453eadc72d8f333700dbd80777feecd1 (patch) | |
tree | 8a096e37123ece1d20bcb4d0ae8e064bdd39747a /lib/src/del_srv_list.c |
Initial commit
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'lib/src/del_srv_list.c')
-rw-r--r-- | lib/src/del_srv_list.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/src/del_srv_list.c b/lib/src/del_srv_list.c new file mode 100644 index 0000000..916fcb2 --- /dev/null +++ b/lib/src/del_srv_list.c @@ -0,0 +1,18 @@ +#include <stdlib.h> + +#include "service.h" + +void del_srv_list(service_list_t *list) +{ + service_t *srv; + int i; + + for (i = 0; i < TGT_MAX; ++i) { + while (list->targets[i] != NULL) { + srv = list->targets[i]; + list->targets[i] = srv->next; + + delsrv(srv); + } + } +} |