loudmouth/lm-old-socket.c
changeset 446 e97c43e6f05f
parent 445 64c212f13709
child 447 b06a273612be
--- a/loudmouth/lm-old-socket.c	Sun Jul 13 01:14:42 2008 +0200
+++ b/loudmouth/lm-old-socket.c	Sun Jul 13 01:18:23 2008 +0200
@@ -850,19 +850,6 @@
  	socket->resolv_query = NULL;
 }
 
-void lm_old_socket_asyncns_cancel (LmOldSocket *socket)
-{
-	if (socket == NULL)
-		return;
-
-	if (socket->asyncns_ctx) {
-		if (socket->resolv_query)
-			asyncns_cancel (socket->asyncns_ctx, socket->resolv_query);
-
-		_asyncns_done (socket);
-	}
-}
-
 static gboolean
 _asyncns_prep (LmOldSocket *socket, GError **error)
 {
@@ -1225,3 +1212,22 @@
 #endif /* USE_TCP_KEEPALIVES */
 }
 
+void
+lm_old_socket_asyncns_cancel (LmOldSocket *socket)
+{
+#ifdef HAVE_ASYNCNS
+        if (socket == NULL)
+		return;
+
+	if (socket->asyncns_ctx) {
+                if (socket->resolv_query)
+                        asyncns_cancel (socket->asyncns_ctx, socket->resolv_query);
+
+                _asyncns_done (socket);
+	}
+#else
+        return;
+#endif /* HAVE_ASYNCNS */
+}
+
+