[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r19160 - in gnunet/src: exit vpn
From: |
gnunet |
Subject: |
[GNUnet-SVN] r19160 - in gnunet/src: exit vpn |
Date: |
Sun, 15 Jan 2012 17:35:44 +0100 |
Author: grothoff
Date: 2012-01-15 17:35:44 +0100 (Sun, 15 Jan 2012)
New Revision: 19160
Modified:
gnunet/src/exit/gnunet-daemon-exit.c
gnunet/src/vpn/gnunet-service-vpn.c
Log:
-basic setup/tear down for statistics in mesh/vpn
Modified: gnunet/src/exit/gnunet-daemon-exit.c
===================================================================
--- gnunet/src/exit/gnunet-daemon-exit.c 2012-01-15 16:29:36 UTC (rev
19159)
+++ gnunet/src/exit/gnunet-daemon-exit.c 2012-01-15 16:35:44 UTC (rev
19160)
@@ -43,6 +43,7 @@
#include "gnunet_protocols.h"
#include "gnunet_applications.h"
#include "gnunet_mesh_service.h"
+#include "gnunet_statistics_service.h"
#include "gnunet_constants.h"
#include "tcpip_tun.h"
#include "exit.h"
@@ -243,6 +244,11 @@
static unsigned long long ipv6prefix;
/**
+ * Statistics.
+ */
+static struct GNUNET_STATISTICS_Handle *stats;
+
+/**
* The handle to mesh
*/
static struct GNUNET_MESH_Handle *mesh_handle;
@@ -1878,6 +1884,11 @@
GNUNET_CONTAINER_multihashmap_destroy (udp_services);
udp_services = NULL;
}
+ if (stats != NULL)
+ {
+ GNUNET_STATISTICS_destroy (stats, GNUNET_YES);
+ stats = NULL;
+ }
for (i=0;i<5;i++)
GNUNET_free_non_null (exit_argv[i]);
}
@@ -2072,6 +2083,7 @@
struct in6_addr v6;
cfg = cfg_;
+ stats = GNUNET_STATISTICS_create ("exit", cfg);
ipv4_exit = GNUNET_CONFIGURATION_get_value_yesno (cfg, "exit", "EXIT_IPV4");
ipv6_exit = GNUNET_CONFIGURATION_get_value_yesno (cfg, "exit", "EXIT_IPV6");
ipv4_enabled = GNUNET_CONFIGURATION_get_value_yesno (cfg, "exit",
"ENABLE_IPV4");
Modified: gnunet/src/vpn/gnunet-service-vpn.c
===================================================================
--- gnunet/src/vpn/gnunet-service-vpn.c 2012-01-15 16:29:36 UTC (rev 19159)
+++ gnunet/src/vpn/gnunet-service-vpn.c 2012-01-15 16:35:44 UTC (rev 19160)
@@ -46,6 +46,7 @@
#include "gnunet_protocols.h"
#include "gnunet_applications.h"
#include "gnunet_mesh_service.h"
+#include "gnunet_statistics_service.h"
#include "gnunet_constants.h"
#include "tcpip_tun.h"
#include "vpn.h"
@@ -314,6 +315,11 @@
static struct GNUNET_CONTAINER_Heap *tunnel_heap;
/**
+ * Statistics.
+ */
+static struct GNUNET_STATISTICS_Handle *stats;
+
+/**
* The handle to the VPN helper process "gnunet-helper-vpn".
*/
static struct GNUNET_HELPER_Handle *helper_handle;
@@ -2119,6 +2125,11 @@
GNUNET_SERVER_notification_context_destroy (nc);
nc = NULL;
}
+ if (stats != NULL)
+ {
+ GNUNET_STATISTICS_destroy (stats, GNUNET_YES);
+ stats = NULL;
+ }
for (i=0;i<5;i++)
GNUNET_free_non_null (vpn_argv[i]);
}
@@ -2237,6 +2248,7 @@
struct in6_addr v6;
cfg = cfg_;
+ stats = GNUNET_STATISTICS_create ("vpn", cfg);
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_number (cfg, "vpn", "MAX_MAPPING",
&max_destination_mappings))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r19160 - in gnunet/src: exit vpn,
gnunet <=