diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2016-03-19 14:55:11 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2016-03-19 14:55:11 +0200 |
commit | 60b43ae490f52a783a34c8d77baaa695f7c32f01 (patch) | |
tree | dc12766e17c42d9c1cef991c5aee04970ea12801 | |
parent | 238924457849e53eae3771bc6240883b37e1ff34 (diff) | |
download | pies-60b43ae490f52a783a34c8d77baaa695f7c32f01.tar.gz pies-60b43ae490f52a783a34c8d77baaa695f7c32f01.tar.bz2 |
Bugfixes
* src/pies.c (main): Issue the start-up message after eventual changing
to background and the corresponding reconfiguration of diagnostic output
channel.
* src/piesctl.c (parse_condition_to_uri, com_id): Fix checking for arguments.
-rw-r--r-- | src/pies.c | 4 | ||||
-rw-r--r-- | src/piesctl.c | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -2192,8 +2192,6 @@ main (int argc, char **argv) exit (EX_USAGE); } - logmsg (LOG_INFO, _("%s %s starting"), proginfo.package, proginfo.version); - if (!foreground) { check_pidfile (pidfile); @@ -2205,6 +2203,8 @@ main (int argc, char **argv) diag_setup (DIAG_TO_SYSLOG); } + logmsg (LOG_INFO, _("%s %s starting"), proginfo.package, proginfo.version); + if (!init_process) { if (ctl_open ()) diff --git a/src/piesctl.c b/src/piesctl.c index 71efbcd..aa6150a 100644 --- a/src/piesctl.c +++ b/src/piesctl.c @@ -1476,7 +1476,7 @@ parse_condition_to_uri (char const *base, struct cmdline_parser_state *state, { struct json_value *val; char *ret; - if (mandatory && state->argc == 1) + if (mandatory && state->argc == 0) parse_error ("%s", _("condition must be specified")); val = parse_condition (state); ret = piesctl_format (val, base); @@ -1721,7 +1721,7 @@ com_id (struct cmdline_parser_state *state) size_t size = 0; size_t i; - for (i = 1; i < state->argc; i++) + for (i = 0; i < state->argc; i++) { grecs_asprintf (&buf, &size, "/instance/%s", state->argv[i]); shttp_io_init (&conn->req); |