gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r24485 - gnunet/src/transport
Date: Tue, 23 Oct 2012 17:01:43 +0200

Author: wachs
Date: 2012-10-23 17:01:43 +0200 (Tue, 23 Oct 2012)
New Revision: 24485

Modified:
   gnunet/src/transport/plugin_transport_udp.c
   gnunet/src/transport/template_cfg_peer1.conf
   gnunet/src/transport/template_cfg_peer2.conf
Log:
- fix

Modified: gnunet/src/transport/plugin_transport_udp.c
===================================================================
--- gnunet/src/transport/plugin_transport_udp.c 2012-10-23 15:00:15 UTC (rev 
24484)
+++ gnunet/src/transport/plugin_transport_udp.c 2012-10-23 15:01:43 UTC (rev 
24485)
@@ -717,7 +717,6 @@
 call_continuation (struct UDP_MessageWrapper *udpw, int result)
 {
   size_t overhead;
-  struct UDP_MessageWrapper dummy;
 
   LOG (GNUNET_ERROR_TYPE_DEBUG,
       "Calling continuation for %u byte message to `%s' with result %s\n",
@@ -860,15 +859,6 @@
           GNUNET_STATISTICS_update (plugin->env->stats,
                                     "# UDP, fragmented msgs, fragments bytes, 
sent, failure",
                                     udpw->msg_size, GNUNET_NO);
-
-          dummy.msg_type = MSG_FRAGMENTED_COMPLETE;
-          dummy.msg_buf = NULL;
-          dummy.msg_size = udpw->frag_ctx->on_wire_size;
-          dummy.payload_size = udpw->frag_ctx->payload_size;
-          dummy.frag_ctx = udpw->frag_ctx;
-          dummy.session = udpw->session;
-          call_continuation (&dummy, GNUNET_SYSERR);
-
           break;
         case MSG_ACK:
           /* ACK message: failed to send */
@@ -1977,9 +1967,6 @@
                  char *addr,
                  socklen_t fromlen)
 {
-  struct UDP_MessageWrapper dummy;
-  struct UDP_MessageWrapper *udpw;
-  struct UDP_MessageWrapper *tmp;
   const struct GNUNET_MessageHeader *ack;
   const struct UDP_ACK_Message *udp_ack;
   struct LookupContext l_ctx;
@@ -2202,19 +2189,31 @@
     if (GNUNET_TIME_UNIT_ZERO.rel_value == remaining.rel_value)
     {
       /* Message timed out */
-      call_continuation (udpw, GNUNET_SYSERR);
       switch (udpw->msg_type) {
         case MSG_UNFRAGMENTED:
+          GNUNET_STATISTICS_update (plugin->env->stats,
+                                    "# UDP, total, bytes, sent, timeout",
+                                    udpw->msg_size, GNUNET_NO);
+          GNUNET_STATISTICS_update (plugin->env->stats,
+                                    "# UDP, total, messages, sent, timeout",
+                                    1, GNUNET_NO);
           /* Not fragmented message */
           LOG (GNUNET_ERROR_TYPE_DEBUG,
                "Message for peer `%s' with size %u timed out\n",
                GNUNET_i2s(&udpw->session->target), udpw->payload_size);
+          call_continuation (udpw, GNUNET_SYSERR);
           /* Remove message */
           dequeue (plugin, udpw);
           GNUNET_free (udpw);
           break;
         case MSG_FRAGMENTED:
           /* Fragmented message */
+          GNUNET_STATISTICS_update (plugin->env->stats,
+                                    "# UDP, total, bytes, sent, timeout",
+                                    udpw->frag_ctx->on_wire_size, GNUNET_NO);
+          GNUNET_STATISTICS_update (plugin->env->stats,
+                                    "# UDP, total, messages, sent, timeout",
+                                    1, GNUNET_NO);
           call_continuation (udpw, GNUNET_SYSERR);
           LOG (GNUNET_ERROR_TYPE_DEBUG,
                "Fragment for message for peer `%s' with size %u timed out\n",
@@ -2224,9 +2223,16 @@
           fragmented_message_done (udpw->frag_ctx, GNUNET_SYSERR);
           break;
         case MSG_ACK:
+          GNUNET_STATISTICS_update (plugin->env->stats,
+                                    "# UDP, total, bytes, sent, timeout",
+                                    udpw->msg_size, GNUNET_NO);
+          GNUNET_STATISTICS_update (plugin->env->stats,
+                                    "# UDP, total, messages, sent, timeout",
+                                    1, GNUNET_NO);
           LOG (GNUNET_ERROR_TYPE_DEBUG,
                "ACK Message for peer `%s' with size %u timed out\n",
                GNUNET_i2s(&udpw->session->target), udpw->payload_size);
+          call_continuation (udpw, GNUNET_SYSERR);
           dequeue (plugin, udpw);
           GNUNET_free (udpw);
           break;

Modified: gnunet/src/transport/template_cfg_peer1.conf
===================================================================
--- gnunet/src/transport/template_cfg_peer1.conf        2012-10-23 15:00:15 UTC 
(rev 24484)
+++ gnunet/src/transport/template_cfg_peer1.conf        2012-10-23 15:01:43 UTC 
(rev 24485)
@@ -37,7 +37,7 @@
 UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock
 
 [transport]
-#PREFIX = valgrind --leak-check=full
+PREFIX = valgrind --leak-check=full
 PORT = 12001
 #DEBUG = YES
 UNIXPATH = /tmp/gnunet-p1-service-transport.sock

Modified: gnunet/src/transport/template_cfg_peer2.conf
===================================================================
--- gnunet/src/transport/template_cfg_peer2.conf        2012-10-23 15:00:15 UTC 
(rev 24484)
+++ gnunet/src/transport/template_cfg_peer2.conf        2012-10-23 15:01:43 UTC 
(rev 24485)
@@ -38,7 +38,7 @@
 TRUST = $SERVICEHOME/data/credit/
 
 [transport]
-#PREFIX = valgrind --leak-check=full
+PREFIX = valgrind --leak-check=full
 PORT = 12010
 UNIXPATH = /tmp/gnunet-p2-service-transport.sock
 




reply via email to

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