gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r10597 - gnunet/src/transport
Date: Mon, 15 Mar 2010 10:55:55 +0100

Author: grothoff
Date: 2010-03-15 10:55:55 +0100 (Mon, 15 Mar 2010)
New Revision: 10597

Modified:
   gnunet/src/transport/plugin_transport_tcp.c
Log:
more stats

Modified: gnunet/src/transport/plugin_transport_tcp.c
===================================================================
--- gnunet/src/transport/plugin_transport_tcp.c 2010-03-15 09:47:29 UTC (rev 
10596)
+++ gnunet/src/transport/plugin_transport_tcp.c 2010-03-15 09:55:55 UTC (rev 
10597)
@@ -369,6 +369,10 @@
                           pm->message_size,
                            GNUNET_i2s (&session->target));
 #endif
+         GNUNET_STATISTICS_update (session->plugin->env->stats,
+                                   gettext_noop ("# bytes discarded by TCP 
(timeout)"),
+                                   pm->message_size,
+                                   GNUNET_NO);      
           if (pm->transmit_cont != NULL)
             pm->transmit_cont (pm->transmit_cont_cls,
                                &session->target, GNUNET_SYSERR);
@@ -583,6 +587,10 @@
   struct GNUNET_CONNECTION_Handle *sa;
   int af;
 
+  GNUNET_STATISTICS_update (plugin->env->stats,
+                           gettext_noop ("# bytes TCP was asked to transmit"),
+                           msgbuf_size,
+                           GNUNET_NO);      
   session = plugin->sessions;
   /* FIXME: we could do this a cheaper with a hash table
      where we could restrict the iteration to entries that match
@@ -607,6 +615,10 @@
                        "Asked to transmit to `%4s' without address and I have 
no existing connection (failing).\n",
                        GNUNET_i2s (target));
 #endif
+      GNUNET_STATISTICS_update (plugin->env->stats,
+                               gettext_noop ("# bytes discarded by TCP (no 
address and no connection)"),
+                               msgbuf_size,
+                               GNUNET_NO);      
       return -1;
     }
   if (session == NULL)
@@ -632,6 +644,10 @@
                           GNUNET_i2s (target),
                           GNUNET_a2s (addr, addrlen));
 #endif
+         GNUNET_STATISTICS_update (plugin->env->stats,
+                                   gettext_noop ("# bytes discarded by TCP 
(failed to connect)"),
+                                   msgbuf_size,
+                                   GNUNET_NO);      
          return -1;
        }
 





reply via email to

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