aboutsummaryrefslogtreecommitdiff
path: root/src/hostlist/gnunet-daemon-hostlist.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-12-22 10:49:17 +0000
committerChristian Grothoff <christian@grothoff.org>2010-12-22 10:49:17 +0000
commit734207e5ace38782b11b1a54d1448fce2722e312 (patch)
tree6f0a217fa7d89a8f37101cbda1372db2e7add395 /src/hostlist/gnunet-daemon-hostlist.c
parent6f4aa734d1a243146a32a9dbb2a3590df759d05b (diff)
downloadgnunet-734207e5ace38782b11b1a54d1448fce2722e312.tar.gz
gnunet-734207e5ace38782b11b1a54d1448fce2722e312.zip
ignore self
Diffstat (limited to 'src/hostlist/gnunet-daemon-hostlist.c')
-rw-r--r--src/hostlist/gnunet-daemon-hostlist.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/hostlist/gnunet-daemon-hostlist.c b/src/hostlist/gnunet-daemon-hostlist.c
index bd76b17d3..f409dc9a6 100644
--- a/src/hostlist/gnunet-daemon-hostlist.c
+++ b/src/hostlist/gnunet-daemon-hostlist.c
@@ -125,6 +125,8 @@ struct GNUNET_HOSTLIST_ADV_Message
125}; 125};
126 126
127 127
128static struct GNUNET_PeerIdentity me;
129
128static void 130static void
129core_init (void *cls, 131core_init (void *cls,
130 struct GNUNET_CORE_Handle * server, 132 struct GNUNET_CORE_Handle * server,
@@ -134,7 +136,7 @@ core_init (void *cls,
134 GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded * 136 GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *
135 publicKey) 137 publicKey)
136{ 138{
137 /* Nothing to do here */ 139 me = *my_identity;
138} 140}
139 141
140/** 142/**
@@ -163,6 +165,8 @@ connect_handler (void *cls,
163 GNUNET_PeerIdentity * peer, 165 GNUNET_PeerIdentity * peer,
164 const struct GNUNET_TRANSPORT_ATS_Information *atsi) 166 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
165{ 167{
168 if (0 == memcmp (&me, peer, sizeof (struct GNUNET_PeerIdentity)))
169 return;
166 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 170 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
167 "A new peer connected, notifying client and server\n"); 171 "A new peer connected, notifying client and server\n");
168 if ( NULL != client_ch) 172 if ( NULL != client_ch)
@@ -184,7 +188,8 @@ disconnect_handler (void *cls,
184 const struct 188 const struct
185 GNUNET_PeerIdentity * peer) 189 GNUNET_PeerIdentity * peer)
186{ 190{
187 191 if (0 == memcmp (&me, peer, sizeof (struct GNUNET_PeerIdentity)))
192 return;
188 /* call hostlist client disconnect handler*/ 193 /* call hostlist client disconnect handler*/
189 if ( NULL != client_dh) 194 if ( NULL != client_dh)
190 (*client_dh) (cls, peer); 195 (*client_dh) (cls, peer);