struct counter *counter;
enum bt_notification_iterator_status it_ret;
int64_t count;
+ struct bt_notification *notif = NULL;
counter = bt_private_component_get_user_data(component);
BT_ASSERT(counter);
}
/* Consume one notification */
- it_ret = bt_notification_iterator_next(counter->notif_iter);
+ it_ret = bt_private_connection_notification_iterator_next(
+ counter->notif_iter, ¬if);
if (it_ret < 0) {
ret = BT_COMPONENT_STATUS_ERROR;
goto end;
goto end;
case BT_NOTIFICATION_ITERATOR_STATUS_OK:
{
- struct bt_notification *notif =
- bt_notification_iterator_borrow_notification(
- counter->notif_iter);
-
BT_ASSERT(notif);
switch (bt_notification_get_type(notif)) {
case BT_NOTIFICATION_TYPE_EVENT:
try_print_count(counter);
end:
+ bt_put(notif);
return ret;
}