aboutsummaryrefslogtreecommitdiff
path: root/src/ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ctl.c')
-rw-r--r--src/ctl.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/src/ctl.c b/src/ctl.c
index 78490cb..46038a2 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -1235,21 +1235,4 @@ ctl_accept (int socket, void *data)
-char const *
-pies_control_url (void)
-{
- if (!control.url)
- {
- char *str = xasprintf (DEFAULT_CONTROL_URL, instance);
- if (pies_url_create (&control.url, str))
- {
- logmsg (LOG_CRIT, _("%s: cannot create URL: %s"),
- str, strerror (errno));
- exit (EX_OSERR);
- }
- free (str);
- }
- return control.url->string;
-}
-
-void
-ctl_open ()
+int
+ctl_open (void)
{
@@ -1257,3 +1240,2 @@ ctl_open ()
- pies_control_url ();
fd = create_socket (control.url, SOCK_STREAM, NULL, 077);
@@ -1263,3 +1245,3 @@ ctl_open ()
control.url->string);
- exit (EX_UNAVAILABLE);
+ return -1;
}
@@ -1270,3 +1252,3 @@ ctl_open ()
control.url->string, strerror (errno));
- exit (EX_UNAVAILABLE);
+ return -1;
}
@@ -1274,2 +1256,4 @@ ctl_open ()
register_socket (fd, ctl_accept, NULL, NULL, NULL);
+
+ return 0;
}

Return to:

Send suggestions and report system problems to the System administrator.