mirror of
https://github.com/troglobit/finit.git
synced 2026-11-10 16:31:21 +00:00
Merge pull request #220 from liuming50/fix-a-regression
service.c: fix a regression
This commit is contained in:
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -292,7 +292,7 @@ static int dump_one_cond(const char *fpath, const struct stat *sb, int tflag, st
|
|||||||
if (strncmp("pid/", cond, 4) == 0) {
|
if (strncmp("pid/", cond, 4) == 0) {
|
||||||
svc_t *svc;
|
svc_t *svc;
|
||||||
|
|
||||||
svc= client_svc_find_by_cond(cond);
|
svc = client_svc_find_by_cond(cond);
|
||||||
if (!svc) {
|
if (!svc) {
|
||||||
nm = "unknown";
|
nm = "unknown";
|
||||||
pid = 0;
|
pid = 0;
|
||||||
|
|||||||
+1
-1
@@ -1709,7 +1709,7 @@ static void svc_set_state(svc_t *svc, svc_state_t new)
|
|||||||
if (svc_is_runtask(svc)) {
|
if (svc_is_runtask(svc)) {
|
||||||
char cond[MAX_COND_LEN];
|
char cond[MAX_COND_LEN];
|
||||||
|
|
||||||
snprintf(cond, sizeof(cond), "%s/%s/done", svc->type, svc->name);
|
snprintf(cond, sizeof(cond), "%s/%s/done", svc_typestr(svc), svc->name);
|
||||||
|
|
||||||
/* create done condition when entering SVC_DONE_STATE. */
|
/* create done condition when entering SVC_DONE_STATE. */
|
||||||
if (*state == SVC_DONE_STATE)
|
if (*state == SVC_DONE_STATE)
|
||||||
|
|||||||
Reference in new issue
Block a user