summaryrefslogtreecommitdiff
path: root/lib/src/del_srv_list.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src/del_srv_list.c')
-rw-r--r--lib/src/del_srv_list.c18
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);
+ }
+ }
+}