diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-06-29 11:40:03 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-06-29 11:40:03 +0000 |
commit | 7a3ae0e57d0eb0d56d839134ddc19b23fd2b5ba7 (patch) | |
tree | 71a617c873dd068b505a9a70a0cf4c118fc4eaf0 | |
parent | efa03f35a02e6245adfcc6f59e6287a78204a447 (diff) | |
download | gnunet-7a3ae0e57d0eb0d56d839134ddc19b23fd2b5ba7.tar.gz gnunet-7a3ae0e57d0eb0d56d839134ddc19b23fd2b5ba7.zip |
http now supports minor changes
-rw-r--r-- | src/transport/plugin_transport_http.c | 16 | ||||
-rw-r--r-- | src/transport/test_plugin_transport_http.c | 5 | ||||
-rw-r--r-- | src/transport/test_plugin_transport_https.c | 7 |
3 files changed, 20 insertions, 8 deletions
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index a0eecb168..51eada0a2 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c | |||
@@ -2871,6 +2871,20 @@ http_plugin_address_to_string (void *cls, | |||
2871 | return ret; | 2871 | return ret; |
2872 | } | 2872 | } |
2873 | 2873 | ||
2874 | /** | ||
2875 | * Notify transport service about address | ||
2876 | * | ||
2877 | * @param cls the plugin | ||
2878 | * @param tc unused | ||
2879 | */ | ||
2880 | static void | ||
2881 | address_notification (void *cls, | ||
2882 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2883 | { | ||
2884 | struct Plugin *plugin = cls; | ||
2885 | |||
2886 | GNUNET_OS_network_interfaces_list (&process_interfaces, plugin); | ||
2887 | } | ||
2874 | 2888 | ||
2875 | /** | 2889 | /** |
2876 | * Exit point from the plugin. | 2890 | * Exit point from the plugin. |
@@ -3380,9 +3394,9 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls) | |||
3380 | } | 3394 | } |
3381 | 3395 | ||
3382 | plugin->peers = GNUNET_CONTAINER_multihashmap_create (10); | 3396 | plugin->peers = GNUNET_CONTAINER_multihashmap_create (10); |
3383 | GNUNET_OS_network_interfaces_list (&process_interfaces, plugin); | ||
3384 | 3397 | ||
3385 | GNUNET_free(component_name); | 3398 | GNUNET_free(component_name); |
3399 | GNUNET_SCHEDULER_add_now(address_notification, plugin); | ||
3386 | return api; | 3400 | return api; |
3387 | } | 3401 | } |
3388 | 3402 | ||
diff --git a/src/transport/test_plugin_transport_http.c b/src/transport/test_plugin_transport_http.c index e3313ca59..5ba8c573a 100644 --- a/src/transport/test_plugin_transport_http.c +++ b/src/transport/test_plugin_transport_http.c | |||
@@ -874,10 +874,9 @@ send_data(struct HTTP_Transfer * result, | |||
874 | */ | 874 | */ |
875 | static void | 875 | static void |
876 | notify_address (void *cls, | 876 | notify_address (void *cls, |
877 | const char *name, | 877 | int add_remove, |
878 | const void *addr, | 878 | const void *addr, |
879 | uint16_t addrlen, | 879 | size_t addrlen) |
880 | struct GNUNET_TIME_Relative expires) | ||
881 | { | 880 | { |
882 | char address[INET6_ADDRSTRLEN]; | 881 | char address[INET6_ADDRSTRLEN]; |
883 | unsigned int port; | 882 | unsigned int port; |
diff --git a/src/transport/test_plugin_transport_https.c b/src/transport/test_plugin_transport_https.c index 809bc9cb8..0845c8cd4 100644 --- a/src/transport/test_plugin_transport_https.c +++ b/src/transport/test_plugin_transport_https.c | |||
@@ -859,10 +859,9 @@ static int send_data( struct HTTP_Transfer * result, char * url) | |||
859 | */ | 859 | */ |
860 | void | 860 | void |
861 | notify_address (void *cls, | 861 | notify_address (void *cls, |
862 | const char *name, | 862 | int add_remove, |
863 | const void *addr, | 863 | const void *addr, |
864 | uint16_t addrlen, | 864 | size_t addrlen) |
865 | struct GNUNET_TIME_Relative expires) | ||
866 | { | 865 | { |
867 | char address[INET6_ADDRSTRLEN]; | 866 | char address[INET6_ADDRSTRLEN]; |
868 | unsigned int port; | 867 | unsigned int port; |