aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-10-08 14:22:25 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-10-08 14:22:25 +0000
commit72cb2b1652948034164725ca79c5b00b8d35da61 (patch)
tree5083953d3dbffe3a781dbd69a92b0120f932c53b /src/transport/plugin_transport_http.c
parent28857f155429eebd86d764db00fdb83d6091ea8b (diff)
downloadgnunet-72cb2b1652948034164725ca79c5b00b8d35da61.tar.gz
gnunet-72cb2b1652948034164725ca79c5b00b8d35da61.zip
fixed bug related to Codesonar 10818.81116
Diffstat (limited to 'src/transport/plugin_transport_http.c')
-rw-r--r--src/transport/plugin_transport_http.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c
index fbbd1ad76..75e7e1a26 100644
--- a/src/transport/plugin_transport_http.c
+++ b/src/transport/plugin_transport_http.c
@@ -747,14 +747,17 @@ process_interfaces (void *cls,
747 { 747 {
748 GNUNET_CONTAINER_DLL_insert(plugin->ipv4_addr_head,plugin->ipv4_addr_tail,t4); 748 GNUNET_CONTAINER_DLL_insert(plugin->ipv4_addr_head,plugin->ipv4_addr_tail,t4);
749 plugin->env->notify_address(plugin->env->cls,PROTOCOL_PREFIX,t4, sizeof (struct IPv4HttpAddress), GNUNET_TIME_UNIT_FOREVER_REL); 749 plugin->env->notify_address(plugin->env->cls,PROTOCOL_PREFIX,t4, sizeof (struct IPv4HttpAddress), GNUNET_TIME_UNIT_FOREVER_REL);
750 return GNUNET_OK;
750 } 751 }
752 GNUNET_free (t4);
753 return GNUNET_OK;
751 } 754 }
752 else 755 else
753 { 756 {
754 GNUNET_CONTAINER_DLL_insert(plugin->ipv4_addr_head,plugin->ipv4_addr_tail,t4); 757 GNUNET_CONTAINER_DLL_insert(plugin->ipv4_addr_head,plugin->ipv4_addr_tail,t4);
755 plugin->env->notify_address(plugin->env->cls,PROTOCOL_PREFIX,t4, sizeof (struct IPv4HttpAddress), GNUNET_TIME_UNIT_FOREVER_REL); 758 plugin->env->notify_address(plugin->env->cls,PROTOCOL_PREFIX,t4, sizeof (struct IPv4HttpAddress), GNUNET_TIME_UNIT_FOREVER_REL);
759 return GNUNET_OK;
756 } 760 }
757
758 } 761 }
759 else if ((af == AF_INET6) && (plugin->use_ipv6 == GNUNET_YES) && (plugin->bind4_address == NULL)) 762 else if ((af == AF_INET6) && (plugin->use_ipv6 == GNUNET_YES) && (plugin->bind4_address == NULL))
760 { 763 {
@@ -775,17 +778,17 @@ process_interfaces (void *cls,
775 t6->u6_port = htons (plugin->port_inbound); 778 t6->u6_port = htons (plugin->port_inbound);
776 plugin->env->notify_address(plugin->env->cls,PROTOCOL_PREFIX,t6,sizeof (struct IPv6HttpAddress) , GNUNET_TIME_UNIT_FOREVER_REL); 779 plugin->env->notify_address(plugin->env->cls,PROTOCOL_PREFIX,t6,sizeof (struct IPv6HttpAddress) , GNUNET_TIME_UNIT_FOREVER_REL);
777 GNUNET_CONTAINER_DLL_insert(plugin->ipv6_addr_head,plugin->ipv6_addr_tail,t6); 780 GNUNET_CONTAINER_DLL_insert(plugin->ipv6_addr_head,plugin->ipv6_addr_tail,t6);
781 return GNUNET_OK;
778 } 782 }
783 GNUNET_free (t6);
784 return GNUNET_OK;
779 } 785 }
780 else 786 memcpy (&t6->ipv6_addr,
781 { 787 &((struct sockaddr_in6 *) addr)->sin6_addr,
782 memcpy (&t6->ipv6_addr, 788 sizeof (struct in6_addr));
783 &((struct sockaddr_in6 *) addr)->sin6_addr, 789 t6->u6_port = htons (plugin->port_inbound);
784 sizeof (struct in6_addr)); 790 GNUNET_CONTAINER_DLL_insert(plugin->ipv6_addr_head,plugin->ipv6_addr_tail,t6);
785 t6->u6_port = htons (plugin->port_inbound); 791 plugin->env->notify_address(plugin->env->cls,PROTOCOL_PREFIX,t6,sizeof (struct IPv6HttpAddress) , GNUNET_TIME_UNIT_FOREVER_REL);
786 GNUNET_CONTAINER_DLL_insert(plugin->ipv6_addr_head,plugin->ipv6_addr_tail,t6);
787 plugin->env->notify_address(plugin->env->cls,PROTOCOL_PREFIX,t6,sizeof (struct IPv6HttpAddress) , GNUNET_TIME_UNIT_FOREVER_REL);
788 }
789 } 792 }
790 return GNUNET_OK; 793 return GNUNET_OK;
791} 794}