diff --git a/src/api.c b/src/api.c index 08b60ac7..1eeaa2c4 100644 --- a/src/api.c +++ b/src/api.c @@ -352,8 +352,8 @@ static void api_cb(uev_t *w, void *arg, int events) if (wdog) { logit(LOG_NOTICE, "Stopping and removing %s (PID:%d)", wdog->cmd, wdog->pid); stop(wdog); - if (wdog->protected) { - wdog->protected = 0; + if (wdog->protect) { + wdog->protect = 0; wdog->runlevels = 0; } } diff --git a/src/client.c b/src/client.c index d5fec8cf..95f0d668 100644 --- a/src/client.c +++ b/src/client.c @@ -125,7 +125,7 @@ error: return NULL; } -svc_t *client_svc_find(char *arg) +svc_t *client_svc_find(const char *arg) { int sd = -1; struct init_request rq = { diff --git a/src/client.h b/src/client.h index b56c7b2b..42443132 100644 --- a/src/client.h +++ b/src/client.h @@ -32,6 +32,6 @@ int client_disconnect (void); int client_send (struct init_request *rq, ssize_t len); svc_t *client_svc_iterator (int first); -svc_t *client_svc_find (char *arg); +svc_t *client_svc_find (const char *arg); #endif /* FINIT_CLIENT_H_ */ diff --git a/src/service.c b/src/service.c index 0c620255..3bf634a4 100644 --- a/src/service.c +++ b/src/service.c @@ -909,7 +909,7 @@ recreate: svc_mark_clean(svc); if (!file) - svc->protected = 1; + svc->protect = 1; /* Free duped line, from above */ free(line); diff --git a/src/svc.c b/src/svc.c index 96eed7fc..5a9c4cd5 100644 --- a/src/svc.c +++ b/src/svc.c @@ -402,7 +402,7 @@ void svc_mark_dynamic(void) svc_t *svc, *iter = NULL; for (svc = svc_iterator(&iter, 1); svc; svc = svc_iterator(&iter, 0)) { - if (svc->protected) + if (svc->protect) continue; if (svc_is_inetd_conn(svc)) continue; diff --git a/src/svc.h b/src/svc.h index b493e827..453dea67 100644 --- a/src/svc.h +++ b/src/svc.h @@ -97,7 +97,7 @@ typedef struct svc { long start_time; /* Start time, as seconds since boot, from sysinfo() */ const svc_state_t state; /* Paused, Reloading, Restart, Running, ... */ svc_type_t type; /* Service, run, task, inetd, ... */ - int protected; /* Services like dbus-daemon & udev by Finit */ + int protect; /* Services like dbus-daemon & udev by Finit */ const int dirty; /* -1: removal, 0: unmodified, 1: modified */ int starting; /* ... waiting for pidfile to be re-asserted */ int runlevels;