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)
1235 1235
1236char const * 1236int
1237pies_control_url (void) 1237ctl_open (void)
1238{
1239 if (!control.url)
1240 {
1241 char *str = xasprintf (DEFAULT_CONTROL_URL, instance);
1242 if (pies_url_create (&control.url, str))
1243 {
1244 logmsg (LOG_CRIT, _("%s: cannot create URL: %s"),
1245 str, strerror (errno));
1246 exit (EX_OSERR);
1247 }
1248 free (str);
1249 }
1250 return control.url->string;
1251}
1252
1253void
1254ctl_open ()
1255{ 1238{
@@ -1257,3 +1240,2 @@ ctl_open ()
1257 1240
1258 pies_control_url ();
1259 fd = create_socket (control.url, SOCK_STREAM, NULL, 077); 1241 fd = create_socket (control.url, SOCK_STREAM, NULL, 077);
@@ -1263,3 +1245,3 @@ ctl_open ()
1263 control.url->string); 1245 control.url->string);
1264 exit (EX_UNAVAILABLE); 1246 return -1;
1265 } 1247 }
@@ -1270,3 +1252,3 @@ ctl_open ()
1270 control.url->string, strerror (errno)); 1252 control.url->string, strerror (errno));
1271 exit (EX_UNAVAILABLE); 1253 return -1;
1272 } 1254 }
@@ -1274,2 +1256,4 @@ ctl_open ()
1274 register_socket (fd, ctl_accept, NULL, NULL, NULL); 1256 register_socket (fd, ctl_accept, NULL, NULL, NULL);
1257
1258 return 0;
1275} 1259}

Return to:

Send suggestions and report system problems to the System administrator.