Refactor, change from static array of svc_t to linked list

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2017-12-18 17:50:02 +01:00
1 parent d7401b2a96
commit 0f1f51b5ad
7 files changed
+103 -164

No files matched your search

+1 -2
View File
@@ -95,14 +95,13 @@ static void pidfile_callback(void *arg, int fd, int events)
static void pidfile_reconf(void *arg)
{
static char cond[MAX_COND_LEN];
int pos;
svc_t *svc;
int restart = 0;
do {
restart = 0;
for (svc = svc_iterator1(&pos, 1); svc; svc = svc_iterator1(&pos, 0)) {
for (svc = svc_iterator(NULL); svc; svc = svc_iterator(svc)) {
mkcond(cond, sizeof(cond), svc->cmd);
if (svc->state == SVC_RUNNING_STATE &&
!svc_is_changed(svc) &&