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
b914ae97
Commit
b914ae97
authored
Oct 27, 2017
by
Sylvain Berfini
🎩
Browse files
Do not add event from history if shared_ptr is null
parent
7106d92b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
src/db/main-db.cpp
src/db/main-db.cpp
+5
-3
No files found.
src/db/main-db.cpp
View file @
b914ae97
...
...
@@ -1002,15 +1002,17 @@ MainDb::MainDb (Core *core) : AbstractDb(*new MainDbPrivate) {
soci
::
transaction
tr
(
*
session
);
soci
::
rowset
<
soci
::
row
>
rows
=
(
session
->
prepare
<<
query
,
soci
::
use
(
peerAddress
));
for
(
const
auto
&
row
:
rows
)
events
.
push_back
(
d
->
selectGenericConferenceEvent
(
for
(
const
auto
&
row
:
rows
)
{
shared_ptr
<
EventLog
>
log
=
d
->
selectGenericConferenceEvent
(
// See: http://soci.sourceforge.net/doc/master/backends/
// `row id` is not supported by soci on Sqlite3. It's necessary to cast id to int...
getBackend
()
==
Sqlite3
?
static_cast
<
long
long
>
(
row
.
get
<
int
>
(
0
))
:
row
.
get
<
long
long
>
(
0
),
static_cast
<
EventLog
::
Type
>
(
row
.
get
<
int
>
(
1
)),
Utils
::
getTmAsTimeT
(
row
.
get
<
tm
>
(
2
)),
peerAddress
));
);
if
(
log
)
events
.
push_back
(
log
);
}
L_END_LOG_EXCEPTION
...
...
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