diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-12-11 15:37:48 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-12-11 15:37:48 +0000 |
commit | fde91cf08abfbcc4bb2e366581147d0df385d27d (patch) | |
tree | c6f1d99732357f1efe3d70a30b5761fd797c6380 /src/transport/plugin_transport_http_client.c | |
parent | af395c0e26eaa4af5ba4c41494be3357e61e6179 (diff) | |
download | gnunet-fde91cf08abfbcc4bb2e366581147d0df385d27d.tar.gz gnunet-fde91cf08abfbcc4bb2e366581147d0df385d27d.zip |
use a define as statistic string to be sure to set the same value
Diffstat (limited to 'src/transport/plugin_transport_http_client.c')
-rw-r--r-- | src/transport/plugin_transport_http_client.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c index ba125aaaa..c3a34a3fd 100644 --- a/src/transport/plugin_transport_http_client.c +++ b/src/transport/plugin_transport_http_client.c | |||
@@ -26,10 +26,12 @@ | |||
26 | 26 | ||
27 | #if BUILD_HTTPS | 27 | #if BUILD_HTTPS |
28 | #define PLUGIN_NAME "https_client" | 28 | #define PLUGIN_NAME "https_client" |
29 | #define HTTP_STAT_STR_CONNECTIONS "# HTTPS client connections" | ||
29 | #define LIBGNUNET_PLUGIN_TRANSPORT_INIT libgnunet_plugin_transport_https_client_init | 30 | #define LIBGNUNET_PLUGIN_TRANSPORT_INIT libgnunet_plugin_transport_https_client_init |
30 | #define LIBGNUNET_PLUGIN_TRANSPORT_DONE libgnunet_plugin_transport_https_client_done | 31 | #define LIBGNUNET_PLUGIN_TRANSPORT_DONE libgnunet_plugin_transport_https_client_done |
31 | #else | 32 | #else |
32 | #define PLUGIN_NAME "http_client" | 33 | #define PLUGIN_NAME "http_client" |
34 | #define HTTP_STAT_STR_CONNECTIONS "# HTTP client connections" | ||
33 | #define LIBGNUNET_PLUGIN_TRANSPORT_INIT libgnunet_plugin_transport_http_client_init | 35 | #define LIBGNUNET_PLUGIN_TRANSPORT_INIT libgnunet_plugin_transport_http_client_init |
34 | #define LIBGNUNET_PLUGIN_TRANSPORT_DONE libgnunet_plugin_transport_http_client_done | 36 | #define LIBGNUNET_PLUGIN_TRANSPORT_DONE libgnunet_plugin_transport_http_client_done |
35 | #endif | 37 | #endif |
@@ -697,7 +699,7 @@ client_disconnect (struct Session *s) | |||
697 | GNUNET_assert (plugin->cur_connections >= 2); | 699 | GNUNET_assert (plugin->cur_connections >= 2); |
698 | plugin->cur_connections -= 2; | 700 | plugin->cur_connections -= 2; |
699 | GNUNET_STATISTICS_set (plugin->env->stats, | 701 | GNUNET_STATISTICS_set (plugin->env->stats, |
700 | "# HTTP client sessions", | 702 | HTTP_STAT_STR_CONNECTIONS, |
701 | plugin->cur_connections, | 703 | plugin->cur_connections, |
702 | GNUNET_NO); | 704 | GNUNET_NO); |
703 | 705 | ||
@@ -1428,7 +1430,7 @@ client_connect (struct Session *s) | |||
1428 | /* Perform connect */ | 1430 | /* Perform connect */ |
1429 | plugin->cur_connections += 2; | 1431 | plugin->cur_connections += 2; |
1430 | GNUNET_STATISTICS_set (plugin->env->stats, | 1432 | GNUNET_STATISTICS_set (plugin->env->stats, |
1431 | "# HTTP client connections", | 1433 | HTTP_STAT_STR_CONNECTIONS, |
1432 | plugin->cur_connections, | 1434 | plugin->cur_connections, |
1433 | GNUNET_NO); | 1435 | GNUNET_NO); |
1434 | 1436 | ||