diff options
Diffstat (limited to 'control_service.c')
-rw-r--r-- | control_service.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/control_service.c b/control_service.c index 150db6d..a496812 100644 --- a/control_service.c +++ b/control_service.c @@ -15,7 +15,6 @@ static gboolean service_incoming(GSocketService *service, GSocketConnection *connection, GObject *source_object, gpointer user_data) { GError *error = NULL; - g_debug("local service got incoming connection"); GSocket *socket = g_socket_connection_get_socket(connection); gchar buffer[0x400]; @@ -48,6 +47,8 @@ static gboolean service_incoming(GSocketService *service, } gboolean control_service_start() { + GError *error = NULL; + gchar *sockname = conf_get_string("audist", "control_socket"); if(sockname == NULL) { g_warning("control_socket not set in config, can't start control service"); @@ -59,8 +60,10 @@ gboolean control_service_start() { if(g_socket_listener_add_address((GSocketListener*)ss, address, G_SOCKET_TYPE_STREAM, G_SOCKET_PROTOCOL_DEFAULT, NULL, - NULL, NULL) == FALSE) { - g_error("g_socket_listener_add_socket() failed"); + NULL, &error) == FALSE) { + g_warning("failed to set socket address: %s", error->message); + g_error_free(error); + return FALSE; } g_signal_connect(ss, "incoming", (GCallback)service_incoming, NULL); |