aboutsummaryrefslogtreecommitdiff
path: root/src/hostlist
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-03-21 14:49:23 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-03-21 14:49:23 +0000
commit9f36a60e41f9a5e7b3f2b2e71245955e390d125d (patch)
tree208e32d241b4b4df57b7f93563fbe792bb66d8f8 /src/hostlist
parent4616bf9d016bcfb319954e52b5d24fc93c3cf1b2 (diff)
downloadgnunet-9f36a60e41f9a5e7b3f2b2e71245955e390d125d.tar.gz
gnunet-9f36a60e41f9a5e7b3f2b2e71245955e390d125d.zip
fix core api changes
Diffstat (limited to 'src/hostlist')
-rw-r--r--src/hostlist/gnunet-daemon-hostlist.c16
-rw-r--r--src/hostlist/hostlist-client.c8
-rw-r--r--src/hostlist/hostlist-server.c4
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist.c3
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist_learning.c4
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist_reconnect.c3
6 files changed, 13 insertions, 25 deletions
diff --git a/src/hostlist/gnunet-daemon-hostlist.c b/src/hostlist/gnunet-daemon-hostlist.c
index 255f0d544..8d5252534 100644
--- a/src/hostlist/gnunet-daemon-hostlist.c
+++ b/src/hostlist/gnunet-daemon-hostlist.c
@@ -148,12 +148,10 @@ core_init (void *cls, struct GNUNET_CORE_Handle *server,
148 */ 148 */
149static int 149static int
150advertisement_handler (void *cls, const struct GNUNET_PeerIdentity *peer, 150advertisement_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
151 const struct GNUNET_MessageHeader *message, 151 const struct GNUNET_MessageHeader *message)
152 const struct GNUNET_ATS_Information *atsi,
153 unsigned int atsi_count)
154{ 152{
155 GNUNET_assert (NULL != client_adv_handler); 153 GNUNET_assert (NULL != client_adv_handler);
156 return (*client_adv_handler) (cls, peer, message, atsi, atsi_count); 154 return (*client_adv_handler) (cls, peer, message);
157} 155}
158 156
159 157
@@ -166,19 +164,19 @@ advertisement_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
166 * @param atsi_count number of records in 'atsi' 164 * @param atsi_count number of records in 'atsi'
167 */ 165 */
168static void 166static void
169connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, 167connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer)
170 const struct GNUNET_ATS_Information *atsi,
171 unsigned int atsi_count)
172{ 168{
173 if (0 == memcmp (&me, peer, sizeof (struct GNUNET_PeerIdentity))) 169 if (0 == memcmp (&me, peer, sizeof (struct GNUNET_PeerIdentity)))
174 return; 170 return;
175 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 171 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
176 "A new peer connected, notifying client and server\n"); 172 "A new peer connected, notifying client and server\n");
177 if (NULL != client_ch) 173 if (NULL != client_ch)
178 (*client_ch) (cls, peer, atsi, atsi_count); 174 {
175 (*client_ch) (cls, peer);
176 }
179#if HAVE_MHD 177#if HAVE_MHD
180 if (NULL != server_ch) 178 if (NULL != server_ch)
181 (*server_ch) (cls, peer, atsi, atsi_count); 179 (*server_ch) (cls, peer);
182#endif 180#endif
183} 181}
184 182
diff --git a/src/hostlist/hostlist-client.c b/src/hostlist/hostlist-client.c
index 4ec76ec9f..c5b3f05e0 100644
--- a/src/hostlist/hostlist-client.c
+++ b/src/hostlist/hostlist-client.c
@@ -1100,9 +1100,7 @@ task_hostlist_saving (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1100 * @param atsi_count number of records in 'atsi' 1100 * @param atsi_count number of records in 'atsi'
1101 */ 1101 */
1102static void 1102static void
1103handler_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 1103handler_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
1104 const struct GNUNET_ATS_Information *atsi,
1105 unsigned int atsi_count)
1106{ 1104{
1107 GNUNET_assert (stat_connection_count < UINT_MAX); 1105 GNUNET_assert (stat_connection_count < UINT_MAX);
1108 stat_connection_count++; 1106 stat_connection_count++;
@@ -1140,9 +1138,7 @@ handler_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
1140 */ 1138 */
1141static int 1139static int
1142handler_advertisement (void *cls, const struct GNUNET_PeerIdentity *peer, 1140handler_advertisement (void *cls, const struct GNUNET_PeerIdentity *peer,
1143 const struct GNUNET_MessageHeader *message, 1141 const struct GNUNET_MessageHeader *message)
1144 const struct GNUNET_ATS_Information *atsi,
1145 unsigned int atsi_count)
1146{ 1142{
1147 size_t size; 1143 size_t size;
1148 size_t uri_size; 1144 size_t uri_size;
diff --git a/src/hostlist/hostlist-server.c b/src/hostlist/hostlist-server.c
index 04da6e930..54a325d77 100644
--- a/src/hostlist/hostlist-server.c
+++ b/src/hostlist/hostlist-server.c
@@ -353,9 +353,7 @@ adv_transmit_ready (void *cls, size_t size, void *buf)
353 * @param atsi_count number of records in 'atsi' 353 * @param atsi_count number of records in 'atsi'
354 */ 354 */
355static void 355static void
356connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, 356connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer)
357 const struct GNUNET_ATS_Information *atsi,
358 unsigned int atsi_count)
359{ 357{
360 size_t size; 358 size_t size;
361 359
diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c
index 5602609ae..670c2ec28 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist.c
@@ -100,8 +100,7 @@ timeout_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
100 * @param distance in overlay hops, as given by transport plugin 100 * @param distance in overlay hops, as given by transport plugin
101 */ 101 */
102static void 102static void
103notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 103notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
104 const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
105{ 104{
106 if (peer == NULL) 105 if (peer == NULL)
107 return; 106 return;
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c
index b7199637e..66e9b5c49 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c
@@ -313,9 +313,7 @@ check_statistics (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
313 */ 313 */
314static int 314static int
315ad_arrive_handler (void *cls, const struct GNUNET_PeerIdentity *peer, 315ad_arrive_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
316 const struct GNUNET_MessageHeader *message, 316 const struct GNUNET_MessageHeader *message)
317 const struct GNUNET_ATS_Information *atsi,
318 unsigned int atsi_count)
319{ 317{
320 char *hostname; 318 char *hostname;
321 char *expected_uri; 319 char *expected_uri;
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
index 74ef37f16..199040346 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
@@ -100,8 +100,7 @@ timeout_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
100 * @param distance in overlay hops, as given by transport plugin 100 * @param distance in overlay hops, as given by transport plugin
101 */ 101 */
102static void 102static void
103notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 103notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
104 const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
105{ 104{
106 if (peer == NULL) 105 if (peer == NULL)
107 return; 106 return;