gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r21701 - gnunet/src/transport
Date: Fri, 1 Jun 2012 17:01:00 +0200

Author: grothoff
Date: 2012-06-01 17:01:00 +0200 (Fri, 01 Jun 2012)
New Revision: 21701

Modified:
   gnunet/src/transport/plugin_transport_http.c
   gnunet/src/transport/plugin_transport_http_client.c
   gnunet/src/transport/plugin_transport_http_server.c
   gnunet/src/transport/test_transport_api_reliability.c
Log:
-fixing minor bugs, code cleanup

Modified: gnunet/src/transport/plugin_transport_http.c
===================================================================
--- gnunet/src/transport/plugin_transport_http.c        2012-06-01 14:35:15 UTC 
(rev 21700)
+++ gnunet/src/transport/plugin_transport_http.c        2012-06-01 15:01:00 UTC 
(rev 21701)
@@ -268,13 +268,10 @@
 static int
 http_plugin_address_suggested (void *cls, const void *addr, size_t addrlen)
 {
-
   struct Plugin *plugin = cls;
   struct IPv4HttpAddressWrapper *w_tv4 = plugin->ipv4_addr_head;
   struct IPv6HttpAddressWrapper *w_tv6 = plugin->ipv6_addr_head;
 
-
-
   GNUNET_assert (cls != NULL);
   if ((addrlen != sizeof (struct sockaddr_in)) ||
       (addrlen != sizeof (struct sockaddr_in6)))
@@ -358,11 +355,12 @@
  * @param added length of created address
  * @return GNUNET_OK on success, GNUNET_SYSERR on failure
  */
-int http_string_to_address (void *cls,
-                           const char *addr,
-                           uint16_t addrlen,
-                           void **buf,
-                           size_t *added)
+int 
+http_string_to_address (void *cls,
+                       const char *addr,
+                       uint16_t addrlen,
+                       void **buf,
+                       size_t *added)
 {
 #if !BUILD_HTTPS
   char *protocol = "http";
@@ -425,7 +423,7 @@
     (*added) = sizeof (struct IPv4HttpAddress);
     return GNUNET_OK;
   }
-  else if (GNUNET_OK == GNUNET_STRINGS_to_address_ipv6(addr_str, 
strlen(addr_str), &addr_6))
+  if (GNUNET_OK == GNUNET_STRINGS_to_address_ipv6(addr_str, strlen(addr_str), 
&addr_6))
   {
     http_6addr = GNUNET_malloc (sizeof (struct IPv6HttpAddress));
     http_6addr->u6_port = addr_6.sin6_port;
@@ -434,18 +432,14 @@
     (*added) = sizeof (struct IPv6HttpAddress);
     return GNUNET_OK;
   }
-  else
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                     "Invalid address string `%s' to convert to address\n",
-                     addr_str);
-    GNUNET_break (0);
-    return GNUNET_SYSERR;
-  }
+  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+             "Invalid address string `%s' to convert to address\n",
+             addr_str);
+  GNUNET_break (0);
+  return GNUNET_SYSERR;  
 }
 
 
-
 /**
  * Function called for a quick conversion of the binary address to
  * a numeric address.  Note that the caller must not free the
@@ -513,6 +507,7 @@
   return rbuf;
 }
 
+
 struct Session *
 lookup_session_old (struct Plugin *plugin, const struct GNUNET_PeerIdentity 
*target,
                 struct Session *session, const void *addr, size_t addrlen,
@@ -526,11 +521,11 @@
   {
 #if 0
     GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,
-                     "Comparing peer `%s' address `%s' len %i session %X to 
\n",
+                     "Comparing peer `%s' address `%s' len %i session %p to 
\n",
                      GNUNET_i2s (target), GNUNET_a2s (addr, addrlen), addrlen,
                      session);
     GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,
-                     "peer `%s' address `%s' len %i session %X \n\n",
+                     "peer `%s' address `%s' len %i session %p \n\n",
                      GNUNET_i2s (&t->target), GNUNET_a2s (t->addr, t->addrlen),
                      t->addrlen, t);
     GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, "memcmp %i \n",
@@ -558,6 +553,7 @@
   return NULL;
 }
 
+
 struct Session *
 lookup_session (struct Plugin *plugin,
                 const struct GNUNET_HELLO_Address *address)
@@ -572,6 +568,7 @@
   return NULL;
 }
 
+
 int
 exist_session (struct Plugin *plugin, struct Session *s)
 {
@@ -589,7 +586,6 @@
 }
 
 
-
 void
 delete_session (struct Session *s)
 {
@@ -606,6 +602,7 @@
   GNUNET_free (s);
 }
 
+
 struct Session *
 create_session (struct Plugin *plugin, const struct GNUNET_PeerIdentity 
*target,
                 const void *addr, size_t addrlen)
@@ -626,7 +623,6 @@
 }
 
 
-
 void
 notify_session_end (void *cls, const struct GNUNET_PeerIdentity *peer,
                     struct Session *s)
@@ -638,6 +634,7 @@
   delete_session (s);
 }
 
+
 /**
  * Creates a new outbound session the transport service will use to send data 
to the
  * peer
@@ -646,7 +643,6 @@
  * @param address the address
  * @return the session or NULL of max connections exceeded
  */
-
 static struct Session *
 http_get_session (void *cls,
                   const struct GNUNET_HELLO_Address *address)
@@ -730,6 +726,7 @@
   return s;
 }
 
+
 /**
  * Function that can be used by the transport service to transmit
  * a message using the plugin.   Note that in the case of a
@@ -791,7 +788,6 @@
   }
 
   /* create new message and schedule */
-
   msg = GNUNET_malloc (sizeof (struct HTTP_Message) + msgbuf_size);
   msg->next = NULL;
   msg->size = msgbuf_size;
@@ -875,6 +871,7 @@
   }
 }
 
+
 static void *
 find_address (struct Plugin *plugin, const struct sockaddr *addr, socklen_t 
addrlen)
 {
@@ -933,6 +930,7 @@
   return NULL;
 }
 
+
 static void
 nat_add_address (void *cls, int add_remove, const struct sockaddr *addr,
                  socklen_t addrlen)
@@ -993,6 +991,7 @@
 
 }
 
+
 static void
 nat_remove_address (void *cls, int add_remove, const struct sockaddr *addr,
                     socklen_t addrlen)
@@ -1044,9 +1043,9 @@
   default:
     return;
   }
-
 }
 
+
 /**
  * Our external IP address/port mapping has changed.
  *
@@ -1079,6 +1078,7 @@
   }
 }
 
+
 void
 http_check_ipv6 (struct Plugin *plugin)
 {
@@ -1112,6 +1112,7 @@
   }
 }
 
+
 int
 http_get_addresses (struct Plugin *plugin, const char *serviceName,
                     const struct GNUNET_CONFIGURATION_Handle *cfg,
@@ -1322,6 +1323,7 @@
   }
 }
 
+
 static void
 stop_report_addresses (struct Plugin *plugin)
 {
@@ -1349,6 +1351,7 @@
   }
 }
 
+
 static int
 configure_plugin (struct Plugin *plugin)
 {
@@ -1504,6 +1507,7 @@
 
 }
 
+
 /**
  * Start session timeout
  */
@@ -1521,6 +1525,7 @@
       s, GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value);
 }
 
+
 /**
  * Increment session timeout due to activity
  */
@@ -1539,6 +1544,7 @@
       s, GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value);
 }
 
+
 /**
  * Cancel timeout
  */

Modified: gnunet/src/transport/plugin_transport_http_client.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_client.c 2012-06-01 14:35:15 UTC 
(rev 21700)
+++ gnunet/src/transport/plugin_transport_http_client.c 2012-06-01 15:01:00 UTC 
(rev 21701)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet
-     (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Christian Grothoff 
(and other contributing authors)
+     (C) 2002--2012 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -55,10 +55,10 @@
     }
 #if BUILD_HTTPS
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-https",
-                     "Client: %X - %s", cls, text);
+                     "Client: %p - %s", cls, text);
 #else
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-http",
-                     "Client: %X - %s", cls, text);
+                     "Client: %p - %s", cls, text);
 #endif
   }
   return 0;
@@ -73,6 +73,7 @@
 static void
 client_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
+
 /**
  * Function setting up file descriptors and scheduling task to run
  *
@@ -99,7 +100,6 @@
     GNUNET_SCHEDULER_cancel (plugin->client_perform_task);
     plugin->client_perform_task = GNUNET_SCHEDULER_NO_TASK;
   }
-
   max = -1;
   FD_ZERO (&rs);
   FD_ZERO (&ws);
@@ -154,24 +154,22 @@
     GNUNET_break (0);
     return GNUNET_SYSERR;
   }
-
   if (s->client_put_paused == GNUNET_YES)
   {
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, s->plugin->name,
-                     "Client: %X was suspended, unpausing\n", s->client_put);
+                     "Client: %p was suspended, unpausing\n", s->client_put);
     s->client_put_paused = GNUNET_NO;
     curl_easy_pause (s->client_put, CURLPAUSE_CONT);
   }
-
   client_schedule (s->plugin, GNUNET_YES);
 
   return GNUNET_OK;
 }
 
 
-
 /**
  * Task performing curl operations
+ *
  * @param cls plugin as closure
  * @param tc gnunet scheduler task context
  */
@@ -228,7 +226,7 @@
       if (msg->msg == CURLMSG_DONE)
       {
         GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
-                         "Client: %X connection to '%s'  %s ended with reason 
%i: `%s'\n",
+                         "Client: %p connection to '%s'  %s ended with reason 
%i: `%s'\n",
                          msg->easy_handle, GNUNET_i2s (&s->target),
                          http_plugin_address_to_string (NULL, s->addr,
                                                         s->addrlen),
@@ -236,7 +234,11 @@
                          curl_easy_strerror (msg->data.result));
 
         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));
+        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));
         notify_session_end (plugin, &s->target, s);
       }
     }
@@ -245,6 +247,7 @@
   client_schedule (plugin, GNUNET_NO);
 }
 
+
 int
 client_disconnect (struct Session *s)
 {
@@ -263,7 +266,7 @@
   if (s->client_put != NULL)
   {
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
-                     "Client: %X Deleting outbound PUT session to peer `%s'\n",
+                     "Client: %p Deleting outbound PUT session to peer `%s'\n",
                      s->client_put, GNUNET_i2s (&s->target));
 
     mret = curl_multi_remove_handle (plugin->client_mh, s->client_put);
@@ -287,7 +290,7 @@
   if (s->client_get != NULL)
   {
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
-                     "Client: %X Deleting outbound GET session to peer `%s'\n",
+                     "Client: %p Deleting outbound GET session to peer `%s'\n",
                      s->client_get, GNUNET_i2s (&s->target));
 
     mret = curl_multi_remove_handle (plugin->client_mh, s->client_get);
@@ -362,6 +365,7 @@
   return GNUNET_OK;
 }
 
+
 static void
 client_wake_up (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
@@ -372,29 +376,26 @@
     GNUNET_break (0);
     return;
   }
-
   s->recv_wakeup_task = GNUNET_SCHEDULER_NO_TASK;
-
   if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
     return;
-
   GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, s->plugin->name,
-                   "Client: %X Waking up receive handle\n", s->client_get);
-
+                   "Client: %p Waking up receive handle\n", s->client_get);
   if (s->client_get != NULL)
     curl_easy_pause (s->client_get, CURLPAUSE_CONT);
-
 }
 
+
 /**
-* Callback method used with libcurl
-* Method is called when libcurl needs to write data during sending
-* @param stream pointer where to write data
-* @param size size of an individual element
-* @param nmemb count of elements that can be written to the buffer
-* @param cls destination pointer, passed to the libcurl handle
-* @return bytes read from stream
-*/
+ * Callback method used with libcurl
+ * Method is called when libcurl needs to write data during sending
+ *
+ * @param stream pointer where to write data
+ * @param size size of an individual element
+ * @param nmemb count of elements that can be written to the buffer
+ * @param cls destination pointer, passed to the libcurl handle
+ * @return bytes read from stream
+ */
 static size_t
 client_receive (void *stream, size_t size, size_t nmemb, void *cls)
 {
@@ -413,7 +414,7 @@
     struct GNUNET_TIME_Relative delta =
         GNUNET_TIME_absolute_get_difference (now, s->next_receive);
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
-                     "Client: %X No inbound bandwidth available! Next read was 
delayed for %llu ms\n",
+                     "Client: %p No inbound bandwidth available! Next read was 
delayed for %llu ms\n",
                      s->client_get, delta.rel_value);
     if (s->recv_wakeup_task != GNUNET_SCHEDULER_NO_TASK)
     {
@@ -424,19 +425,17 @@
         GNUNET_SCHEDULER_add_delayed (delta, &client_wake_up, s);
     return CURLPAUSE_ALL;
   }
-
-
-  if (s->msg_tk == NULL)
+  if (NULL == s->msg_tk)
     s->msg_tk = GNUNET_SERVER_mst_create (&client_receive_mst_cb, s);
-
   GNUNET_SERVER_mst_receive (s->msg_tk, s, stream, len, GNUNET_NO, GNUNET_NO);
-
   return len;
 }
 
