[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r17113 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r17113 - gnunet/src/transport |
Date: |
Thu, 29 Sep 2011 21:33:03 +0200 |
Author: grothoff
Date: 2011-09-29 21:33:03 +0200 (Thu, 29 Sep 2011)
New Revision: 17113
Modified:
gnunet/src/transport/gnunet-service-transport_neighbours.c
Log:
report disconnect reasons in stats
Modified: gnunet/src/transport/gnunet-service-transport_neighbours.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_neighbours.c 2011-09-29
15:04:50 UTC (rev 17112)
+++ gnunet/src/transport/gnunet-service-transport_neighbours.c 2011-09-29
19:33:03 UTC (rev 17113)
@@ -523,6 +523,10 @@
struct NeighbourMapEntry *n = cls;
n->timeout_task = GNUNET_SCHEDULER_NO_TASK;
+ if (GNUNET_YES == n->is_connected)
+ GNUNET_STATISTICS_update (GST_stats,
+ gettext_noop ("# peers disconnected due to
timeout"), 1,
+ GNUNET_NO);
disconnect_neighbour (n);
}
@@ -543,6 +547,10 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting peer `%4s', %s\n",
GNUNET_i2s (&n->id), "SHUTDOWN_TASK");
#endif
+ if (GNUNET_YES == n->is_connected)
+ GNUNET_STATISTICS_update (GST_stats,
+ gettext_noop ("# peers disconnected due to global
disconnect"), 1,
+ GNUNET_NO);
disconnect_neighbour (n);
return GNUNET_OK;
}
@@ -1022,9 +1030,10 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting peer `%4s' due to
`%s'\n",
GNUNET_i2s (&n->id), "SET_QUOTA");
#endif
- GNUNET_STATISTICS_update (GST_stats,
- gettext_noop ("# disconnects due to quota of 0"),
1,
- GNUNET_NO);
+ if (GNUNET_YES == n->is_connected)
+ GNUNET_STATISTICS_update (GST_stats,
+ gettext_noop ("# disconnects due to quota of 0"),
1,
+ GNUNET_NO);
disconnect_neighbour (n);
}
@@ -1126,6 +1135,9 @@
UINT32_MAX /* priority */ ,
GNUNET_TIME_UNIT_FOREVER_REL, n->session, n->addr,
n->addrlen,
GNUNET_YES, NULL, NULL);
+ GNUNET_STATISTICS_update (GST_stats,
+ gettext_noop ("# peers disconnected due to
external request"), 1,
+ GNUNET_NO);
}
disconnect_neighbour (n);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r17113 - gnunet/src/transport,
gnunet <=