aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-06-30 11:21:00 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-06-30 11:21:00 +0000
commit34a484205d1bb3fb635c0e5c8443910d7ba73631 (patch)
tree74257f4853315b7f25631d8be7cfe9ee92399f59 /src/transport/plugin_transport_http.c
parentc6435cda97c1be4a38bb45a0e6bfe2daa05b824c (diff)
downloadgnunet-34a484205d1bb3fb635c0e5c8443910d7ba73631.tar.gz
gnunet-34a484205d1bb3fb635c0e5c8443910d7ba73631.zip
Diffstat (limited to 'src/transport/plugin_transport_http.c')
-rw-r--r--src/transport/plugin_transport_http.c50
1 files changed, 30 insertions, 20 deletions
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c
index a7e5a338c..071520330 100644
--- a/src/transport/plugin_transport_http.c
+++ b/src/transport/plugin_transport_http.c
@@ -2922,7 +2922,7 @@ tcp_nat_port_map_callback (void *cls,
2922 int af; 2922 int af;
2923 2923
2924 2924
2925 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, 2925 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR,
2926 "tcp", 2926 "tcp",
2927 "NPMC called with %d for address `%s'\n", 2927 "NPMC called with %d for address `%s'\n",
2928 add_remove, 2928 add_remove,
@@ -3545,17 +3545,27 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls)
3545 struct sockaddr **addrs; 3545 struct sockaddr **addrs;
3546 socklen_t *addrlens; 3546 socklen_t *addrlens;
3547 int ret; 3547 int ret;
3548 ret = GNUNET_SERVICE_get_server_addresses ("transport-http",
3549 env->cfg,
3550 &addrs,
3551 &addrlens);
3548 3552
3549 if (GNUNET_SYSERR != 3553 if (ret != GNUNET_SYSERR)
3550 (ret = GNUNET_SERVICE_get_server_addresses ("transport-http", 3554 {
3551 env->cfg, 3555 int counter = 0;
3552 &addrs, 3556 struct sockaddr *tmp = addrs[counter];
3553 &addrlens)))
3554 {
3555
3556 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, 3557 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR,
3557 component_name, 3558 component_name,
3558 "addresses %u\n",ret); 3559 "addresses %u\n",ret);
3560 while (tmp!= NULL)
3561 {
3562 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR,
3563 component_name,
3564 "address[%u] %s\n",counter, (tmp->sa_family == AF_INET) ? "AF_INET" : "AF_INET6" );
3565 counter++;
3566 tmp = addrs[counter];
3567 }
3568
3559 /* 3569 /*
3560 plugin->nat = GNUNET_NAT_register (env->cfg, 3570 plugin->nat = GNUNET_NAT_register (env->cfg,
3561 GNUNET_YES, 3571 GNUNET_YES,
@@ -3566,7 +3576,7 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls)
3566 &tcp_nat_port_map_callback, 3576 &tcp_nat_port_map_callback,
3567 &try_connection_reversal, 3577 &try_connection_reversal,
3568 plugin); 3578 plugin);
3569 3579 */
3570 while (ret > 0) 3580 while (ret > 0)
3571 { 3581 {
3572 ret--; 3582 ret--;
@@ -3574,18 +3584,18 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls)
3574 GNUNET_free (addrs[ret]); 3584 GNUNET_free (addrs[ret]);
3575 } 3585 }
3576 GNUNET_free_non_null (addrs); 3586 GNUNET_free_non_null (addrs);
3577 GNUNET_free_non_null (addrlens);*/ 3587 GNUNET_free_non_null (addrlens);
3578 } 3588 }
3579 else 3589 else
3580 { 3590 {
3581 plugin->nat = GNUNET_NAT_register (env->cfg, 3591 plugin->nat = GNUNET_NAT_register (env->cfg,
3582 GNUNET_YES, 3592 GNUNET_YES,
3583 0, 3593 0,
3584 0, NULL, NULL, 3594 0, NULL, NULL,
3585 NULL, 3595 NULL,
3586 &try_connection_reversal, 3596 &try_connection_reversal,
3587 plugin); 3597 plugin);
3588 } 3598 }
3589 3599
3590 plugin->peers = GNUNET_CONTAINER_multihashmap_create (10); 3600 plugin->peers = GNUNET_CONTAINER_multihashmap_create (10);
3591 3601