mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-30 01:39:20 +00:00
fix(MainDb): do not execute query outside exception handler in get history range
This commit is contained in:
parent
225b7a6781
commit
a02165ab81
1 changed files with 1 additions and 1 deletions
|
|
@ -1855,7 +1855,6 @@ static inline string blobToString (soci::blob &in) {
|
|||
return events;
|
||||
}
|
||||
|
||||
const long long &dbChatRoomId = d->selectChatRoomId(chatRoomId);
|
||||
string query = "SELECT id, type, creation_time FROM event"
|
||||
" WHERE id IN ("
|
||||
" SELECT event_id FROM conference_event WHERE chat_room_id = :chatRoomId"
|
||||
|
|
@ -1884,6 +1883,7 @@ static inline string blobToString (soci::blob &in) {
|
|||
soci::session *session = d->dbSession.getBackendSession<soci::session>();
|
||||
soci::transaction tr(*session);
|
||||
|
||||
const long long &dbChatRoomId = d->selectChatRoomId(chatRoomId);
|
||||
soci::rowset<soci::row> rows = (session->prepare << query, soci::use(dbChatRoomId));
|
||||
for (const auto &row : rows) {
|
||||
long long eventId = d->resolveId(row, 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue