aboutsummaryrefslogtreecommitdiff
path: root/src/hostlist/gnunet-daemon-hostlist.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-11-13 20:37:37 +0000
committerChristian Grothoff <christian@grothoff.org>2010-11-13 20:37:37 +0000
commitdb6c313c75a36bc4a27971d7bd8da3e938c7c02a (patch)
treeea4dac1648edb33ccafb1b12652236261f538abd /src/hostlist/gnunet-daemon-hostlist.c
parent56f7c4934c0d9c18370fdcff5e5a3cd29363d474 (diff)
downloadgnunet-db6c313c75a36bc4a27971d7bd8da3e938c7c02a.tar.gz
gnunet-db6c313c75a36bc4a27971d7bd8da3e938c7c02a.zip
the big core API/protocol change, breaks all testcases using core, since the code is still buggy
Diffstat (limited to 'src/hostlist/gnunet-daemon-hostlist.c')
-rw-r--r--src/hostlist/gnunet-daemon-hostlist.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/hostlist/gnunet-daemon-hostlist.c b/src/hostlist/gnunet-daemon-hostlist.c
index 8c3bb9be7..bd76b17d3 100644
--- a/src/hostlist/gnunet-daemon-hostlist.c
+++ b/src/hostlist/gnunet-daemon-hostlist.c
@@ -141,13 +141,12 @@ core_init (void *cls,
141 * Core handler for p2p hostlist advertisements 141 * Core handler for p2p hostlist advertisements
142 */ 142 */
143static int advertisement_handler (void *cls, 143static int advertisement_handler (void *cls,
144 const struct GNUNET_PeerIdentity * peer, 144 const struct GNUNET_PeerIdentity * peer,
145 const struct GNUNET_MessageHeader * message, 145 const struct GNUNET_MessageHeader * message,
146 struct GNUNET_TIME_Relative latency, 146 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
147 uint32_t distance)
148{ 147{
149 GNUNET_assert (NULL != client_adv_handler); 148 GNUNET_assert (NULL != client_adv_handler);
150 return (*client_adv_handler) (cls, peer, message, latency, distance); 149 return (*client_adv_handler) (cls, peer, message, atsi);
151} 150}
152 151
153 152
@@ -156,23 +155,21 @@ static int advertisement_handler (void *cls,
156 * 155 *
157 * @param cls closure 156 * @param cls closure
158 * @param peer peer identity this notification is about 157 * @param peer peer identity this notification is about
159 * @param latency reported latency of the connection with 'other' 158 * @param atsi performance data
160 * @param distance reported distance (DV) to 'other'
161 */ 159 */
162static void 160static void
163connect_handler (void *cls, 161connect_handler (void *cls,
164 const struct 162 const struct
165 GNUNET_PeerIdentity * peer, 163 GNUNET_PeerIdentity * peer,
166 struct GNUNET_TIME_Relative latency, 164 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
167 uint32_t distance)
168{ 165{
169 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 166 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
170 "A new peer connected, notifying client and server\n"); 167 "A new peer connected, notifying client and server\n");
171 if ( NULL != client_ch) 168 if ( NULL != client_ch)
172 (*client_ch) (cls, peer, latency, distance); 169 (*client_ch) (cls, peer, atsi);
173#if HAVE_MHD 170#if HAVE_MHD
174 if ( NULL != server_ch) 171 if ( NULL != server_ch)
175 (*server_ch) (cls, peer, latency, distance); 172 (*server_ch) (cls, peer, atsi);
176#endif 173#endif
177} 174}
178 175
@@ -270,7 +267,6 @@ run (void *cls,
270 267
271 core = GNUNET_CORE_connect (cfg, 268 core = GNUNET_CORE_connect (cfg,
272 1, 269 1,
273 GNUNET_TIME_UNIT_FOREVER_REL,
274 NULL, 270 NULL,
275 &core_init, 271 &core_init,
276 &connect_handler, &disconnect_handler, NULL, 272 &connect_handler, &disconnect_handler, NULL,