diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-02-24 13:29:15 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-02-24 13:32:57 +0200 |
commit | 9912557fa9b4c8596c6e9f69857e9a616b4f4f33 (patch) | |
tree | 348bcb58c3af3c5138abe6e3bdfda5232fc1e54c /src/ctl.c | |
parent | 4049c8b3ba918949106ef8e96ac5e767f4b9406b (diff) | |
download | pies-9912557fa9b4c8596c6e9f69857e9a616b4f4f33.tar.gz pies-9912557fa9b4c8596c6e9f69857e9a616b4f4f33.tar.bz2 |
Changes in prog structure
* src/prog.h (prog): Remove .facility. Use facility from
the component.
(active,wait,stop): Move from union into the main struct.
All uses changed.
Diffstat (limited to 'src/ctl.c')
-rw-r--r-- | src/ctl.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1831,21 +1831,21 @@ selector (struct prog *prog, void *data) the state of the master listener. FIXME: Ideally all TCPMUXen must form a list attached to their master listener. When this is fixed, this function will disappear. */ static int prog_active (struct prog *prog) { - if (prog->v.p.active) + if (prog->active) { if (ISCF_TCPMUX (prog->v.p.comp->flags)) { prog = progman_locate (prog->v.p.comp->tcpmux); - return prog && prog->v.p.active; + return prog && prog->active; } } - return prog->v.p.active; + return prog->active; } static struct json_value * prog_serialize (struct json_value *ret, struct prog *prog) { struct json_value *v; @@ -1909,20 +1909,20 @@ fun_list (struct json_value *result, struct prog *prog) static int fun_stop (struct json_value *result, struct prog *prog) { if (IS_COMPONENT (prog)) { - if (!prog->v.p.active) + if (!prog->active) { json_object_set_string (result, "status", "ER"); json_object_set_string (result, "error_message", "already stopped"); return 1; } - prog->v.p.active = 0; + prog->active = 0; progman_stop_component (&prog); json_object_set_string (result, "status", "OK"); } else { //FIXME progman_stop_component (&prog); @@ -1969,13 +1969,13 @@ fun_start (struct json_value *result, struct prog *prog) default: json_object_set_string (result, "status", "ER"); json_object_set_string (result, "error_message", "already running"); return 1; } - prog->v.p.active = 1; + prog->active = 1; return 0; } static int fun_restart (struct json_value *result, struct prog *prog) { |