diff --git a/coreapi/call_log.c b/coreapi/call_log.c index 1bdc13148..cc378d879 100644 --- a/coreapi/call_log.c +++ b/coreapi/call_log.c @@ -552,7 +552,7 @@ int linphone_core_get_call_history_size(LinphoneCore *lc) { return numrows; } -MSList * linphone_core_get_call_history_for_address(LinphoneCore *lc, LinphoneAddress *addr) { +MSList * linphone_core_get_call_history_for_address(LinphoneCore *lc, const LinphoneAddress *addr) { char *buf; char *sipAddress; uint64_t begin,end; @@ -599,7 +599,7 @@ int linphone_core_get_call_history_size(LinphoneCore *lc) { return 0; } -MSList * linphone_core_get_call_history_for_address(LinphoneCore *lc, LinphoneAddress *addr) { +MSList * linphone_core_get_call_history_for_address(LinphoneCore *lc, const LinphoneAddress *addr) { return NULL; } diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 71e6402d3..f7ef79394 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -3176,7 +3176,7 @@ LINPHONE_PUBLIC const MSList * linphone_core_get_call_logs(LinphoneCore *lc); * @param[in] lc LinphoneCore object * @return \mslist{LinphoneCallLog} **/ -LINPHONE_PUBLIC MSList * linphone_core_get_call_history_for_address(LinphoneCore *lc, LinphoneAddress *addr); +LINPHONE_PUBLIC MSList * linphone_core_get_call_history_for_address(LinphoneCore *lc, const LinphoneAddress *addr); /** * Erase the call log. diff --git a/tester/call_tester.c b/tester/call_tester.c index 412f6b60e..06747df06 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -4906,9 +4906,8 @@ static void call_record_with_custom_rtp_modifier(void) { static void call_logs_sqlite_storage() { LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc"); - char *logs_db = bc_tester_file("logs.db"); + char *logs_db = create_filepath(bc_tester_get_writable_dir_prefix(), "call_logs", "db"); MSList *logs = NULL; - LinphoneAddress *pauline_addr = NULL; LinphoneAddress *laure = NULL; linphone_core_set_call_logs_database_path(marie->lc, logs_db); @@ -4916,16 +4915,14 @@ static void call_logs_sqlite_storage() { BC_ASSERT_TRUE(linphone_core_get_call_history_size(marie->lc) == 0); BC_ASSERT_TRUE(call(pauline,marie)); - wait_for_until(pauline->lc, marie->lc, NULL, 5, 3000); + wait_for_until(pauline->lc, marie->lc, NULL, 5, 1000); end_call(pauline, marie); BC_ASSERT_TRUE(linphone_core_get_call_history_size(marie->lc) == 1); - pauline_addr = linphone_address_new("\"Pauline\" "); - logs = linphone_core_get_call_history_for_address(marie->lc, pauline_addr); + logs = linphone_core_get_call_history_for_address(marie->lc, linphone_proxy_config_get_identity_address(linphone_core_get_default_proxy_config(pauline->lc))); BC_ASSERT_TRUE(ms_list_size(logs) == 1); ms_list_free_with_data(logs, (void (*)(void*))linphone_call_log_unref); - ms_free(pauline_addr); laure = linphone_address_new("\"Laure\" "); logs = linphone_core_get_call_history_for_address(marie->lc, laure); @@ -4933,6 +4930,7 @@ static void call_logs_sqlite_storage() { ms_free(laure); linphone_core_manager_destroy(marie); + linphone_core_manager_destroy(pauline); remove(logs_db); ms_free(logs_db); }