fix crash in linphone_core_create_call_params(), try to workaround an sqlite problem on iOS

This commit is contained in:
Simon Morlat 2015-11-12 12:22:49 +01:00
parent 386dccb955
commit e14852711b
3 changed files with 13 additions and 2 deletions

View file

@ -6703,7 +6703,11 @@ static LinphoneCallParams *_create_call_params(LinphoneCore *lc){
*/
LinphoneCallParams *linphone_core_create_call_params(LinphoneCore *lc, LinphoneCall *call){
if (!call) return _create_call_params(lc);
return linphone_call_params_copy(call->params);
if (call->params){
return linphone_call_params_copy(call->params);
}
ms_error("linphone_core_create_call_params(): call [%p] is not in a state where call params can be created or used.", call);
return NULL;
}
const char *linphone_reason_to_string(LinphoneReason err){

View file

@ -640,6 +640,13 @@ static int _linphone_sqlite3_open(const char *db_file, sqlite3 **db) {
ms_error("Cannot set sqlite3 temporary store to memory: %s.", errmsg);
sqlite3_free(errmsg);
}
#if TARGET_OS_IPHONE
ret = sqlite3_exec(*db, "PRAGMA journal_mode = OFF", NULL, NULL, &errmsg);
if (ret != SQLITE_OK) {
ms_error("Cannot set sqlite3 journal_mode to off: %s.", errmsg);
sqlite3_free(errmsg);
}
#endif
return ret;
}

@ -1 +1 @@
Subproject commit cdd6eb1f2684982f01a9650e8a3fe6c89011d156
Subproject commit c04a7920a4d4a2c72d189cef6f20b1b91251e645