aboutsummaryrefslogtreecommitdiff
path: root/src/hostlist/gnunet-daemon-hostlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hostlist/gnunet-daemon-hostlist.c')
-rw-r--r--src/hostlist/gnunet-daemon-hostlist.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/hostlist/gnunet-daemon-hostlist.c b/src/hostlist/gnunet-daemon-hostlist.c
index fb23d2345..2ef807444 100644
--- a/src/hostlist/gnunet-daemon-hostlist.c
+++ b/src/hostlist/gnunet-daemon-hostlist.c
@@ -136,14 +136,17 @@ core_init (void *cls, struct GNUNET_CORE_Handle *server,
136 136
137/** 137/**
138 * Core handler for p2p hostlist advertisements 138 * Core handler for p2p hostlist advertisements
139 *
140 * @param atsi_count number of records in 'atsi'
139 */ 141 */
140static int 142static int
141advertisement_handler (void *cls, const struct GNUNET_PeerIdentity *peer, 143advertisement_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
142 const struct GNUNET_MessageHeader *message, 144 const struct GNUNET_MessageHeader *message,
143 const struct GNUNET_ATS_Information *atsi) 145 const struct GNUNET_ATS_Information *atsi,
146 unsigned int atsi_count)
144{ 147{
145 GNUNET_assert (NULL != client_adv_handler); 148 GNUNET_assert (NULL != client_adv_handler);
146 return (*client_adv_handler) (cls, peer, message, atsi); 149 return (*client_adv_handler) (cls, peer, message, atsi, atsi_count);
147} 150}
148 151
149 152
@@ -153,20 +156,22 @@ advertisement_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
153 * @param cls closure 156 * @param cls closure
154 * @param peer peer identity this notification is about 157 * @param peer peer identity this notification is about
155 * @param atsi performance data 158 * @param atsi performance data
159 * @param atsi_count number of records in 'atsi'
156 */ 160 */
157static void 161static void
158connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, 162connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
159 const struct GNUNET_ATS_Information *atsi) 163 const struct GNUNET_ATS_Information *atsi,
164 unsigned int atsi_count)
160{ 165{
161 if (0 == memcmp (&me, peer, sizeof (struct GNUNET_PeerIdentity))) 166 if (0 == memcmp (&me, peer, sizeof (struct GNUNET_PeerIdentity)))
162 return; 167 return;
163 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 168 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
164 "A new peer connected, notifying client and server\n"); 169 "A new peer connected, notifying client and server\n");
165 if (NULL != client_ch) 170 if (NULL != client_ch)
166 (*client_ch) (cls, peer, atsi); 171 (*client_ch) (cls, peer, atsi, atsi_count);
167#if HAVE_MHD 172#if HAVE_MHD
168 if (NULL != server_ch) 173 if (NULL != server_ch)
169 (*server_ch) (cls, peer, atsi); 174 (*server_ch) (cls, peer, atsi, atsi_count);
170#endif 175#endif
171} 176}
172 177