diff options
Diffstat (limited to 'src/ctl.c')
-rw-r--r-- | src/ctl.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1866,8 +1866,9 @@ fun_stop (struct json_value *result, struct prog *prog) | |||
1866 | } | 1866 | } |
1867 | else | 1867 | else |
1868 | { | 1868 | { |
1869 | progman_stop_component (prog); | 1869 | progman_stop_component (&prog); |
1870 | prog->v.p.comp->flags |= CF_DISABLED; | 1870 | if (prog) |
1871 | prog->v.p.comp->flags |= CF_DISABLED; | ||
1871 | json_object_set_string (result, "status", "OK"); | 1872 | json_object_set_string (result, "status", "OK"); |
1872 | } | 1873 | } |
1873 | return 0; | 1874 | return 0; |
@@ -1903,7 +1904,7 @@ fun_start (struct json_value *result, struct prog *prog) | |||
1903 | static int | 1904 | static int |
1904 | fun_restart (struct json_value *result, struct prog *prog) | 1905 | fun_restart (struct json_value *result, struct prog *prog) |
1905 | { | 1906 | { |
1906 | progman_stop_component (prog); | 1907 | progman_stop_component (&prog); |
1907 | json_object_set_string (result, "status", "OK"); | 1908 | json_object_set_string (result, "status", "OK"); |
1908 | return 0; | 1909 | return 0; |
1909 | } | 1910 | } |