mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
fix(AbstractDb): unused variable when soci is not available
This commit is contained in:
parent
01999cbad1
commit
78824b02a9
1 changed files with 14 additions and 19 deletions
|
|
@ -30,30 +30,25 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
AbstractDb::AbstractDb (AbstractDbPrivate &p) : Object(*new AbstractDbPrivate) {}
|
||||
|
||||
bool AbstractDb::connect (Backend backend, const std::string ¶meters) {
|
||||
L_D(AbstractDb);
|
||||
|
||||
#ifdef SOCI_ENABLED
|
||||
L_D(AbstractDb);
|
||||
try {
|
||||
if (d->isConnected) {
|
||||
d->session.close();
|
||||
d->isConnected = false;
|
||||
}
|
||||
|
||||
try {
|
||||
if (d->isConnected) {
|
||||
d->session.close();
|
||||
d->isConnected = false;
|
||||
d->session.open(backend == Mysql ? "mysql" : "sqlite3", parameters);
|
||||
init();
|
||||
} catch (const exception &e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
d->session.open(backend == Mysql ? "mysql" : "sqlite3", parameters);
|
||||
init();
|
||||
} catch (const exception &e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
return true;
|
||||
#else
|
||||
|
||||
lWarning() << "Cannot use AbstractDb. Soci is not enabled.";
|
||||
return false;
|
||||
|
||||
#endif // ifndef SOCI_ENABLED
|
||||
lWarning() << "Cannot use AbstractDb. Soci is not enabled.";
|
||||
return false;
|
||||
#endif // ifndef SOCI_ENABLED
|
||||
}
|
||||
|
||||
bool AbstractDb::isConnected () const {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue