aboutsummaryrefslogtreecommitdiff
path: root/src/ctl.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-01-09 18:56:02 +0200
committerSergey Poznyakoff <gray@gnu.org>2016-01-09 18:56:02 +0200
commit8b112059a0a1295541b275957377aa41b445e42d (patch)
treec2741e113288fa0e56e5fc5f9cd5338a737ffc13 /src/ctl.c
parent3bac84965a1e1515ef1b1448ac559153a4e8ad25 (diff)
downloadpies-8b112059a0a1295541b275957377aa41b445e42d.tar.gz
pies-8b112059a0a1295541b275957377aa41b445e42d.tar.bz2
Minor improvements
* src/ctl.c (ctl_open): Return immediately if control.url is null. (fun_start): Start sleeping component. * src/meta1lex.h: Removed. * src/pies.c (config_parse): Move creation of the default control.url to main.
Diffstat (limited to 'src/ctl.c')
-rw-r--r--src/ctl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ctl.c b/src/ctl.c
index 22aecb8..11ec7b4 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -1252,6 +1252,9 @@ ctl_open (void)
{
int fd;
+ if (!control.url)
+ return 0;
+
fd = create_socket (control.url, SOCK_STREAM, NULL, 077);
if (fd == -1)
{
@@ -1877,6 +1880,13 @@ fun_start (struct json_value *result, struct prog *prog)
prog->v.p.status = status_enabled;
json_object_set_string (result, "status", "OK");
}
+ else if (prog->v.p.status == status_sleeping)
+ {
+ prog->v.p.status = status_enabled;
+ prog->v.p.failcount = 0;
+ prog->v.p.timestamp = 0;
+ json_object_set_string (result, "status", "OK");
+ }
else
{
json_object_set_string (result, "status", "ER");

Return to:

Send suggestions and report system problems to the System administrator.