Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
78824b02
Commit
78824b02
authored
Aug 21, 2017
by
Ronan
Browse files
fix(AbstractDb): unused variable when soci is not available
parent
01999cba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
20 deletions
+15
-20
src/db/abstract/abstract-db.cpp
src/db/abstract/abstract-db.cpp
+15
-20
No files found.
src/db/abstract/abstract-db.cpp
View file @
78824b02
...
...
@@ -30,30 +30,25 @@ LINPHONE_BEGIN_NAMESPACE
AbstractDb
::
AbstractDb
(
AbstractDbPrivate
&
p
)
:
Object
(
*
new
AbstractDbPrivate
)
{}
bool
AbstractDb
::
connect
(
Backend
backend
,
const
std
::
string
&
parameters
)
{
L_D
(
AbstractDb
);
#ifdef SOCI_ENABLED
try
{
if
(
d
->
isConnected
)
{
d
->
session
.
close
();
d
->
isConnected
=
false
;
L_D
(
AbstractDb
);
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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment