aboutsummaryrefslogtreecommitdiff
path: root/src/ats/gnunet-service-ats_performance.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-03-20 12:37:31 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-03-20 12:37:31 +0000
commita73cfc7583145f6733b196763f9bfe8a24985185 (patch)
tree8b04c78b8a1463ad124946b4a91997a74b9a327f /src/ats/gnunet-service-ats_performance.c
parent22c8a602e7ac8591652231b829cb324a13035f7c (diff)
downloadgnunet-a73cfc7583145f6733b196763f9bfe8a24985185.tar.gz
gnunet-a73cfc7583145f6733b196763f9bfe8a24985185.zip
test
Diffstat (limited to 'src/ats/gnunet-service-ats_performance.c')
-rw-r--r--src/ats/gnunet-service-ats_performance.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ats/gnunet-service-ats_performance.c b/src/ats/gnunet-service-ats_performance.c
index cbbed1967..3be0bf0bf 100644
--- a/src/ats/gnunet-service-ats_performance.c
+++ b/src/ats/gnunet-service-ats_performance.c
@@ -542,13 +542,13 @@ GAS_handle_performance_update (struct GNUNET_PeerIdentity *peer,
542 mrm->header.size = htons (msglen); 542 mrm->header.size = htons (msglen);
543 mrm->ats_count = htonl (ats_count); 543 mrm->ats_count = htonl (ats_count);
544 mrm->peer = *peer; 544 mrm->peer = *peer;
545 memcpy (&mrm[1], ats, sizeof (struct GNUNET_ATS_Information)); 545 memcpy (&mrm[1], ats, ats_count * sizeof (struct GNUNET_ATS_Information));
546 546
547 for (cur = pc_head; NULL != cur; cur = cur->next) 547 for (cur = pc_head; NULL != cur; cur = cur->next)
548 for (curm = cur->pm_head; NULL != curm; curm = curm->next) 548 for (curm = cur->pm_head; NULL != curm; curm = curm->next)
549 { 549 {
550 /* Notify client about update */ 550 /* Notify client about update */
551 mrm->id = curm->id; 551 mrm->id = htonl (curm->id);
552 GNUNET_SERVER_notification_context_unicast (nc, 552 GNUNET_SERVER_notification_context_unicast (nc,
553 cur->client, 553 cur->client,
554 (struct GNUNET_MessageHeader *) mrm, 554 (struct GNUNET_MessageHeader *) mrm,
@@ -586,7 +586,7 @@ mon_peerinfo_it (void *cls,
586 mrm->id = htonl(pmc->id); 586 mrm->id = htonl(pmc->id);
587 mrm->ats_count = htonl (atsi_count); 587 mrm->ats_count = htonl (atsi_count);
588 mrm->peer = *id; 588 mrm->peer = *id;
589 memcpy (&mrm[1], atsi, sizeof (struct GNUNET_ATS_Information)); 589 memcpy (&mrm[1], atsi, atsi_count * sizeof (struct GNUNET_ATS_Information));
590 590
591 /* Send initial information about peers to client */ 591 /* Send initial information about peers to client */
592 592