-doxygen
[oweals/gnunet.git] / src / transport / transport_api_address_to_string.c
index 73ea09f854508189f685ef9f4c4c696fe16dd72b..94c9ac45aa5c455bad57d6507c86502d8aef918b 100644 (file)
      Boston, MA 02111-1307, USA.
 */
 #include "platform.h"
-#include "gnunet_client_lib.h"
+#include "gnunet_util_lib.h"
 #include "gnunet_arm_service.h"
 #include "gnunet_hello_lib.h"
 #include "gnunet_protocols.h"
-#include "gnunet_server_lib.h"
-#include "gnunet_time_lib.h"
 #include "gnunet_transport_service.h"
 #include "transport.h"
 
@@ -71,7 +69,7 @@ address_response_processor (void *cls, const struct GNUNET_MessageHeader *msg)
   if (msg == NULL)
   {
     alucb->cb (alucb->cb_cls, NULL);
-    GNUNET_CLIENT_disconnect (alucb->client, GNUNET_NO);
+    GNUNET_CLIENT_disconnect (alucb->client);
     GNUNET_free (alucb);
     return;
   }
@@ -82,7 +80,7 @@ address_response_processor (void *cls, const struct GNUNET_MessageHeader *msg)
   {
     /* done! */
     alucb->cb (alucb->cb_cls, NULL);
-    GNUNET_CLIENT_disconnect (alucb->client, GNUNET_NO);
+    GNUNET_CLIENT_disconnect (alucb->client);
     GNUNET_free (alucb);
     return;
   }
@@ -92,7 +90,7 @@ address_response_processor (void *cls, const struct GNUNET_MessageHeader *msg)
     /* invalid reply */
     GNUNET_break (0);
     alucb->cb (alucb->cb_cls, NULL);
-    GNUNET_CLIENT_disconnect (alucb->client, GNUNET_NO);
+    GNUNET_CLIENT_disconnect (alucb->client);
     GNUNET_free (alucb);
     return;
   }
@@ -141,9 +139,8 @@ GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle
     GNUNET_break (0);
     return NULL;
   }
-
   client = GNUNET_CLIENT_connect ("transport", cfg);
-  if (client == NULL)
+  if (NULL == client)
     return NULL;
   msg = GNUNET_malloc (len);
   msg->header.size = htons (len);
@@ -180,7 +177,7 @@ GNUNET_TRANSPORT_address_to_string_cancel (struct
                                            GNUNET_TRANSPORT_AddressToStringContext
                                            *alc)
 {
-  GNUNET_CLIENT_disconnect (alc->client, GNUNET_NO);
+  GNUNET_CLIENT_disconnect (alc->client);
   GNUNET_free (alc);
 }