From 9ac3c2b3560da178800e5ad88ce29973454a66e5 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sat, 28 Aug 2010 12:15:49 +0200 Subject: Minor cleanup in services. --- control_service.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'control_service.c') 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); -- cgit v1.2.3