+
 /**
  * Callback method used with libcurl
  * Method is called when libcurl needs to read data during sending
+ *
  * @param stream pointer where to write data
  * @param size size of an individual element
  * @param nmemb count of elements that can be written to the buffer
@@ -448,67 +447,46 @@
 {
   struct Session *s = cls;
   struct Plugin *plugin = s->plugin;
+  struct HTTP_Message *msg = s->msg_head;
   size_t bytes_sent = 0;
   size_t len;
 
   if (GNUNET_YES != exist_session(plugin, s))
   {
     GNUNET_break (0);
-    return GNUNET_SYSERR;
+    return 0;
   }
-
-  struct HTTP_Message *msg = s->msg_head;
-
-  if (msg == NULL)
+  if (NULL == msg)
   {
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
-                     "Client: %X Nothing to send! Suspending PUT handle!\n",
+                     "Client: %p Nothing to send! Suspending PUT handle!\n",
                      s->client_put);
     s->client_put_paused = GNUNET_YES;
     return CURL_READFUNC_PAUSE;
   }
-
-  GNUNET_assert (msg != NULL);
   /* data to send */
-  if (msg->pos < msg->size)
-  {
-    /* data fit in buffer */
-    if ((msg->size - msg->pos) <= (size * nmemb))
-    {
-      len = (msg->size - msg->pos);
-      memcpy (stream, &msg->buf[msg->pos], len);
-      msg->pos += len;
-      bytes_sent = len;
-    }
-    else
-    {
-      len = size * nmemb;
-      memcpy (stream, &msg->buf[msg->pos], len);
-      msg->pos += len;
-      bytes_sent = len;
-    }
-  }
-  /* no data to send */
-  else
-  {
-    GNUNET_assert (0);
-    bytes_sent = 0;
-  }
-
+  GNUNET_assert (msg->pos < msg->size);
+  /* calculate how much fits in buffer */
+  bytes_sent = GNUNET_MIN (msg->size - msg->pos,
+                          size * nmemb);
+  memcpy (stream, &msg->buf[msg->pos], len);
+  msg->pos += len;
+  bytes_sent = len;
   if (msg->pos == msg->size)
   {
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
-                     "Client: %X Message with %u bytes sent, removing message 
from queue\n",
+                     "Client: %p Message with %u bytes sent, removing message 
from queue\n",
                      s->client_put, msg->size, msg->pos);
     /* Calling transmit continuation  */
+    GNUNET_CONTAINER_DLL_remove (s->msg_head, s->msg_tail, msg);
     if (NULL != msg->transmit_cont)
       msg->transmit_cont (msg->transmit_cont_cls, &s->target, GNUNET_OK);
-    GNUNET_CONTAINER_DLL_remove (s->msg_head, s->msg_tail, msg);
     GNUNET_free (msg);
   }
   return bytes_sent;
 }
 
+
 int
 client_connect (struct Session *s)
 {
@@ -631,6 +609,7 @@
   return res;
 }
 
+
 int
 client_start (struct Plugin *plugin)
 {
@@ -651,6 +630,7 @@
   return res;
 }
 
+
 void
 client_stop (struct Plugin *plugin)
 {

Modified: gnunet/src/transport/plugin_transport_http_server.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_server.c 2012-06-01 14:35:15 UTC 
(rev 21700)
+++ gnunet/src/transport/plugin_transport_http_server.c 2012-06-01 15:01:00 UTC 
(rev 21701)
@@ -163,10 +163,8 @@
     GNUNET_free_non_null (plugin->cert);
     plugin->cert = NULL;
 
-#if VERBOSE_SERVER
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "No usable TLS certificate found, creating certificate\n");
-#endif
     errno = 0;
     cert_creation =
         GNUNET_OS_start_process (GNUNET_NO, NULL, NULL,
@@ -230,7 +228,6 @@
  * @param now GNUNET_YES to schedule execution immediately, GNUNET_NO to wait
  * until timeout
  */
-
 static void
 server_reschedule (struct Plugin *plugin, struct MHD_Daemon *server, int now)
 {
@@ -302,6 +299,7 @@
   return GNUNET_OK;
 }
 
+
 /**
  * Callback called by MHD when it needs data to send
  * @param cls current session
@@ -314,44 +312,32 @@
 server_send_callback (void *cls, uint64_t pos, char *buf, size_t max)
 {
   struct Session *s = cls;
+  ssize_t bytes_read = 0;
+  struct HTTP_Message *msg;
+
   GNUNET_assert (NULL != p);
   if (GNUNET_NO == exist_session(p, s))
     return 0;
-
-  struct HTTP_Message *msg;
-  int bytes_read = 0;
-
-  //static int c = 0;
   msg = s->msg_head;
-  if (msg != NULL)
+  if (NULL != msg)
   {
     /* sending */
-    if ((msg->size - msg->pos) <= max)
-    {
-      memcpy (buf, &msg->buf[msg->pos], (msg->size - msg->pos));
-      bytes_read = msg->size - msg->pos;
-      msg->pos += (msg->size - msg->pos);
-    }
-    else
-    {
-      memcpy (buf, &msg->buf[msg->pos], max);
-      msg->pos += max;
-      bytes_read = max;
-    }
+    bytes_read = GNUNET_MIN (msg->size - msg->pos,
+                            max);
+    memcpy (buf, &msg->buf[msg->pos], bytes_read);
+    msg->pos += bytes_read;
 
     /* removing message */
     if (msg->pos == msg->size)
     {
+      GNUNET_CONTAINER_DLL_remove (s->msg_head, s->msg_tail, msg);
       if (NULL != msg->transmit_cont)
         msg->transmit_cont (msg->transmit_cont_cls, &s->target, GNUNET_OK);
-      GNUNET_CONTAINER_DLL_remove (s->msg_head, s->msg_tail, msg);
       GNUNET_free (msg);
     }
   }
