[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r14019 - gnunet/src/hostlist
From: |
gnunet |
Subject: |
[GNUnet-SVN] r14019 - gnunet/src/hostlist |
Date: |
Wed, 22 Dec 2010 11:49:17 +0100 |
Author: grothoff
Date: 2010-12-22 11:49:17 +0100 (Wed, 22 Dec 2010)
New Revision: 14019
Modified:
gnunet/src/hostlist/gnunet-daemon-hostlist.c
Log:
ignore self
Modified: gnunet/src/hostlist/gnunet-daemon-hostlist.c
===================================================================
--- gnunet/src/hostlist/gnunet-daemon-hostlist.c 2010-12-22 10:47:49 UTC
(rev 14018)
+++ gnunet/src/hostlist/gnunet-daemon-hostlist.c 2010-12-22 10:49:17 UTC
(rev 14019)
@@ -125,6 +125,8 @@
};
+static struct GNUNET_PeerIdentity me;
+
static void
core_init (void *cls,
struct GNUNET_CORE_Handle * server,
@@ -134,7 +136,7 @@
GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *
publicKey)
{
- /* Nothing to do here */
+ me = *my_identity;
}
/**
@@ -163,6 +165,8 @@
GNUNET_PeerIdentity * peer,
const struct GNUNET_TRANSPORT_ATS_Information *atsi)
{
+ if (0 == memcmp (&me, peer, sizeof (struct GNUNET_PeerIdentity)))
+ return;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"A new peer connected, notifying client and server\n");
if ( NULL != client_ch)
@@ -184,7 +188,8 @@
const struct
GNUNET_PeerIdentity * peer)
{
-
+ if (0 == memcmp (&me, peer, sizeof (struct GNUNET_PeerIdentity)))
+ return;
/* call hostlist client disconnect handler*/
if ( NULL != client_dh)
(*client_dh) (cls, peer);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r14019 - gnunet/src/hostlist,
gnunet <=