diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-07-01 14:35:19 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-07-01 14:35:19 +0000 |
commit | 4d676ab78173b7030a3d41df130b7053d1dcc8eb (patch) | |
tree | b58df5488453a1d92a1b927a8273f56581566a51 /src/transport/plugin_transport_http.c | |
parent | 6129a0a79b56923d483216ba78ba250c2cf0403c (diff) | |
download | gnunet-4d676ab78173b7030a3d41df130b7053d1dcc8eb.tar.gz gnunet-4d676ab78173b7030a3d41df130b7053d1dcc8eb.zip |
clean up
Diffstat (limited to 'src/transport/plugin_transport_http.c')
-rw-r--r-- | src/transport/plugin_transport_http.c | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index 52865addc..4aca7da61 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c | |||
@@ -107,7 +107,7 @@ struct IPv4HttpAddress | |||
107 | }; | 107 | }; |
108 | 108 | ||
109 | /** | 109 | /** |
110 | * Wrapper for IPv4 addresses. | 110 | * Wrapper to manage IPv4 addresses |
111 | */ | 111 | */ |
112 | struct IPv4HttpAddressWrapper | 112 | struct IPv4HttpAddressWrapper |
113 | { | 113 | { |
@@ -3027,9 +3027,10 @@ tcp_nat_cb_remove_addr (void *cls, | |||
3027 | add_remove, | 3027 | add_remove, |
3028 | w_t4->addr, sizeof (struct IPv4HttpAddress)); | 3028 | w_t4->addr, sizeof (struct IPv4HttpAddress)); |
3029 | 3029 | ||
3030 | /* GNUNET_CONTAINER_DLL_remove(plugin->ipv4_addr_head, | 3030 | GNUNET_CONTAINER_DLL_remove(plugin->ipv4_addr_head, |
3031 | plugin->ipv4_addr_tail,t4); | 3031 | plugin->ipv4_addr_tail,w_t4); |
3032 | GNUNET_free (t4);*/ | 3032 | GNUNET_free (w_t4->addr); |
3033 | GNUNET_free (w_t4); | ||
3033 | break; | 3034 | break; |
3034 | case AF_INET6: | 3035 | case AF_INET6: |
3035 | w_t6 = plugin->ipv6_addr_head; | 3036 | w_t6 = plugin->ipv6_addr_head; |
@@ -3048,9 +3049,10 @@ tcp_nat_cb_remove_addr (void *cls, | |||
3048 | add_remove, | 3049 | add_remove, |
3049 | w_t6->addr, sizeof (struct IPv6HttpAddress)); | 3050 | w_t6->addr, sizeof (struct IPv6HttpAddress)); |
3050 | 3051 | ||
3051 | /* GNUNET_CONTAINER_DLL_remove(plugin->ipv6_addr_head, | 3052 | GNUNET_CONTAINER_DLL_remove(plugin->ipv6_addr_head, |
3052 | plugin->ipv6_addr_tail,t6); | 3053 | plugin->ipv6_addr_tail,w_t6); |
3053 | GNUNET_free (t6);*/ | 3054 | GNUNET_free (w_t6->addr); |
3055 | GNUNET_free (w_t6); | ||
3054 | break; | 3056 | break; |
3055 | default: | 3057 | default: |
3056 | return; | 3058 | return; |
@@ -3118,8 +3120,8 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) | |||
3118 | struct GNUNET_TRANSPORT_PluginFunctions *api = cls; | 3120 | struct GNUNET_TRANSPORT_PluginFunctions *api = cls; |
3119 | struct Plugin *plugin = api->cls; | 3121 | struct Plugin *plugin = api->cls; |
3120 | CURLMcode mret; | 3122 | CURLMcode mret; |
3121 | struct IPv4HttpAddressWrapper * ipv4addr; | 3123 | struct IPv4HttpAddressWrapper * w_t4; |
3122 | struct IPv6HttpAddressWrapper * ipv6addr; | 3124 | struct IPv6HttpAddressWrapper * w_t6; |
3123 | GNUNET_assert(cls !=NULL); | 3125 | GNUNET_assert(cls !=NULL); |
3124 | 3126 | ||
3125 | if (plugin->nat != NULL) | 3127 | if (plugin->nat != NULL) |
@@ -3145,21 +3147,21 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) | |||
3145 | GNUNET_SCHEDULER_cancel(plugin->http_server_task_v6); | 3147 | GNUNET_SCHEDULER_cancel(plugin->http_server_task_v6); |
3146 | plugin->http_server_task_v6 = GNUNET_SCHEDULER_NO_TASK; | 3148 | plugin->http_server_task_v6 = GNUNET_SCHEDULER_NO_TASK; |
3147 | } | 3149 | } |
3148 | 3150 | ||
3149 | while (plugin->ipv4_addr_head!=NULL) | 3151 | while (plugin->ipv4_addr_head!=NULL) |
3150 | { | 3152 | { |
3151 | ipv4addr = plugin->ipv4_addr_head; | 3153 | w_t4 = plugin->ipv4_addr_head; |
3152 | GNUNET_CONTAINER_DLL_remove(plugin->ipv4_addr_head,plugin->ipv4_addr_tail,ipv4addr); | 3154 | GNUNET_CONTAINER_DLL_remove(plugin->ipv4_addr_head,plugin->ipv4_addr_tail,w_t4); |
3153 | GNUNET_free(ipv4addr->addr); | 3155 | GNUNET_free(w_t4->addr); |
3154 | GNUNET_free(ipv4addr); | 3156 | GNUNET_free(w_t4); |
3155 | } | 3157 | } |
3156 | 3158 | ||
3157 | while (plugin->ipv6_addr_head!=NULL) | 3159 | while (plugin->ipv6_addr_head!=NULL) |
3158 | { | 3160 | { |
3159 | ipv6addr = plugin->ipv6_addr_head; | 3161 | w_t6 = plugin->ipv6_addr_head; |
3160 | GNUNET_CONTAINER_DLL_remove(plugin->ipv6_addr_head,plugin->ipv6_addr_tail,ipv6addr); | 3162 | GNUNET_CONTAINER_DLL_remove(plugin->ipv6_addr_head,plugin->ipv6_addr_tail,w_t6); |
3161 | GNUNET_free(ipv4addr->addr); | 3163 | GNUNET_free(w_t6->addr); |
3162 | GNUNET_free(ipv6addr); | 3164 | GNUNET_free(w_t6); |
3163 | } | 3165 | } |
3164 | 3166 | ||
3165 | /* free all peer information */ | 3167 | /* free all peer information */ |