-
   GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, s->plugin->name,
-                   "Server: %X: sent %u bytes\n", s, bytes_read);
-
+                   "Server: %p: sent %u bytes\n", s, bytes_read);
   return bytes_read;
 }
 
@@ -585,7 +571,7 @@
   int to = (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value / 1000);
 
   GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
-                   "Server: Setting timeout for %X to %u sec.\n", sc, to);
+                   "Server: Setting timeout for %p to %u sec.\n", sc, to);
   MHD_set_connection_option (mhd_connection, MHD_CONNECTION_OPTION_TIMEOUT, 
to);
 
   struct MHD_Daemon *d = NULL;
@@ -707,7 +693,7 @@
       if ((s->next_receive.abs_value <= now.abs_value))
       {
         GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
-                         "Server: %X: PUT with %u bytes forwarded to MST\n", s,
+                         "Server: %p: PUT with %u bytes forwarded to MST\n", s,
                          *upload_data_size);
         if (s->msg_tk == NULL)
         {
@@ -727,7 +713,7 @@
         {
           t = s->server_recv;
           GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
-                           "Server: Setting timeout for %X to %u sec.\n", t,
+                           "Server: Setting timeout for %p to %u sec.\n", t,
                            to);
           MHD_set_connection_option (t->mhd_conn, 
MHD_CONNECTION_OPTION_TIMEOUT,
                                      to);
@@ -736,7 +722,7 @@
         {
           t = s->server_send;
           GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
-                           "Server: Setting timeout for %X to %u sec.\n", t,
+                           "Server: Setting timeout for %p to %u sec.\n", t,
                            to);
           MHD_set_connection_option (t->mhd_conn, 
MHD_CONNECTION_OPTION_TIMEOUT,
                                      to);
@@ -754,7 +740,7 @@
       else
       {
         GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                    "Server: %X no inbound bandwidth available! Next read was 
delayed by %llu ms\n",
+                    "Server: %p no inbound bandwidth available! Next read was 
delayed by %llu ms\n",
                     s, now.abs_value - s->next_receive.abs_value);
       }
       return MHD_YES;
@@ -790,7 +776,7 @@
   {
 
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
-                     "Server: %X peer `%s' GET on address `%s' disconnected\n",
+                     "Server: %p peer `%s' GET on address `%s' disconnected\n",
                      s->server_send, GNUNET_i2s (&s->target),
                      http_plugin_address_to_string (NULL, s->addr, 
s->addrlen));
     s->server_send = NULL;
@@ -807,7 +793,7 @@
   if (sc->direction == _RECEIVE)
   {
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
-                     "Server: %X peer `%s' PUT on address `%s' disconnected\n",
+                     "Server: %p peer `%s' PUT on address `%s' disconnected\n",
                      s->server_recv, GNUNET_i2s (&s->target),
                      http_plugin_address_to_string (NULL, s->addr, 
s->addrlen));
     s->server_recv = NULL;

Modified: gnunet/src/transport/test_transport_api_reliability.c
===================================================================
--- gnunet/src/transport/test_transport_api_reliability.c       2012-06-01 
14:35:15 UTC (rev 21700)
+++ gnunet/src/transport/test_transport_api_reliability.c       2012-06-01 
15:01:00 UTC (rev 21701)
@@ -243,7 +243,7 @@
   if (0 != memcmp (cbuf, &hdr[1], s - sizeof (struct TestMessage)))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Expected message %u with bits %u, but body did not match\n", 
n,
+                "Expected message %u with bits %u, but body did not match at 
position %u\n", n,
                 (unsigned char) n);
     if (die_task != GNUNET_SCHEDULER_NO_TASK)
       GNUNET_SCHEDULER_cancel (die_task);




reply via email to

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