http now supports minor changes
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 29 Jun 2011 11:40:03 +0000 (11:40 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 29 Jun 2011 11:40:03 +0000 (11:40 +0000)
src/transport/plugin_transport_http.c
src/transport/test_plugin_transport_http.c
src/transport/test_plugin_transport_https.c

index a0eecb16873ad0676c63b46ded915c6144f311a4..51eada0a20a3f348116173afa6802e8a1a90b2a1 100644 (file)
@@ -2871,6 +2871,20 @@ http_plugin_address_to_string (void *cls,
   return ret;
 }
 
+/**
+ * Notify transport service about address
+ *
+ * @param cls the plugin
+ * @param tc unused
+ */
+static void
+address_notification (void *cls,
+                    const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+  struct Plugin *plugin = cls;
+
+  GNUNET_OS_network_interfaces_list (&process_interfaces, plugin);
+}
 
 /**
  * Exit point from the plugin.
@@ -3380,9 +3394,9 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls)
     }
   
   plugin->peers = GNUNET_CONTAINER_multihashmap_create (10);
-  GNUNET_OS_network_interfaces_list (&process_interfaces, plugin);
   
   GNUNET_free(component_name);
+  GNUNET_SCHEDULER_add_now(address_notification, plugin);
   return api;
 }
 
index e3313ca5981bfc617951d87630dcd16151cebf5a..5ba8c573a37e24735ef2fb431074c93f92726da6 100644 (file)
@@ -874,10 +874,9 @@ send_data(struct HTTP_Transfer * result,
  */
 static void
 notify_address (void *cls,
-                const char *name,
+                int add_remove,
                 const void *addr,
-                uint16_t addrlen,
-                struct GNUNET_TIME_Relative expires)
+                size_t addrlen)
 {
   char address[INET6_ADDRSTRLEN];
   unsigned int port;
index 809bc9cb8f76d234aa86d9f7f2e927e4dcca02b9..0845c8cd4bd4054f6e2946b8d72f5a0c57460161 100644 (file)
@@ -859,10 +859,9 @@ static int send_data( struct HTTP_Transfer * result, char * url)
  */
 void
 notify_address (void *cls,
-                const char *name,
-                const void *addr,
-                uint16_t addrlen,
-                struct GNUNET_TIME_Relative expires)
+    int add_remove,
+    const void *addr,
+    size_t addrlen)
 {
   char address[INET6_ADDRSTRLEN];
   unsigned int port;