aboutsummaryrefslogtreecommitdiff
path: root/src/nse/gnunet-nse-profiler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nse/gnunet-nse-profiler.c')
-rw-r--r--src/nse/gnunet-nse-profiler.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nse/gnunet-nse-profiler.c b/src/nse/gnunet-nse-profiler.c
index a10d237..4a4bea5 100644
--- a/src/nse/gnunet-nse-profiler.c
+++ b/src/nse/gnunet-nse-profiler.c
@@ -371,7 +371,9 @@ connect_nse_service (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
#endif
for (i = 0; i < num_peers; i++)
{
- if ((connection_limit > 0) && (i % (num_peers / connection_limit) != 0))
+ if ((connection_limit > 0) &&
+ (num_peers > connection_limit) &&
+ (i % (num_peers / connection_limit) != 0))
continue;
#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -894,7 +896,7 @@ run (void *cls, char *const *args, const char *cfgfile,
&connect_cb, &my_cb, NULL, hosts);
GNUNET_assert (pg != NULL);
shutdown_handle =
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_get_forever (),
+ GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
&shutdown_task, NULL);
}