diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-08-21 01:29:40 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-08-21 01:29:40 +0200 |
commit | f6da5c86c8e02cf3553d31a3b8f9898722a2cd37 (patch) | |
tree | a17ae5d778d852df62b02cd8e04469801fee4145 | |
parent | 8a0e9f49a59fcfd95f92edda063c9dfb22f5e2a9 (diff) |
Read control service socket path from config.
-rw-r--r-- | control_service.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/control_service.c b/control_service.c index a6f035d..f3f1c5c 100644 --- a/control_service.c +++ b/control_service.c @@ -1,5 +1,6 @@ #include "control_service.h" #include "control_commands.h" +#include "conf.h" #include <glib.h> #include <glib/gstdio.h> @@ -34,7 +35,12 @@ static gboolean service_incoming(GSocketService *service, } gboolean control_service_start() { - address = g_unix_socket_address_new("audist.sock"); + gchar *sockname = conf_get_string("audist", "control_socket"); + if(sockname == NULL) { + g_warning("control_socket not set in config, can't start control service"); + return FALSE; + } + address = g_unix_socket_address_new(sockname); ss = g_threaded_socket_service_new(2); |