From ff9924df326b77093e8d350a42a05761ae8a1521 Mon Sep 17 00:00:00 2001 From: QuentinArguillere Date: Tue, 12 Sep 2023 11:02:06 +0200 Subject: [PATCH] Fix build using linphone_account_get_call_logs_for_address instead of deprecated linphone_core_get_call_history_for_address --- Classes/HistoryDetailsTableView.m | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Classes/HistoryDetailsTableView.m b/Classes/HistoryDetailsTableView.m index 6612f726e..bd2140b8a 100644 --- a/Classes/HistoryDetailsTableView.m +++ b/Classes/HistoryDetailsTableView.m @@ -32,13 +32,16 @@ } if (peer) { - const bctbx_list_t *logs = linphone_account_get_call_logs_for_address(linphone_core_get_default_account(LC), peer); - while (logs != NULL) { - LinphoneCallLog *log = (LinphoneCallLog *)logs->data; - if (linphone_address_weak_equal(linphone_call_log_get_remote_address(log), peer)) { - [callLogs addObject:[NSValue valueWithPointer:log]]; + LinphoneAccount *acc = linphone_core_get_default_account(LC); + if (acc) { + const bctbx_list_t *logs = linphone_account_get_call_logs_for_address(acc, peer); + while (logs != NULL) { + LinphoneCallLog *log = (LinphoneCallLog *)logs->data; + if (linphone_address_weak_equal(linphone_call_log_get_remote_address(log), peer)) { + [callLogs addObject:[NSValue valueWithPointer:log]]; + } + logs = bctbx_list_next(logs); } - logs = bctbx_list_next(logs); } } [[self tableView] reloadData];