aboutsummaryrefslogtreecommitdiff
path: root/src/ats/ats_api_performance.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-12-05 15:38:20 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-12-05 15:38:20 +0000
commitb2c95277e4ebc0da4a580c93c3467ea4d7847fab (patch)
tree8d2c12a5e30e69c07e5a4e4a21cab0c1c727ebf1 /src/ats/ats_api_performance.c
parentd796a8fb48e98adbf4ddfe575bc5bb576e0b9447 (diff)
downloadgnunet-b2c95277e4ebc0da4a580c93c3467ea4d7847fab.tar.gz
gnunet-b2c95277e4ebc0da4a580c93c3467ea4d7847fab.zip
callback check
Diffstat (limited to 'src/ats/ats_api_performance.c')
-rw-r--r--src/ats/ats_api_performance.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ats/ats_api_performance.c b/src/ats/ats_api_performance.c
index ac58f7769..5cb199266 100644
--- a/src/ats/ats_api_performance.c
+++ b/src/ats/ats_api_performance.c
@@ -507,7 +507,8 @@ process_ar_message (struct GNUNET_ATS_PerformanceHandle *ph,
507 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 507 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
508 _("Received last message for %s \n"), "ATS_ADDRESSLIST_RESPONSE"); 508 _("Received last message for %s \n"), "ATS_ADDRESSLIST_RESPONSE");
509 bandwidth_zero.value__ = htonl (0); 509 bandwidth_zero.value__ = htonl (0);
510 alh->cb (ph->infocb_cls, 510 if (NULL != alh->cb)
511 alh->cb (ph->infocb_cls,
511 NULL, 512 NULL,
512 bandwidth_zero, bandwidth_zero, 513 bandwidth_zero, bandwidth_zero,
513 NULL, 0); 514 NULL, 0);
@@ -523,7 +524,8 @@ process_ar_message (struct GNUNET_ATS_PerformanceHandle *ph,
523 524
524 if ((GNUNET_YES == alh->all_addresses) || (GNUNET_YES == active)) 525 if ((GNUNET_YES == alh->all_addresses) || (GNUNET_YES == active))
525 { 526 {
526 alh->cb (ph->infocb_cls, 527 if (NULL != alh->cb)
528 alh->cb (ph->infocb_cls,
527 &address, 529 &address,
528 pi->bandwidth_out, pi->bandwidth_in, 530 pi->bandwidth_out, pi->bandwidth_in,
529 atsi, ats_count); 531 atsi, ats_count);
@@ -770,6 +772,8 @@ GNUNET_ATS_performance_list_addresses (struct GNUNET_ATS_PerformanceHandle *hand
770 struct AddressListRequestMessage *m; 772 struct AddressListRequestMessage *m;
771 773
772 GNUNET_assert (NULL != handle); 774 GNUNET_assert (NULL != handle);
775 if (NULL == infocb)
776 return NULL;
773 777
774 alh = GNUNET_malloc (sizeof (struct GNUNET_ATS_AddressListHandle)); 778 alh = GNUNET_malloc (sizeof (struct GNUNET_ATS_AddressListHandle));
775 alh->id = handle->id; 779 alh->id = handle->id;