diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-01 12:28:08 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-01 12:28:08 +0000 |
commit | 9adf180a551d2e4c4cc9bb0932a9f3990b8a1704 (patch) | |
tree | 19594ee8d5df211e06d1fb9bf9671410660c791d /src/conversation/gnunet-service-conversation.c | |
parent | 3ad907429a4674efe707811c9f03281db388d73a (diff) | |
download | gnunet-9adf180a551d2e4c4cc9bb0932a9f3990b8a1704.tar.gz gnunet-9adf180a551d2e4c4cc9bb0932a9f3990b8a1704.zip |
-fixing misc FTBFS issues
Diffstat (limited to 'src/conversation/gnunet-service-conversation.c')
-rw-r--r-- | src/conversation/gnunet-service-conversation.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/src/conversation/gnunet-service-conversation.c b/src/conversation/gnunet-service-conversation.c index 9b9b4f316..181ba8351 100644 --- a/src/conversation/gnunet-service-conversation.c +++ b/src/conversation/gnunet-service-conversation.c | |||
@@ -174,18 +174,26 @@ show_end_data (void) | |||
174 | end_time = GNUNET_TIME_absolute_get (); | 174 | end_time = GNUNET_TIME_absolute_get (); |
175 | total_time = GNUNET_TIME_absolute_get_difference (start_time, end_time); | 175 | total_time = GNUNET_TIME_absolute_get_difference (start_time, end_time); |
176 | FPRINTF (stderr, "\nResults of send\n"); | 176 | FPRINTF (stderr, "\nResults of send\n"); |
177 | FPRINTF (stderr, "Test time %llu ms\n", | 177 | FPRINTF (stderr, "Test time %s\n", |
178 | (unsigned long long) total_time.rel_value); | 178 | GNUNET_STRINGS_relative_time_to_string (total_time, |
179 | FPRINTF (stderr, "Test total packets: %d\n", data_sent); | 179 | GNUNET_NO)); |
180 | FPRINTF (stderr, "Test bandwidth: %f kb/s\n", data_sent_size * 1.0 / total_time.rel_value); // 4bytes * ms | 180 | FPRINTF (stderr, "Test total packets: %d\n", |
181 | FPRINTF (stderr, "Test throughput: %f packets/s\n\n", data_sent * 1000.0 / total_time.rel_value); // packets * ms | 181 | data_sent); |
182 | FPRINTF (stderr, "Test bandwidth: %f kb/s\n", | ||
183 | data_sent_size * 1000.0 / (total_time.rel_value_us + 1)); // 4bytes * us | ||
184 | FPRINTF (stderr, "Test throughput: %f packets/s\n\n", | ||
185 | data_sent * 1000000.0 / (total_time.rel_value_us + 1)); // packets * us | ||
182 | 186 | ||
183 | FPRINTF (stderr, "\nResults of recv\n"); | 187 | FPRINTF (stderr, "\nResults of recv\n"); |
184 | FPRINTF (stderr, "Test time %llu ms\n", | 188 | FPRINTF (stderr, "Test time %s\n", |
185 | (unsigned long long) total_time.rel_value); | 189 | GNUNET_STRINGS_relative_time_to_string (total_time, |
186 | FPRINTF (stderr, "Test total packets: %d\n", data_received); | 190 | GNUNET_NO)); |
187 | FPRINTF (stderr, "Test bandwidth: %f kb/s\n", data_received_size * 1.0 / total_time.rel_value); // 4bytes * ms | 191 | FPRINTF (stderr, "Test total packets: %d\n", |
188 | FPRINTF (stderr, "Test throughput: %f packets/s\n\n", data_received * 1000.0 / total_time.rel_value); // packets * ms | 192 | data_received); |
193 | FPRINTF (stderr, "Test bandwidth: %f kb/s\n", | ||
194 | data_received_size * 1000.0 / (total_time.rel_value_us + 1)); // 4bytes * us | ||
195 | FPRINTF (stderr, "Test throughput: %f packets/s\n\n", | ||
196 | data_received * 1000000.0 / (total_time.rel_value_us + 1)); // packets * us | ||
189 | } | 197 | } |
190 | 198 | ||
191 | /** | 199 | /** |
@@ -1711,7 +1719,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, | |||
1711 | const struct GNUNET_CONFIGURATION_Handle *c) | 1719 | const struct GNUNET_CONFIGURATION_Handle *c) |
1712 | { | 1720 | { |
1713 | 1721 | ||
1714 | static uint32_t ports[] = { 50002, 50003, NULL }; | 1722 | static uint32_t ports[] = { 50002, 50003, 0 }; |
1715 | cfg = c; | 1723 | cfg = c; |
1716 | 1724 | ||
1717 | mesh = GNUNET_MESH_connect (cfg, | 1725 | mesh = GNUNET_MESH_connect (cfg, |