aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-05-04 12:36:12 +0000
committerNathan S. Evans <evans@in.tum.de>2010-05-04 12:36:12 +0000
commit258667cf7131a7a710965d1220604a185a07fb3b (patch)
treed123f5abff4b63f8330a92a5927f7f394912d230 /src
parent3d8988d8bda24d394d72302cefd0d7d76336d068 (diff)
downloadgnunet-258667cf7131a7a710965d1220604a185a07fb3b.tar.gz
gnunet-258667cf7131a7a710965d1220604a185a07fb3b.zip
get rid of duplicate statistics handle in each plugin
Diffstat (limited to 'src')
-rw-r--r--src/transport/plugin_transport_tcp.c6
-rw-r--r--src/transport/plugin_transport_template.c6
-rw-r--r--src/transport/plugin_transport_udp.c6
-rw-r--r--src/transport/plugin_transport_udp_nat.c6
4 files changed, 0 insertions, 24 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index d4212631a..e0e2b04f8 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -254,11 +254,6 @@ struct Plugin
254 struct Session *sessions; 254 struct Session *sessions;
255 255
256 /** 256 /**
257 * Handle for the statistics service.
258 */
259 struct GNUNET_STATISTICS_Handle *statistics;
260
261 /**
262 * Handle to the network service. 257 * Handle to the network service.
263 */ 258 */
264 struct GNUNET_SERVICE_Context *service; 259 struct GNUNET_SERVICE_Context *service;
@@ -1552,7 +1547,6 @@ libgnunet_plugin_transport_tcp_init (void *cls)
1552 plugin->adv_port = aport; 1547 plugin->adv_port = aport;
1553 plugin->env = env; 1548 plugin->env = env;
1554 plugin->lsock = NULL; 1549 plugin->lsock = NULL;
1555 plugin->statistics = NULL;
1556 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions)); 1550 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions));
1557 api->cls = plugin; 1551 api->cls = plugin;
1558 api->send = &tcp_plugin_send; 1552 api->send = &tcp_plugin_send;
diff --git a/src/transport/plugin_transport_template.c b/src/transport/plugin_transport_template.c
index f83329ffa..f5eec84d3 100644
--- a/src/transport/plugin_transport_template.c
+++ b/src/transport/plugin_transport_template.c
@@ -122,11 +122,6 @@ struct Plugin
122 */ 122 */
123 struct Session *sessions; 123 struct Session *sessions;
124 124
125 /**
126 * Handle for the statistics service.
127 */
128 struct GNUNET_STATISTICS_Handle *statistics;
129
130}; 125};
131 126
132/** 127/**
@@ -282,7 +277,6 @@ gnunet_plugin_transport_template_init (void *cls)
282 277
283 plugin = GNUNET_malloc (sizeof (struct Plugin)); 278 plugin = GNUNET_malloc (sizeof (struct Plugin));
284 plugin->env = env; 279 plugin->env = env;
285 plugin->statistics = NULL;
286 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions)); 280 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions));
287 api->cls = plugin; 281 api->cls = plugin;
288 api->send = &template_plugin_send; 282 api->send = &template_plugin_send;
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 689d75b74..5a5492858 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -140,11 +140,6 @@ struct Plugin
140 struct GNUNET_TRANSPORT_PluginEnvironment *env; 140 struct GNUNET_TRANSPORT_PluginEnvironment *env;
141 141
142 /** 142 /**
143 * Handle for the statistics service.
144 */
145 struct GNUNET_STATISTICS_Handle *statistics;
146
147 /**
148 * Handle to the network service. 143 * Handle to the network service.
149 */ 144 */
150 struct GNUNET_SERVICE_Context *service; 145 struct GNUNET_SERVICE_Context *service;
@@ -945,7 +940,6 @@ libgnunet_plugin_transport_udp_init (void *cls)
945 plugin->open_port = bport; 940 plugin->open_port = bport;
946 plugin->adv_port = aport; 941 plugin->adv_port = aport;
947 plugin->env = env; 942 plugin->env = env;
948 plugin->statistics = NULL;
949 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions)); 943 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions));
950 api->cls = plugin; 944 api->cls = plugin;
951 945
diff --git a/src/transport/plugin_transport_udp_nat.c b/src/transport/plugin_transport_udp_nat.c
index 531f2ae10..a48e958ba 100644
--- a/src/transport/plugin_transport_udp_nat.c
+++ b/src/transport/plugin_transport_udp_nat.c
@@ -298,11 +298,6 @@ struct Plugin
298 struct GNUNET_TRANSPORT_PluginEnvironment *env; 298 struct GNUNET_TRANSPORT_PluginEnvironment *env;
299 299
300 /** 300 /**
301 * Handle for the statistics service.
302 */
303 struct GNUNET_STATISTICS_Handle *statistics;
304
305 /**
306 * Handle to the network service. 301 * Handle to the network service.
307 */ 302 */
308 struct GNUNET_SERVICE_Context *service; 303 struct GNUNET_SERVICE_Context *service;
@@ -1697,7 +1692,6 @@ libgnunet_plugin_transport_udp_nat_init (void *cls)
1697 plugin->num_ports = UDP_NAT_LISTEN_PORTS; 1692 plugin->num_ports = UDP_NAT_LISTEN_PORTS;
1698 1693
1699 plugin->env = env; 1694 plugin->env = env;
1700 plugin->statistics = NULL;
1701 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions)); 1695 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions));
1702 api->cls = plugin; 1696 api->cls = plugin;
1703 1697