diff options
author | wachs <wachs@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-12-05 15:38:20 +0000 |
---|---|---|
committer | wachs <wachs@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-12-05 15:38:20 +0000 |
commit | ff13bc66f29d0ced593249a26a981f9778b1f1a1 (patch) | |
tree | 8d2c12a5e30e69c07e5a4e4a21cab0c1c727ebf1 | |
parent | 951bbe528d58d75b16ca0270106d62eb72f3cc53 (diff) |
callback check
git-svn-id: https://gnunet.org/svn/gnunet@25260 140774ce-b5e7-0310-ab8b-a85725594a96
-rw-r--r-- | src/ats/ats_api_performance.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ats/ats_api_performance.c b/src/ats/ats_api_performance.c index ac58f77692..5cb199266d 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, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, _("Received last message for %s \n"), "ATS_ADDRESSLIST_RESPONSE"); bandwidth_zero.value__ = htonl (0); - alh->cb (ph->infocb_cls, + if (NULL != alh->cb) + alh->cb (ph->infocb_cls, NULL, bandwidth_zero, bandwidth_zero, NULL, 0); @@ -523,7 +524,8 @@ process_ar_message (struct GNUNET_ATS_PerformanceHandle *ph, if ((GNUNET_YES == alh->all_addresses) || (GNUNET_YES == active)) { - alh->cb (ph->infocb_cls, + if (NULL != alh->cb) + alh->cb (ph->infocb_cls, &address, pi->bandwidth_out, pi->bandwidth_in, atsi, ats_count); @@ -770,6 +772,8 @@ GNUNET_ATS_performance_list_addresses (struct GNUNET_ATS_PerformanceHandle *hand struct AddressListRequestMessage *m; GNUNET_assert (NULL != handle); + if (NULL == infocb) + return NULL; alh = GNUNET_malloc (sizeof (struct GNUNET_ATS_AddressListHandle)); alh->id = handle->id; |