[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r9998 - gnunet/src/topology
From: |
gnunet |
Subject: |
[GNUnet-SVN] r9998 - gnunet/src/topology |
Date: |
Thu, 14 Jan 2010 13:08:39 +0100 |
Author: grothoff
Date: 2010-01-14 13:08:39 +0100 (Thu, 14 Jan 2010)
New Revision: 9998
Modified:
gnunet/src/topology/gnunet-daemon-topology.c
Log:
fix hang, use notifications
Modified: gnunet/src/topology/gnunet-daemon-topology.c
===================================================================
--- gnunet/src/topology/gnunet-daemon-topology.c 2010-01-13 16:25:37 UTC
(rev 9997)
+++ gnunet/src/topology/gnunet-daemon-topology.c 2010-01-14 12:08:39 UTC
(rev 9998)
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- (C) 2007, 2008, 2009 Christian Grothoff (and other contributing authors)
+ (C) 2007, 2008, 2009, 2010 Christian Grothoff (and other contributing
authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
@@ -139,6 +139,14 @@
/**
+ * Our peerinfo notification context. We use notification
+ * to instantly learn about new peers as they are discovered
+ * as well as periodic iteration to try peers again after
+ * a while.
+ */
+static struct GNUNET_PEERINFO_NotifyContext *peerinfo_notify;
+
+/**
* Linked list of HELLOs for advertising.
*/
static struct HelloList *hellos;
@@ -270,6 +278,7 @@
{
if (0 == memcmp (&pos->id, peer, sizeof (struct GNUNET_PeerIdentity)))
break;
+ pos = pos->next;
}
}
if (pos == NULL)
@@ -1151,6 +1160,11 @@
{
struct PeerList *pl;
+ if (NULL != peerinfo_notify)
+ {
+ GNUNET_PEERINFO_notify_cancel (peerinfo_notify);
+ peerinfo_notify = NULL;
+ }
GNUNET_TRANSPORT_disconnect (transport);
transport = NULL;
if (handle != NULL)
@@ -1162,7 +1176,7 @@
{
friends = pl->next;
GNUNET_free (pl);
- }
+ }
}
@@ -1258,6 +1272,9 @@
GNUNET_SCHEDULER_shutdown (sched);
return;
}
+ peerinfo_notify = GNUNET_PEERINFO_notify (cfg, sched,
+ &process_peer,
+ NULL);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r9998 - gnunet/src/topology,
gnunet <=