diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-09-30 12:58:01 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-09-30 12:58:01 +0000 |
commit | 030a97d44c3a36fd62efcb524a974bdc1b8bb48c (patch) | |
tree | b3f367720c51f0bcedd1f347b3ed930ab89a7758 | |
parent | d32ce3a1d0528519708e2721d752b292aa7ac0a3 (diff) |
fix #4383
-rw-r--r-- | src/pt/gnunet-daemon-pt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pt/gnunet-daemon-pt.c b/src/pt/gnunet-daemon-pt.c index 443ff8ae6e..06ef888322 100644 --- a/src/pt/gnunet-daemon-pt.c +++ b/src/pt/gnunet-daemon-pt.c @@ -342,6 +342,12 @@ try_open_exit () for (pos = exit_head; NULL != pos; pos = pos->next) if (NULL == pos->cadet_channel) candidate_count++; + if (0 == candidate_count) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "No DNS exits available yet.\n"); + return; + } candidate_selected = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, candidate_count); candidate_count = 0; |