aboutsummaryrefslogtreecommitdiff
path: root/src/piesctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/piesctl.c')
-rw-r--r--src/piesctl.c42
1 files changed, 17 insertions, 25 deletions
diff --git a/src/piesctl.c b/src/piesctl.c
index 626463c..b979c09 100644
--- a/src/piesctl.c
+++ b/src/piesctl.c
@@ -179,32 +179,24 @@ parse_config ()
{
- if (strcmp (instance, "pies") == 0)
+ if (verbose)
+ printf ("%s: falling back to default URL\n", program_name);
+ if (default_url)
+ url = default_url;
+ else
{
- if (verbose)
- printf ("%s: falling back to default URL\n", program_name);
- if (default_url)
- url = default_url;
- else
+ int rc;
+ size_t len = 0;
+ file_name = NULL;
+ grecs_asprintf (&file_name, &len, DEFAULT_CONTROL_URL, instance);
+ rc = pies_url_create (&url, file_name);
+ free (file_name);
+
+ if (rc)
{
- int rc;
- size_t len = 0;
- file_name = NULL;
- grecs_asprintf (&file_name, &len, DEFAULT_CONTROL_URL, instance);
- rc = pies_url_create (&url, file_name);
- free (file_name);
-
- if (rc)
- {
- grecs_error (NULL, 0, _("%s: cannot create URL: %s"),
- DEFAULT_CONTROL_URL, strerror (errno));
- exit (EX_SOFTWARE);
- }
+ grecs_error (NULL, 0, _("%s: cannot create URL: %s"),
+ DEFAULT_CONTROL_URL, strerror (errno));
+ exit (EX_SOFTWARE);
}
}
- else
- {
- grecs_error (NULL, 0, _("socket name for instance %s not configured"),
- instance);
- exit (EX_CONFIG);
- }
}
+
if (verbose)

Return to:

Send suggestions and report system problems to the System administrator.