gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r33852 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r33852 - gnunet/src/transport
Date: Thu, 26 Jun 2014 11:00:46 +0200

Author: wachs
Date: 2014-06-26 11:00:46 +0200 (Thu, 26 Jun 2014)
New Revision: 33852

Modified:
   gnunet/src/transport/plugin_transport_http_client.c
Log:
target not required anymore since we use HELLO_ADDRESSES


Modified: gnunet/src/transport/plugin_transport_http_client.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_client.c 2014-06-26 02:24:14 UTC 
(rev 33851)
+++ gnunet/src/transport/plugin_transport_http_client.c 2014-06-26 09:00:46 UTC 
(rev 33852)
@@ -135,12 +135,6 @@
 struct Session
 {
   /**
-   * To whom are we talking to (set to our identity
-   * if we are still waiting for the welcome message)
-   */
-  struct GNUNET_PeerIdentity target;
-
-  /**
    * The URL to connect to
    */
   char *url;
@@ -437,7 +431,7 @@
   }
   GNUNET_assert (GNUNET_OK ==
                  GNUNET_CONTAINER_multipeermap_remove (plugin->sessions,
-                                                       &s->target,
+                                                       &s->address->peer,
                                                        s));
   if (NULL != s->client_put)
   {
@@ -445,7 +439,7 @@
          "Session %p/connection %p: disconnecting PUT connection to peer 
`%s'\n",
          s,
          s->client_put,
-         GNUNET_i2s (&s->target));
+         GNUNET_i2s (&s->address->peer));
 
     /* remove curl handle from multi handle */
     mret = curl_multi_remove_handle (plugin->curl_multi_handle,
@@ -459,7 +453,7 @@
     LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Session %p/connection %p: disconnecting GET connection to peer 
`%s'\n",
          s, s->client_get,
-         GNUNET_i2s (&s->target));
+         GNUNET_i2s (&s->address->peer));
     /* remove curl handle from multi handle */
     mret = curl_multi_remove_handle (plugin->curl_multi_handle,
                                      s->client_get);
@@ -486,7 +480,7 @@
     s->bytes_in_queue -= pos->size;
     if (NULL != pos->transmit_cont)
       pos->transmit_cont (pos->transmit_cont_cls,
-                          &s->target,
+                          &s->address->peer,
                           GNUNET_SYSERR,
                           pos->size,
                           pos->pos + s->overhead);
@@ -720,7 +714,7 @@
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Session %p/connection %p: Sending message with %u to peer `%s' \n",
        s, s->client_put,
-       msgbuf_size, GNUNET_i2s (&s->target));
+       msgbuf_size, GNUNET_i2s (&s->address->peer));
 
   /* create new message and schedule */
   msg = GNUNET_malloc (sizeof (struct HTTP_Message) + msgbuf_size);
@@ -1035,7 +1029,7 @@
     s->bytes_in_queue -= msg->size;
     if (NULL != msg->transmit_cont)
       msg->transmit_cont (msg->transmit_cont_cls,
-                          &s->target,
+                          &s->address->peer,
                           GNUNET_OK,
                           msg->size,
                           msg->size + s->overhead);
@@ -1146,7 +1140,7 @@
   {
     LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Client: peer `%s' address `%s' next read delayed for %s\n",
-         GNUNET_i2s (&s->target),
+         GNUNET_i2s (&s->address->peer),
          http_common_plugin_address_to_string (s->plugin->protocol,
                                                s->address->address,
                                                s->address->address_length),
@@ -1201,7 +1195,7 @@
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Session %p / connection %p: Received %u bytes from peer `%s'\n",
        s, s->client_get,
-       len, GNUNET_i2s (&s->target));
+       len, GNUNET_i2s (&s->address->peer));
   now = GNUNET_TIME_absolute_get ();
   if (now.abs_value_us < s->next_receive.abs_value_us)
   {
@@ -1298,7 +1292,7 @@
             LOG (GNUNET_ERROR_TYPE_DEBUG,
                  "Session %p/connection %p: PUT connection to `%s' ended with 
status %i reason %i: `%s'\n",
                  s, msg->easy_handle,
-                 GNUNET_i2s (&s->target),
+                 GNUNET_i2s (&s->address->peer),
                  http_statuscode,
                  msg->data.result,
                  curl_easy_strerror (msg->data.result));
@@ -1307,7 +1301,7 @@
             LOG (GNUNET_ERROR_TYPE_DEBUG,
                  "Session %p/connection %p: PUT connection to `%s' ended 
normal\n",
                  s, msg->easy_handle,
-                 GNUNET_i2s (&s->target));
+                 GNUNET_i2s (&s->address->peer));
           if (NULL == s->client_get)
           {
             /* Disconnect other transmission direction and tell transport */
@@ -1347,7 +1341,7 @@
                  "Session %p/connection %p: GET connection to `%s' ended with 
status %i reason %i: `%s'\n",
                  s,
                  msg->easy_handle,
-                 GNUNET_i2s (&s->target),
+                 GNUNET_i2s (&s->address->peer),
                  http_statuscode,
                  msg->data.result,
                  curl_easy_strerror (msg->data.result));
@@ -1358,7 +1352,7 @@
                  "Session %p/connection %p: GET connection to `%s' ended 
normal\n",
                  s,
                  msg->easy_handle,
-                 GNUNET_i2s (&s->target));
+                 GNUNET_i2s (&s->address->peer));
           /* Disconnect other transmission direction and tell transport */
           s->get.easyhandle = NULL;
           s->get.s = NULL;
@@ -1595,7 +1589,7 @@
   {
     LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Invalid address peer `%s'\n",
-         GNUNET_i2s (&s->target));
+         GNUNET_i2s (&s->address->peer));
     return GNUNET_SYSERR;
   }
 
@@ -1609,7 +1603,7 @@
   plugin->last_tag++;
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Initiating outbound session peer `%s' using address `%s'\n",
-       GNUNET_i2s (&s->target), s->url);
+       GNUNET_i2s (&s->address->peer), s->url);
 
   if ((GNUNET_SYSERR == client_connect_get (s)) ||
       (GNUNET_SYSERR == client_connect_put (s)))
@@ -1757,7 +1751,6 @@
   }
 
   s = GNUNET_new (struct Session);
-  s->target = address->peer;
   s->plugin = plugin;
   s->address = GNUNET_HELLO_address_copy (address);
   s->ats_address_network_type = ats.value;
@@ -1774,11 +1767,11 @@
        http_common_plugin_address_to_string (plugin->protocol,
                                              s->address->address,
                                              s->address->address_length),
-       GNUNET_i2s (&s->target));
+       GNUNET_i2s (&s->address->peer));
 
   /* add new session */
   (void) GNUNET_CONTAINER_multipeermap_put (plugin->sessions,
-                                            &s->target,
+                                            &s->address->peer,
                                             s,
                                             
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
   /* initiate new connection */
@@ -1789,7 +1782,7 @@
          http_common_plugin_address_to_string (plugin->protocol,
                                                s->address->address,
                                                s->address->address_length),
-         GNUNET_i2s (&s->target));
+         GNUNET_i2s (&s->address->peer));
     client_delete_session (s);
     return NULL;
   }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]