hoist _asyncns_done to above where it is first called
authorSenko Rasic <senko.rasic@collabora.co.uk>
Wed, 19 Sep 2007 16:18:42 +0200
changeset 280 f1bfa3d3ad1c
parent 279 76851aee7678
child 281 4e0421c44a73
hoist _asyncns_done to above where it is first called
loudmouth/lm-socket.c
--- a/loudmouth/lm-socket.c	Wed Sep 19 16:16:53 2007 +0200
+++ b/loudmouth/lm-socket.c	Wed Sep 19 16:18:42 2007 +0200
@@ -765,6 +765,27 @@
 			  gpointer data);
 
 
+static void
+_asyncns_done (LmSocket *socket)
+{
+	if (socket->resolv_channel != NULL) {
+		g_io_channel_unref (socket->resolv_channel);
+		socket->resolv_channel = NULL;
+	}
+ 
+	if (socket->watch_resolv) {
+		g_source_destroy(socket->watch_resolv);
+		socket->watch_resolv = NULL;
+	}
+
+	if (socket->asyncns_ctx) {
+		asyncns_free (socket->asyncns_ctx);
+		socket->asyncns_ctx = NULL;
+	}
+
+ 	socket->resolv_query = NULL;
+}
+
 void _asyncns_cancel (LmSocket *socket)
 {
 	if (socket == NULL)
@@ -806,27 +827,6 @@
 	return TRUE;
 }
 
-static void
-_asyncns_done (LmSocket *socket)
-{
-	if (socket->resolv_channel != NULL) {
-		g_io_channel_unref (socket->resolv_channel);
-		socket->resolv_channel = NULL;
-	}
- 
-	if (socket->watch_resolv) {
-		g_source_destroy(socket->watch_resolv);
-		socket->watch_resolv = NULL;
-	}
-
-	if (socket->asyncns_ctx) {
-		asyncns_free (socket->asyncns_ctx);
-		socket->asyncns_ctx = NULL;
-	}
-
- 	socket->resolv_query = NULL;
-}
-
 static gboolean
 _lm_socket_resolver_done (GSource *source,
     			  GIOCondition condition,