diff options
author | Nathan S. Evans <evans@in.tum.de> | 2011-04-11 12:44:39 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2011-04-11 12:44:39 +0000 |
commit | 61c63cf390a7d467f43eb66d1dbee448d8679526 (patch) | |
tree | c670044b7dd664bad385e1ba20f80796986f9ae0 /src/dht | |
parent | 280bd10a5538d931c7167d6ab5d79169b5c6cb00 (diff) | |
download | gnunet-61c63cf390a7d467f43eb66d1dbee448d8679526.tar.gz gnunet-61c63cf390a7d467f43eb66d1dbee448d8679526.zip |
cast issues
Diffstat (limited to 'src/dht')
-rw-r--r-- | src/dht/gnunet-dht-driver.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/dht/gnunet-dht-driver.c b/src/dht/gnunet-dht-driver.c index bd12169cb..c09ac9ad0 100644 --- a/src/dht/gnunet-dht-driver.c +++ b/src/dht/gnunet-dht-driver.c | |||
@@ -2954,10 +2954,10 @@ topology_callback(void *cls, const struct GNUNET_PeerIdentity *first, | |||
2954 | unsigned long long total_duration; | 2954 | unsigned long long total_duration; |
2955 | unsigned int new_connections; | 2955 | unsigned int new_connections; |
2956 | unsigned int new_failed_connections; | 2956 | unsigned int new_failed_connections; |
2957 | double conns_per_sec_recent; | 2957 | long double conns_per_sec_recent; |
2958 | double conns_per_sec_total; | 2958 | long double conns_per_sec_total; |
2959 | double failed_conns_per_sec_recent; | 2959 | long double failed_conns_per_sec_recent; |
2960 | double failed_conns_per_sec_total; | 2960 | long double failed_conns_per_sec_total; |
2961 | char *temp_conn_string; | 2961 | char *temp_conn_string; |
2962 | char *temp_conn_failed_string; | 2962 | char *temp_conn_failed_string; |
2963 | char *revision_str; | 2963 | char *revision_str; |
@@ -3009,10 +3009,10 @@ topology_callback(void *cls, const struct GNUNET_PeerIdentity *first, | |||
3009 | GNUNET_TIME_absolute_get ()).rel_value | 3009 | GNUNET_TIME_absolute_get ()).rel_value |
3010 | / 1000; | 3010 | / 1000; |
3011 | 3011 | ||
3012 | failed_conns_per_sec_recent = (double) new_failed_connections / duration; | 3012 | failed_conns_per_sec_recent = (long double) new_failed_connections / duration; |
3013 | failed_conns_per_sec_total = (double) failed_connections / total_duration; | 3013 | failed_conns_per_sec_total = (long double) failed_connections / total_duration; |
3014 | conns_per_sec_recent = (double) new_connections / duration; | 3014 | conns_per_sec_recent = (long double) new_connections / duration; |
3015 | conns_per_sec_total = (double) total_connections / total_duration; | 3015 | conns_per_sec_total = (long double) total_connections / total_duration; |
3016 | GNUNET_log ( | 3016 | GNUNET_log ( |
3017 | GNUNET_ERROR_TYPE_WARNING, | 3017 | GNUNET_ERROR_TYPE_WARNING, |
3018 | "Recent: %.2f/s, Total: %.2f/s, Recent failed: %.2f/s, total failed %.2f/s\n", | 3018 | "Recent: %.2f/s, Total: %.2f/s, Recent failed: %.2f/s, total failed %.2f/s\n", |
@@ -3095,8 +3095,8 @@ topology_callback(void *cls, const struct GNUNET_PeerIdentity *first, | |||
3095 | = GNUNET_TIME_absolute_get_difference (connect_start_time, | 3095 | = GNUNET_TIME_absolute_get_difference (connect_start_time, |
3096 | GNUNET_TIME_absolute_get ()).rel_value | 3096 | GNUNET_TIME_absolute_get ()).rel_value |
3097 | / 1000; | 3097 | / 1000; |
3098 | failed_conns_per_sec_total = (double) failed_connections / total_duration; | 3098 | failed_conns_per_sec_total = (long double) failed_connections / total_duration; |
3099 | conns_per_sec_total = (double) total_connections / total_duration; | 3099 | conns_per_sec_total = (long double) total_connections / total_duration; |
3100 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 3100 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
3101 | "Overall connection info --- Total: %u, Total Failed %u/s\n", | 3101 | "Overall connection info --- Total: %u, Total Failed %u/s\n", |
3102 | total_connections, failed_connections); | 3102 | total_connections, failed_connections); |
@@ -3114,9 +3114,9 @@ topology_callback(void *cls, const struct GNUNET_PeerIdentity *first, | |||
3114 | GNUNET_asprintf (&revision_str, "%llu", revision); | 3114 | GNUNET_asprintf (&revision_str, "%llu", revision); |
3115 | 3115 | ||
3116 | if (GNUNET_YES == insert_gauger_data) | 3116 | if (GNUNET_YES == insert_gauger_data) |
3117 | GAUGER_ID("DHT_TESTING", temp_conn_string, conns_per_sec_total, "conns/s", revision_str); | 3117 | GAUGER_ID("DHT_TESTING", temp_conn_string, (float)conns_per_sec_total, "conns/s", revision_str); |
3118 | if (GNUNET_YES == insert_gauger_data) | 3118 | if (GNUNET_YES == insert_gauger_data) |
3119 | GAUGER_ID("DHT_TESTING", temp_conn_failed_string, failed_conns_per_sec_total, "failed_conns", revision_str); | 3119 | GAUGER_ID("DHT_TESTING", temp_conn_failed_string, (float)failed_conns_per_sec_total, "failed_conns", revision_str); |
3120 | 3120 | ||
3121 | GNUNET_free(temp_conn_string); | 3121 | GNUNET_free(temp_conn_string); |
3122 | GNUNET_free(temp_conn_failed_string); | 3122 | GNUNET_free(temp_conn_failed_string); |