[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r5887 - GNUnet/src/applications/advertising
From: |
gnunet |
Subject: |
[GNUnet-SVN] r5887 - GNUnet/src/applications/advertising |
Date: |
Wed, 12 Dec 2007 20:55:12 -0700 (MST) |
Author: grothoff
Date: 2007-12-12 20:55:11 -0700 (Wed, 12 Dec 2007)
New Revision: 5887
Modified:
GNUnet/src/applications/advertising/advertising_test.c
Log:
fix
Modified: GNUnet/src/applications/advertising/advertising_test.c
===================================================================
--- GNUnet/src/applications/advertising/advertising_test.c 2007-12-13
03:40:21 UTC (rev 5886)
+++ GNUnet/src/applications/advertising/advertising_test.c 2007-12-13
03:55:11 UTC (rev 5887)
@@ -115,16 +115,25 @@
min = NUM_PEERS;
for (i = 0; i < NUM_PEERS; i++)
{
- GNUNET_snprintf (buf, 128, "localhost:%u", 2087 + i * 10);
+ GNUNET_snprintf (buf, 128, "localhost:%u", 12087 + i * 10);
GNUNET_GC_set_configuration_value_string (cfg,
ectx, "NETWORK", "HOST",
buf);
sock = GNUNET_client_connection_create (NULL, cfg);
+ have = -1;
GNUNET_STATS_get_statistics (NULL, sock, &countConnections, &have);
GNUNET_client_connection_destroy (sock);
- found += have;
- if (have < min)
- min = have;
+ if (have == -1)
+ {
+ fprintf(stderr,
+ "Trouble getting statistics!\n");
+ }
+ else
+ {
+ found += have;
+ if (have < min)
+ min = have;
+ }
}
fprintf (stderr,
"Have %d connections total in round %d, minimum number was
%d\n",
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r5887 - GNUnet/src/applications/advertising,
gnunet <=