summaryrefslogtreecommitdiffabout
path: root/src/ctl.c
Side-by-side diff
Diffstat (limited to 'src/ctl.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/ctl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ctl.c b/src/ctl.c
index 489fc7f..bc2f78d 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -1866,8 +1866,9 @@ fun_stop (struct json_value *result, struct prog *prog)
}
else
{
- progman_stop_component (prog);
- prog->v.p.comp->flags |= CF_DISABLED;
+ progman_stop_component (&prog);
+ if (prog)
+ prog->v.p.comp->flags |= CF_DISABLED;
json_object_set_string (result, "status", "OK");
}
return 0;
@@ -1903,7 +1904,7 @@ fun_start (struct json_value *result, struct prog *prog)
static int
fun_restart (struct json_value *result, struct prog *prog)
{
- progman_stop_component (prog);
+ progman_stop_component (&prog);
json_object_set_string (result, "status", "OK");
return 0;
}

Return to:

Send suggestions and report system problems to the System administrator.