Commit e1485271 authored by Simon Morlat's avatar Simon Morlat
Browse files

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

parent 386dccb9
...@@ -6703,7 +6703,11 @@ static LinphoneCallParams *_create_call_params(LinphoneCore *lc){ ...@@ -6703,7 +6703,11 @@ static LinphoneCallParams *_create_call_params(LinphoneCore *lc){
*/ */
LinphoneCallParams *linphone_core_create_call_params(LinphoneCore *lc, LinphoneCall *call){ LinphoneCallParams *linphone_core_create_call_params(LinphoneCore *lc, LinphoneCall *call){
if (!call) return _create_call_params(lc); 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){ const char *linphone_reason_to_string(LinphoneReason err){
......
...@@ -640,6 +640,13 @@ static int _linphone_sqlite3_open(const char *db_file, sqlite3 **db) { ...@@ -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); ms_error("Cannot set sqlite3 temporary store to memory: %s.", errmsg);
sqlite3_free(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; return ret;
} }
......
mediastreamer2 @ c04a7920
Subproject commit cdd6eb1f2684982f01a9650e8a3fe6c89011d156 Subproject commit c04a7920a4d4a2c72d189cef6f20b1b91251e645
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