diff options
Diffstat (limited to 'src/transport/plugin_transport_http_new.c')
-rw-r--r-- | src/transport/plugin_transport_http_new.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/transport/plugin_transport_http_new.c b/src/transport/plugin_transport_http_new.c index 2c7037694..042c977f5 100644 --- a/src/transport/plugin_transport_http_new.c +++ b/src/transport/plugin_transport_http_new.c | |||
@@ -340,6 +340,12 @@ lookup_session (struct Plugin *plugin, const struct GNUNET_PeerIdentity *target, | |||
340 | return NULL; | 340 | return NULL; |
341 | while (t != NULL) | 341 | while (t != NULL) |
342 | { | 342 | { |
343 | #if 0 | ||
344 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, | ||
345 | "Comparing peer `%s' address `%s' len %i session %X to \n", GNUNET_i2s(target), GNUNET_a2s(addr,addrlen), addrlen, session); | ||
346 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,"peer `%s' address `%s' len %i session %X \n\n", GNUNET_i2s(&t->target), GNUNET_a2s(t->addr,t->addrlen), t->addrlen, t); | ||
347 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,"memcmp %i \n", memcmp (addr, t->addr, addrlen)); | ||
348 | #endif | ||
343 | e_peer = GNUNET_NO; | 349 | e_peer = GNUNET_NO; |
344 | e_addr = GNUNET_NO; | 350 | e_addr = GNUNET_NO; |
345 | 351 | ||
@@ -348,7 +354,7 @@ lookup_session (struct Plugin *plugin, const struct GNUNET_PeerIdentity *target, | |||
348 | e_peer = GNUNET_YES; | 354 | e_peer = GNUNET_YES; |
349 | if (addrlen == t->addrlen) | 355 | if (addrlen == t->addrlen) |
350 | { | 356 | { |
351 | if (0 == memcmp (addr, &t->addr, addrlen)) | 357 | if (0 == memcmp (addr, t->addr, addrlen)) |
352 | { | 358 | { |
353 | e_addr = GNUNET_YES; | 359 | e_addr = GNUNET_YES; |
354 | } | 360 | } |
@@ -492,7 +498,7 @@ http_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target, | |||
492 | s = lookup_session (plugin, target, session, addr, addrlen, 1); | 498 | s = lookup_session (plugin, target, session, addr, addrlen, 1); |
493 | #if DEBUG_HTTP | 499 | #if DEBUG_HTTP |
494 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, | 500 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, |
495 | "%s exisiting session\n", (s!=NULL) ? "Found" : "NOT Found"); | 501 | "%s existing session: %s\n", (s!=NULL) ? "Found" : "NOT Found", ((s != NULL) && (s->inbound == GNUNET_YES)) ? "inbound" : "outbound"); |
496 | #endif | 502 | #endif |
497 | 503 | ||
498 | /* create new outbound connection */ | 504 | /* create new outbound connection */ |
@@ -749,7 +755,7 @@ nat_port_map_callback (void *cls, int add_remove, const struct sockaddr *addr, | |||
749 | { | 755 | { |
750 | GNUNET_assert (cls != NULL); | 756 | GNUNET_assert (cls != NULL); |
751 | struct Plugin *plugin = cls; | 757 | struct Plugin *plugin = cls; |
752 | //static int limit; | 758 | static int limit; |
753 | #if DEBUG_HTTP | 759 | #if DEBUG_HTTP |
754 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, | 760 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
755 | "NPMC called %s to address `%s'\n", | 761 | "NPMC called %s to address `%s'\n", |
@@ -761,9 +767,9 @@ nat_port_map_callback (void *cls, int add_remove, const struct sockaddr *addr, | |||
761 | { | 767 | { |
762 | case GNUNET_YES: | 768 | case GNUNET_YES: |
763 | // FIXME DEBUGGING | 769 | // FIXME DEBUGGING |
764 | //if (limit < 1) | 770 | if (limit < 1) |
765 | nat_add_address (cls, add_remove, addr, addrlen); | 771 | nat_add_address (cls, add_remove, addr, addrlen); |
766 | //limit++; | 772 | limit++; |
767 | // FIXME END | 773 | // FIXME END |
768 | break; | 774 | break; |
769 | case GNUNET_NO: | 775 | case GNUNET_NO: |