Check that you are not present in trail twice
[oweals/gnunet.git] / src / transport / transport_api_address_to_string.c
index afd0c7deb91babf14c61561c0cea3fc0f3c2b38d..e36904212c2a006faa80575f1d7c038a8fb5af5d 100644 (file)
@@ -76,8 +76,7 @@ address_response_processor (void *cls,
     alucb->cb (alucb->cb_cls,
                NULL,
                GNUNET_SYSERR);
-    GNUNET_CLIENT_disconnect (alucb->client);
-    GNUNET_free (alucb);
+    GNUNET_TRANSPORT_address_to_string_cancel (alucb);
     return;
   }
   GNUNET_break (ntohs (msg->type) ==
@@ -90,8 +89,7 @@ address_response_processor (void *cls,
     alucb->cb (alucb->cb_cls,
                NULL,
                GNUNET_SYSERR);
-    GNUNET_CLIENT_disconnect (alucb->client);
-    GNUNET_free (alucb);
+    GNUNET_TRANSPORT_address_to_string_cancel (alucb);
     return;
   }
   atsm = (const struct AddressToStringResultMessage *) msg;
@@ -126,8 +124,7 @@ address_response_processor (void *cls,
     alucb->cb (alucb->cb_cls,
                NULL,
                GNUNET_OK);
-    GNUNET_CLIENT_disconnect (alucb->client);
-    GNUNET_free (alucb);
+    GNUNET_TRANSPORT_address_to_string_cancel (alucb);
     return;
   }
   address = (const char *) &atsm[1];
@@ -139,8 +136,7 @@ address_response_processor (void *cls,
     alucb->cb (alucb->cb_cls,
                NULL,
                GNUNET_SYSERR);
-    GNUNET_CLIENT_disconnect (alucb->client);
-    GNUNET_free (alucb);
+    GNUNET_TRANSPORT_address_to_string_cancel (alucb);
     return;
   }
   /* expect more replies */