Commit 6f64132d authored by Sylvain Berfini's avatar Sylvain Berfini 🐮
Browse files

Fixed linphone_core_get_call_logs() returning all logs after linphone_core_clear_call_logs()

parent 19323959
......@@ -585,7 +585,7 @@ const bctbx_list_t *linphone_core_get_call_history(LinphoneCore *lc) {
CallLogStorageResult clsres;
if (!lc || lc->logs_db == NULL) return NULL;
if (lc->call_logs != NULL) return lc->call_logs;
if (lc->call_logs != NULL) return lc->call_logs;
if (lc->max_call_logs != LINPHONE_MAX_CALL_HISTORY_UNLIMITED){
buf = sqlite3_mprintf("SELECT * FROM call_history ORDER BY id DESC LIMIT %i", lc->max_call_logs);
......
......@@ -5434,9 +5434,9 @@ void linphone_core_clear_call_logs(LinphoneCore *lc) {
call_logs_sqlite_db_found = TRUE;
linphone_core_delete_call_history(lc);
}
bctbx_list_for_each(lc->call_logs, (void (*)(void*))linphone_call_log_unref);
lc->call_logs = bctbx_list_free(lc->call_logs);
if (!call_logs_sqlite_db_found) {
bctbx_list_for_each(lc->call_logs, (void (*)(void*))linphone_call_log_unref);
lc->call_logs = bctbx_list_free(lc->call_logs);
call_logs_write_to_config_file(lc);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment