[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r29993 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r29993 - gnunet/src/mesh |
Date: |
Tue, 8 Oct 2013 16:06:30 +0200 |
Author: bartpolot
Date: 2013-10-08 16:06:30 +0200 (Tue, 08 Oct 2013)
New Revision: 29993
Modified:
gnunet/src/mesh/gnunet-service-mesh-enc.c
gnunet/src/mesh/gnunet-service-mesh_channel.c
gnunet/src/mesh/gnunet-service-mesh_connection.c
gnunet/src/mesh/gnunet-service-mesh_dht.c
gnunet/src/mesh/gnunet-service-mesh_local.c
gnunet/src/mesh/gnunet-service-mesh_peer.c
gnunet/src/mesh/gnunet-service-mesh_tunnel.c
Log:
- share one statistics handle across all subsystems
Modified: gnunet/src/mesh/gnunet-service-mesh-enc.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh-enc.c 2013-10-08 13:57:02 UTC (rev
29992)
+++ gnunet/src/mesh/gnunet-service-mesh-enc.c 2013-10-08 14:06:30 UTC (rev
29993)
@@ -72,17 +72,15 @@
/*********************** GLOBAL VARIABLES
****************************/
/******************************************************************************/
-/************************** Configuration parameters
**************************/
+/****************************** Global variables
******************************/
-
-
-/*************************** Static global variables
**************************/
-
/**
* Handle to the statistics service.
*/
-static struct GNUNET_STATISTICS_Handle *stats;
+struct GNUNET_STATISTICS_Handle *stats;
+/*************************** Static global variables
**************************/
+
/**
* Local peer own ID (memory efficient handle).
*/
Modified: gnunet/src/mesh/gnunet-service-mesh_channel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_channel.c 2013-10-08 13:57:02 UTC
(rev 29992)
+++ gnunet/src/mesh/gnunet-service-mesh_channel.c 2013-10-08 14:06:30 UTC
(rev 29993)
@@ -20,8 +20,13 @@
#include "platform.h"
+#include "gnunet_util_lib.h"
+
+#include "gnunet_statistics_service.h"
+
#include "mesh_enc.h"
#include "mesh_protocol_enc.h"
+
#include "gnunet-service-mesh_channel.h"
#include "gnunet-service-mesh_local.h"
#include "gnunet-service-mesh_tunnel.h"
@@ -245,7 +250,21 @@
};
+/******************************************************************************/
+/******************************* GLOBALS
***********************************/
+/******************************************************************************/
+
/**
+ * Global handle to the statistics service.
+ */
+extern struct GNUNET_STATISTICS_Handle *stats;
+
+
+/******************************************************************************/
+/******************************** STATIC
***********************************/
+/******************************************************************************/
+
+/**
* We have received a message out of order, or the client is not ready.
* Buffer it until we receive an ACK from the client or the missing
* message from the channel.
@@ -1177,6 +1196,10 @@
}
+/******************************************************************************/
+/******************************** API
***********************************/
+/******************************************************************************/
+
/**
* Count channels in a DLL.
*
Modified: gnunet/src/mesh/gnunet-service-mesh_connection.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_connection.c 2013-10-08 13:57:02 UTC
(rev 29992)
+++ gnunet/src/mesh/gnunet-service-mesh_connection.c 2013-10-08 14:06:30 UTC
(rev 29993)
@@ -27,6 +27,8 @@
#include "platform.h"
#include "gnunet_util_lib.h"
+#include "gnunet_statistics_service.h"
+
#include "gnunet-service-mesh_connection.h"
#include "gnunet-service-mesh_peer.h"
#include "mesh_protocol_enc.h"
@@ -68,6 +70,9 @@
};
+/******************************************************************************/
+/******************************** STRUCTS
**********************************/
+/******************************************************************************/
/**
* Struct containing info about a queued transmission to this peer
@@ -248,8 +253,16 @@
int destroy;
};
+/******************************************************************************/
+/******************************* GLOBALS
***********************************/
+/******************************************************************************/
/**
+ * Global handle to the statistics service.
+ */
+extern struct GNUNET_STATISTICS_Handle *stats;
+
+/**
* Connections known, indexed by cid (MeshConnection).
*/
static struct GNUNET_CONTAINER_MultiHashMap *connections;
@@ -272,6 +285,10 @@
static struct GNUNET_TIME_Relative refresh_connection_time;
+/******************************************************************************/
+/******************************** STATIC
***********************************/
+/******************************************************************************/
+
#if 0 // avoid compiler warning for unused static function
static void
fc_debug (struct MeshFlowControl *fc)
@@ -1014,6 +1031,10 @@
}
+/******************************************************************************/
+/******************************** API
***********************************/
+/******************************************************************************/
+
/**
* Core handler for connection creation.
*
Modified: gnunet/src/mesh/gnunet-service-mesh_dht.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_dht.c 2013-10-08 13:57:02 UTC (rev
29992)
+++ gnunet/src/mesh/gnunet-service-mesh_dht.c 2013-10-08 14:06:30 UTC (rev
29993)
@@ -23,6 +23,7 @@
#include "gnunet_util_lib.h"
#include "gnunet_dht_service.h"
+#include "gnunet_statistics_service.h"
#include "mesh_path.h"
#include "gnunet-service-mesh_dht.h"
@@ -56,6 +57,11 @@
/******************************************************************************/
/**
+ * Global handle to the statistics service.
+ */
+extern struct GNUNET_STATISTICS_Handle *stats;
+
+/**
* Handle to use DHT.
*/
static struct GNUNET_DHT_Handle *dht_handle;
Modified: gnunet/src/mesh/gnunet-service-mesh_local.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_local.c 2013-10-08 13:57:02 UTC (rev
29992)
+++ gnunet/src/mesh/gnunet-service-mesh_local.c 2013-10-08 14:06:30 UTC (rev
29993)
@@ -20,6 +20,10 @@
#include "platform.h"
+#include "gnunet_util_lib.h"
+
+#include "gnunet_statistics_service.h"
+
#include "mesh_enc.h"
#include "mesh_protocol_enc.h" // GNUNET_MESH_Data is shared
@@ -87,6 +91,11 @@
/******************************************************************************/
/**
+ * Global handle to the statistics service.
+ */
+extern struct GNUNET_STATISTICS_Handle *stats;
+
+/**
* Handle to server lib.
*/
static struct GNUNET_SERVER_Handle *server_handle;
Modified: gnunet/src/mesh/gnunet-service-mesh_peer.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_peer.c 2013-10-08 13:57:02 UTC (rev
29992)
+++ gnunet/src/mesh/gnunet-service-mesh_peer.c 2013-10-08 14:06:30 UTC (rev
29993)
@@ -23,6 +23,7 @@
#include "gnunet_util_lib.h"
#include "gnunet_core_service.h"
+#include "gnunet_statistics_service.h"
#include "mesh_protocol_enc.h"
@@ -106,6 +107,11 @@
/******************************************************************************/
/**
+ * Global handle to the statistics service.
+ */
+extern struct GNUNET_STATISTICS_Handle *stats;
+
+/**
* Peers known, indexed by PeerIdentity (MeshPeer).
*/
static struct GNUNET_CONTAINER_MultiPeerMap *peers;
Modified: gnunet/src/mesh/gnunet-service-mesh_tunnel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2013-10-08 13:57:02 UTC
(rev 29992)
+++ gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2013-10-08 14:06:30 UTC
(rev 29993)
@@ -21,6 +21,8 @@
#include "platform.h"
#include "gnunet_util_lib.h"
+#include "gnunet_statistics_service.h"
+
#include "mesh_protocol_enc.h"
#include "gnunet-service-mesh_tunnel.h"
@@ -180,6 +182,11 @@
/******************************************************************************/
/**
+ * Global handle to the statistics service.
+ */
+extern struct GNUNET_STATISTICS_Handle *stats;
+
+/**
* Default TTL for payload packets.
*/
static unsigned long long default_ttl;
@@ -204,7 +211,6 @@
/******************************** STATIC
***********************************/
/******************************************************************************/
-
/**
* Get string description for tunnel state.
*
@@ -366,6 +372,10 @@
}
+/******************************************************************************/
+/******************************** API
***********************************/
+/******************************************************************************/
+
/**
* Cache a message to be sent once tunnel is online.
*
@@ -394,11 +404,6 @@
}
-
-/******************************************************************************/
-/******************************** API
***********************************/
-/******************************************************************************/
-
/**
* Initialize the tunnel subsystem.
*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r29993 - gnunet/src/mesh,
gnunet <=