changes
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 29 Aug 2012 08:14:22 +0000 (08:14 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 29 Aug 2012 08:14:22 +0000 (08:14 +0000)
src/transport/plugin_transport_http_client.c
src/transport/test_plugin_transport.c

index c1f00bf89b8cf97f2884d5522daa9e9cb8db607a..4e5449e63c9ab48a0355e2d448ba109a6e5d8127 100644 (file)
@@ -936,11 +936,6 @@ client_connect (struct Session *s)
                      GNUNET_i2s (&s->target));
     return GNUNET_SYSERR;
   }
-  else
-    GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,
-                     "address peer `%s'\n",
-                     http_common_plugin_address_to_string (plugin, s->addr, s->addrlen));
-
 
   GNUNET_asprintf (&url, "%s/%s;%u",
       http_common_plugin_address_to_string (plugin, s->addr, s->addrlen),
@@ -1096,8 +1091,6 @@ http_client_plugin_get_session (void *cls,
   ats.value = htonl (GNUNET_ATS_NET_UNSPECIFIED);
   sa = http_common_socket_from_address (address->address, address->address_length, &res);
 
-
-
   if (GNUNET_SYSERR == res)
   {
       return NULL;
index 500bcaf39142792d0979d84a8d7ffda65659dd98..6632244e2772df7ccf106a3477201958c1add36a 100644 (file)
@@ -135,6 +135,8 @@ struct AddressWrapper
   void *addr;
 
   size_t addrlen;
+
+  char *addrstring;
 };
 
 static void
@@ -183,9 +185,12 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   while (NULL != head)
   {
       w = head;
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                _("Plugin did not remove address `%s' \n"), w->addrstring);
       GNUNET_CONTAINER_DLL_remove (head, tail, w);
       c ++;
       GNUNET_free (w->addr);
+      GNUNET_free (w->addrstring);
       GNUNET_free (w);
   }
   if (c > 0)
@@ -286,7 +291,7 @@ env_notify_address (void *cls,
           end_badly_now();
           return;
       }
-
+      w->addrstring = strdup (api->address_to_string (api, w->addr, w->addrlen));
       GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                   _("Plugin added address `%s'\n"), a2s);
 
@@ -353,6 +358,7 @@ env_notify_address (void *cls,
 
       GNUNET_CONTAINER_DLL_remove (head, tail, w);
       GNUNET_free (w->addr);
+      GNUNET_free (w->addrstring);
       GNUNET_free (w);
   }
   else