From: Matthias Wachs Date: Mon, 26 Sep 2011 14:44:29 +0000 (+0000) Subject: fixes X-Git-Tag: initial-import-from-subversion-38251~16961 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=659f91758ced91c6a993e6632d8cbada69246bc7;p=oweals%2Fgnunet.git fixes --- diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c index c5fea94a1..e4942248a 100644 --- a/src/transport/plugin_transport_http_client.c +++ b/src/transport/plugin_transport_http_client.c @@ -189,7 +189,7 @@ client_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { #if DEBUG_HTTP GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, - "Client: %X connection to '%s' %s ended\n", s, GNUNET_i2s(&s->target), GNUNET_a2s (s->addr, s->addrlen)); + "Client: %X connection to '%s' %s ended\n", msg->easy_handle, GNUNET_i2s(&s->target), GNUNET_a2s (s->addr, s->addrlen)); #endif client_disconnect(s); //GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,"Notifying about ended session to peer `%s' `%s'\n", GNUNET_i2s (&s->target), http_plugin_address_to_string (plugin, s->addr, s->addrlen)); @@ -214,15 +214,17 @@ client_disconnect (struct Session *s) struct HTTP_Message * msg; struct HTTP_Message * t; + + + if (s->client_put != NULL) + { #if DEBUG_HTTP GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, "Client: %X Deleting outbound PUT session to peer `%s'\n", - s, + s->client_put, GNUNET_i2s (&s->target)); #endif - if (s->client_put != NULL) - { mret = curl_multi_remove_handle (plugin->client_mh, s->client_put); if (mret != CURLM_OK) { @@ -234,12 +236,7 @@ client_disconnect (struct Session *s) s->client_put = NULL; } -#if DEBUG_HTTP - GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, - "Client: %X Deleting outbound GET session to peer `%s'\n", - s, - GNUNET_i2s (&s->target)); -#endif + if (s->recv_wakeup_task != GNUNET_SCHEDULER_NO_TASK) { GNUNET_SCHEDULER_cancel (s->recv_wakeup_task); @@ -248,6 +245,13 @@ client_disconnect (struct Session *s) if (s->client_get != NULL) { +#if DEBUG_HTTP + GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, + "Client: %X Deleting outbound GET session to peer `%s'\n", + s->client_get, + GNUNET_i2s (&s->target)); +#endif + mret = curl_multi_remove_handle (plugin->client_mh, s->client_get); if (mret != CURLM_OK) { @@ -429,7 +433,7 @@ client_send_cb (void *stream, size_t size, size_t nmemb, void *cls) #if VERBOSE_CLIENT GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, "Client: %X Message with %u bytes sent, removing message from queue\n", - s, msg->size, msg->pos); + s->client_put, msg->size, msg->pos); #endif /* Calling transmit continuation */ if (NULL != msg->transmit_cont) diff --git a/src/transport/plugin_transport_http_new.c b/src/transport/plugin_transport_http_new.c index 47d4743fd..2c7037694 100644 --- a/src/transport/plugin_transport_http_new.c +++ b/src/transport/plugin_transport_http_new.c @@ -494,10 +494,7 @@ http_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target, GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, "%s exisiting session\n", (s!=NULL) ? "Found" : "NOT Found"); #endif - // FIXME DEBUGGING - if (session != NULL) - s= session; - //FIXME END + /* create new outbound connection */ if (s == NULL) { @@ -656,7 +653,7 @@ nat_add_address (void *cls, int add_remove, const struct sockaddr *addr, #if DEBUG_HTTP GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, "Notifying transport to add IPv6 address `%s'\n", - http_plugin_address_to_string(NULL, &w_t6->addr, sizeof (struct sockaddr_in))); + http_plugin_address_to_string(NULL, &w_t6->addr, sizeof (struct sockaddr_in6))); #endif plugin->env->notify_address (plugin->env->cls, add_remove, &w_t6->addr, sizeof (struct sockaddr_in6)); break; @@ -722,7 +719,7 @@ nat_remove_address (void *cls, int add_remove, const struct sockaddr *addr, #if DEBUG_HTTP GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, "Notifying transport to remove IPv6 address `%s'\n", - http_plugin_address_to_string(NULL, &w_t4->addr, sizeof (struct sockaddr_in))); + http_plugin_address_to_string(NULL, &w_t6->addr, sizeof (struct sockaddr_in6))); #endif plugin->env->notify_address (plugin->env->cls, add_remove, &w_t6->addr, sizeof (struct sockaddr_in6 )); @@ -786,6 +783,10 @@ start_report_addresses (struct Plugin *plugin) res = GNUNET_SERVICE_get_server_addresses (plugin->name, plugin->env->cfg, &addrs, &addrlens); +#if 0 + GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, + _("FOUND %u addresses\n"),res); +#endif if (res != GNUNET_SYSERR) { @@ -798,6 +799,11 @@ start_report_addresses (struct Plugin *plugin) while (res > 0) { res--; +#if 0 + GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, + _("FREEING %s\n"), + GNUNET_a2s (addrs[res], addrlens[res])); +#endif GNUNET_assert (addrs[res] != NULL); GNUNET_free (addrs[res]); }