Commit 20f8fe59 authored by Benjamin REIS's avatar Benjamin REIS

fix crash in soci in Android and iOS

parent 8523c03d
......@@ -61,6 +61,10 @@ IF(SOCI_INCLUDE_DIRS AND SOCI_LIBRARIES)
IF(SOCI_${plugin}_PLUGIN)
MESSAGE(STATUS " * Plugin ${plugin} found ${SOCI_${plugin}_PLUGIN}.")
SET(SOCI_${plugin}_FOUND True)
if(IOS OR ANDROID)
list(APPEND SOCI_LIBRARIES ${SOCI_${plugin}_PLUGIN})
endif()
ELSE()
MESSAGE(STATUS " * Plugin ${plugin} not found.")
SET(SOCI_${plugin}_FOUND False)
......
......@@ -33,9 +33,14 @@ LINPHONE_BEGIN_NAMESPACE
AbstractDb::AbstractDb (AbstractDbPrivate &p) : Object(p) {}
extern "C" void register_factory_sqlite3();
bool AbstractDb::connect (Backend backend, const string &parameters) {
L_D();
#if defined(__APPLE__) || defined(__ANDROID__)
if (backend == Sqlite3)
register_factory_sqlite3();
#endif // defined(__APPLE__) || defined(__ANDROID__)*/
d->backend = backend;
d->dbSession = DbSessionProvider::getInstance()->getSession(
(backend == Mysql ? "mysql://" : "sqlite3://") + parameters
......
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