summaryrefslogtreecommitdiffabout
path: root/src/ctl.c
authorSergey Poznyakoff <gray@gnu.org.ua>2016-02-24 11:29:15 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2016-02-24 11:32:57 (GMT)
commit9912557fa9b4c8596c6e9f69857e9a616b4f4f33 (patch) (unidiff)
tree348bcb58c3af3c5138abe6e3bdfda5232fc1e54c /src/ctl.c
parent4049c8b3ba918949106ef8e96ac5e767f4b9406b (diff)
downloadpies-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') (more/less context) (ignore whitespace changes)
-rw-r--r--src/ctl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ctl.c b/src/ctl.c
index 21abf59..a7db410 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -1834,15 +1834,15 @@ selector (struct prog *prog, void *data)
1834static int 1834static int
1835prog_active (struct prog *prog) 1835prog_active (struct prog *prog)
1836{ 1836{
1837 if (prog->v.p.active) 1837 if (prog->active)
1838 { 1838 {
1839 if (ISCF_TCPMUX (prog->v.p.comp->flags)) 1839 if (ISCF_TCPMUX (prog->v.p.comp->flags))
1840 { 1840 {
1841 prog = progman_locate (prog->v.p.comp->tcpmux); 1841 prog = progman_locate (prog->v.p.comp->tcpmux);
1842 return prog && prog->v.p.active; 1842 return prog && prog->active;
1843 } 1843 }
1844 } 1844 }
1845 return prog->v.p.active; 1845 return prog->active;
1846} 1846}
1847 1847
1848static struct json_value * 1848static struct json_value *
@@ -1912,14 +1912,14 @@ fun_stop (struct json_value *result, struct prog *prog)
1912{ 1912{
1913 if (IS_COMPONENT (prog)) 1913 if (IS_COMPONENT (prog))
1914 { 1914 {
1915 if (!prog->v.p.active) 1915 if (!prog->active)
1916 { 1916 {
1917 json_object_set_string (result, "status", "ER"); 1917 json_object_set_string (result, "status", "ER");
1918 json_object_set_string (result, "error_message", "already stopped"); 1918 json_object_set_string (result, "error_message", "already stopped");
1919 return 1; 1919 return 1;
1920 } 1920 }
1921 1921
1922 prog->v.p.active = 0; 1922 prog->active = 0;
1923 progman_stop_component (&prog); 1923 progman_stop_component (&prog);
1924 json_object_set_string (result, "status", "OK"); 1924 json_object_set_string (result, "status", "OK");
1925 } 1925 }
@@ -1972,7 +1972,7 @@ fun_start (struct json_value *result, struct prog *prog)
1972 json_object_set_string (result, "error_message", "already running"); 1972 json_object_set_string (result, "error_message", "already running");
1973 return 1; 1973 return 1;
1974 } 1974 }
1975 prog->v.p.active = 1; 1975 prog->active = 1;
1976 return 0; 1976 return 0;
1977} 1977}
1978 1978

Return to:

Send suggestions and report system problems to the System administrator.