aboutsummaryrefslogtreecommitdiff
path: root/src/ctl.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-01-04 12:36:05 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2016-01-04 12:54:29 +0200
commit2782ae034e51d5e9c74a9b1f2c6e6c452bd83243 (patch)
treea79664c1090d35c899eb867e1b749630cc455b00 /src/ctl.c
parent5c7f75146266ece25a47dc8df898ac1e1629f51d (diff)
downloadpies-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ctl.c b/src/ctl.c
index f7e46d0..676f93b 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -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

Return to:

Send suggestions and report system problems to the System administrator.