aboutsummaryrefslogtreecommitdiff
path: root/src/piesctl.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-01-03 16:04:29 +0200
committerSergey Poznyakoff <gray@gnu.org>2016-01-03 16:04:29 +0200
commit82e4f424e9f4ed16f1521c5bd5df31e0f46ce555 (patch)
treea272a6c44aa2634604fb0bae9dc4475fe772a80d /src/piesctl.c
parent85f2fd8d2772506911e95c3e4a0cb2538594b274 (diff)
downloadpies-82e4f424e9f4ed16f1521c5bd5df31e0f46ce555.tar.gz
pies-82e4f424e9f4ed16f1521c5bd5df31e0f46ce555.tar.bz2
Minor changes
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
@@ -177,36 +177,28 @@ parse_config ()
if (!url)
{
- 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)
printf ("%s: using URL %s\n", program_name, url->string);
}

Return to:

Send suggestions and report system problems to the System administrator.