diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-22 21:59:27 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-22 21:59:27 +0000 |
commit | f44c0036572d5557d2496748a4190a61e40e61ff (patch) | |
tree | bceb908e8542883ed246f96b4c619c0c49a06782 /src/fs/gnunet-service-fs.c | |
parent | 9d87d51965287d83ee332b8c50baff95bd62649a (diff) | |
download | gnunet-f44c0036572d5557d2496748a4190a61e40e61ff.tar.gz gnunet-f44c0036572d5557d2496748a4190a61e40e61ff.zip |
replacing 0-terminated atsi-array with array+length in core API (and the core-connect IPC)
Diffstat (limited to 'src/fs/gnunet-service-fs.c')
-rw-r--r-- | src/fs/gnunet-service-fs.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 6ea47c2e2..c5933d989 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c | |||
@@ -220,13 +220,15 @@ GSF_test_get_load_too_high_ (uint32_t priority) | |||
220 | * for loopback messages where we are both sender and receiver) | 220 | * for loopback messages where we are both sender and receiver) |
221 | * @param message the actual message | 221 | * @param message the actual message |
222 | * @param atsi performance information | 222 | * @param atsi performance information |
223 | * @param atsi_count number of records in 'atsi' | ||
223 | * @return GNUNET_OK to keep the connection open, | 224 | * @return GNUNET_OK to keep the connection open, |
224 | * GNUNET_SYSERR to close it (signal serious error) | 225 | * GNUNET_SYSERR to close it (signal serious error) |
225 | */ | 226 | */ |
226 | static int | 227 | static int |
227 | handle_p2p_put (void *cls, const struct GNUNET_PeerIdentity *other, | 228 | handle_p2p_put (void *cls, const struct GNUNET_PeerIdentity *other, |
228 | const struct GNUNET_MessageHeader *message, | 229 | const struct GNUNET_MessageHeader *message, |
229 | const struct GNUNET_ATS_Information *atsi) | 230 | const struct GNUNET_ATS_Information *atsi, |
231 | unsigned int atsi_count) | ||
230 | { | 232 | { |
231 | struct GSF_ConnectedPeer *cp; | 233 | struct GSF_ConnectedPeer *cp; |
232 | 234 | ||
@@ -299,13 +301,15 @@ consider_forwarding (void *cls, struct GSF_PendingRequest *pr, | |||
299 | * for loopback messages where we are both sender and receiver) | 301 | * for loopback messages where we are both sender and receiver) |
300 | * @param message the actual message | 302 | * @param message the actual message |
301 | * @param atsi performance information | 303 | * @param atsi performance information |
304 | * @param atsi_count number of records in 'atsi' | ||
302 | * @return GNUNET_OK to keep the connection open, | 305 | * @return GNUNET_OK to keep the connection open, |
303 | * GNUNET_SYSERR to close it (signal serious error) | 306 | * GNUNET_SYSERR to close it (signal serious error) |
304 | */ | 307 | */ |
305 | static int | 308 | static int |
306 | handle_p2p_get (void *cls, const struct GNUNET_PeerIdentity *other, | 309 | handle_p2p_get (void *cls, const struct GNUNET_PeerIdentity *other, |
307 | const struct GNUNET_MessageHeader *message, | 310 | const struct GNUNET_MessageHeader *message, |
308 | const struct GNUNET_ATS_Information *atsi) | 311 | const struct GNUNET_ATS_Information *atsi, |
312 | unsigned int atsi_count) | ||
309 | { | 313 | { |
310 | struct GSF_PendingRequest *pr; | 314 | struct GSF_PendingRequest *pr; |
311 | 315 | ||
@@ -456,16 +460,18 @@ consider_peer_for_forwarding (void *cls, const GNUNET_HashCode * key, | |||
456 | * @param cls closure, not used | 460 | * @param cls closure, not used |
457 | * @param peer peer identity this notification is about | 461 | * @param peer peer identity this notification is about |
458 | * @param atsi performance information | 462 | * @param atsi performance information |
463 | * @param atsi_count number of records in 'atsi' | ||
459 | */ | 464 | */ |
460 | static void | 465 | static void |
461 | peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, | 466 | peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, |
462 | const struct GNUNET_ATS_Information *atsi) | 467 | const struct GNUNET_ATS_Information *atsi, |
468 | unsigned int atsi_count) | ||
463 | { | 469 | { |
464 | struct GSF_ConnectedPeer *cp; | 470 | struct GSF_ConnectedPeer *cp; |
465 | 471 | ||
466 | if (0 == memcmp (&my_id, peer, sizeof (struct GNUNET_PeerIdentity))) | 472 | if (0 == memcmp (&my_id, peer, sizeof (struct GNUNET_PeerIdentity))) |
467 | return; | 473 | return; |
468 | cp = GSF_peer_connect_handler_ (peer, atsi); | 474 | cp = GSF_peer_connect_handler_ (peer, atsi, atsi_count); |
469 | if (NULL == cp) | 475 | if (NULL == cp) |
470 | return; | 476 | return; |
471 | GSF_iterate_pending_requests_ (&consider_peer_for_forwarding, cp); | 477 | GSF_iterate_pending_requests_ (&consider_peer_for_forwarding, cp); |