aboutsummaryrefslogtreecommitdiff
path: root/lib/src/del_srv_list.c
blob: 916fcb2543d27fc8a4c222842005e3046e29a294 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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);
		}
	}
}