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
2c33faac
Commit
2c33faac
authored
Dec 04, 2017
by
Erwan Croze
👋🏻
Browse files
Fix main-db.cpp for mysql backend
parent
9e38d94b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
src/db/main-db.cpp
src/db/main-db.cpp
+10
-8
No files found.
src/db/main-db.cpp
View file @
2c33faac
...
...
@@ -131,7 +131,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
// `row id` is not supported by soci on Sqlite3. It's necessary to cast id to int...
return
q
->
getBackend
()
==
AbstractDb
::
Sqlite3
?
static_cast
<
long
long
>
(
row
.
get
<
int
>
(
0
))
:
row
.
get
<
long
long
>
(
0
);
:
row
.
get
<
unsigned
long
long
>
(
0
);
}
long
long
MainDbPrivate
::
insertSipAddress
(
const
string
&
sipAddress
)
{
...
...
@@ -1870,7 +1870,10 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
tm
lastUpdateTime
=
row
.
get
<
tm
>
(
4
);
int
capabilities
=
row
.
get
<
int
>
(
5
);
string
subject
=
row
.
get
<
string
>
(
6
);
unsigned
int
lastNotifyId
=
static_cast
<
unsigned
int
>
(
row
.
get
<
int
>
(
7
,
0
));
unsigned
int
lastNotifyId
=
static_cast
<
unsigned
int
>
(
getBackend
()
==
Backend
::
Mysql
?
row
.
get
<
unsigned
int
>
(
7
,
0
)
:
row
.
get
<
int
>
(
7
,
0
)
);
if
(
capabilities
&
static_cast
<
int
>
(
ChatRoom
::
Capabilities
::
Basic
))
{
chatRoom
=
core
->
getPrivate
()
->
createBasicChatRoom
(
...
...
@@ -1900,14 +1903,13 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
participants
.
push_back
(
participant
);
}
if
(
!
me
)
{
lError
()
<<
"Unable to find me in: (peer="
+
chatRoomId
.
getPeerAddress
().
asString
()
+
", local="
+
chatRoomId
.
getLocalAddress
().
asString
()
+
")."
;
continue
;
}
if
(
!
linphone_core_conference_server_enabled
(
core
->
getCCore
()))
{
bool
hasBeenLeft
=
!!
row
.
get
<
int
>
(
8
,
0
);
if
(
!
me
)
{
lError
()
<<
"Unable to find me in: (peer="
+
chatRoomId
.
getPeerAddress
().
asString
()
+
", local="
+
chatRoomId
.
getLocalAddress
().
asString
()
+
")."
;
continue
;
}
chatRoom
=
make_shared
<
ClientGroupChatRoom
>
(
core
,
chatRoomId
.
getPeerAddress
(),
...
...
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