diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-01-04 12:36:05 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-01-04 12:54:29 +0200 |
commit | 2782ae034e51d5e9c74a9b1f2c6e6c452bd83243 (patch) | |
tree | a79664c1090d35c899eb867e1b749630cc455b00 /src/ctl.c | |
parent | 5c7f75146266ece25a47dc8df898ac1e1629f51d (diff) | |
download | pies-2782ae034e51d5e9c74a9b1f2c6e6c452bd83243.tar.gz pies-2782ae034e51d5e9c74a9b1f2c6e6c452bd83243.tar.bz2 |
Minor fixes
* src/ctl.c: Start textual descriptions with capital letters.
* src/piesctl-cl.opt: Fix typos.
* src/piesctl.c (shttp_process): Fix error handling.
(shttp_fatal): Select exit code depending on the HTTP response code.
Diffstat (limited to 'src/ctl.c')
-rw-r--r-- | src/ctl.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1715,7 +1715,7 @@ static void component_stop (struct ctlio *io, struct prog *prog) { if (prog->v.p.comp->flags & CF_DISABLED) - ctlio_reply (io, 409, "already stopped"); + ctlio_reply (io, 409, "Already stopped"); else { progman_stop_component (prog); @@ -1727,15 +1727,15 @@ component_stop (struct ctlio *io, struct prog *prog) static void component_start (struct ctlio *io, struct prog *prog) { - if (!(prog->v.p.comp->flags & CF_DISABLED)) - ctlio_reply (io, 409, "already running"); - else + if (prog->v.p.comp->flags & CF_DISABLED) { prog->v.p.comp->flags &= ~CF_DISABLED; prog->v.p.status = status_enabled; kill (getpid (), SIGALRM); ctlio_reply (io, 200, "Component started"); } + else + ctlio_reply (io, 409, "Already running"); } static void |