[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r9520 - gnunet/src/topology
From: |
gnunet |
Subject: |
[GNUnet-SVN] r9520 - gnunet/src/topology |
Date: |
Sun, 15 Nov 2009 10:58:02 -0700 |
Author: grothoff
Date: 2009-11-15 10:58:02 -0700 (Sun, 15 Nov 2009)
New Revision: 9520
Modified:
gnunet/src/topology/gnunet-daemon-topology.c
Log:
better shutdown, error message formatting fixed
Modified: gnunet/src/topology/gnunet-daemon-topology.c
===================================================================
--- gnunet/src/topology/gnunet-daemon-topology.c 2009-11-15 17:57:03 UTC
(rev 9519)
+++ gnunet/src/topology/gnunet-daemon-topology.c 2009-11-15 17:58:02 UTC
(rev 9520)
@@ -624,6 +624,14 @@
if (peer == NULL)
{
/* last call, schedule 'find_more_peers' again... */
+ if (0 != (GNUNET_SCHEDULER_get_reason (sched) &
GNUNET_SCHEDULER_REASON_SHUTDOWN))
+ {
+#if DEBUG_TOPOLOGY
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Received shutdown request, stopping search for peers to
connect to.\n");
+#endif
+ return;
+ }
schedule_peer_search ();
return;
}
@@ -759,6 +767,14 @@
find_more_peers (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
+ if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
+ {
+#if DEBUG_TOPOLOGY
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Received shutdown request, stopping search for peers to
connect to.\n");
+#endif
+ return;
+ }
discard_old_blacklist_entries ();
if (connection_count <= target_connection_count)
{
@@ -816,7 +832,7 @@
my_identity = *my_id;
#if DEBUG_TOPOLOGY
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "I am peer `%s'",
+ "I am peer `%s'\n",
GNUNET_i2s (my_id));
#endif
if (autoconnect)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r9520 - gnunet/src/topology,
gnunet <=