diff --git a/src/db/main-db.cpp b/src/db/main-db.cpp index 09a3772534d65907f25bf50aeed23fcb79ad9572..f978e0d5c59a0100e037858d851c3373db210138 100644 --- a/src/db/main-db.cpp +++ b/src/db/main-db.cpp @@ -432,7 +432,8 @@ long long MainDbPrivate::insertChatRoom(const shared_ptr<AbstractChatRoom> &chat L_Q(); if (q->isInitialized()) { const ConferenceId &conferenceId = chatRoom->getConferenceId(); - const long long &peerSipAddressId = insertSipAddress(conferenceId.getPeerAddress()); + const auto &peerAddress = conferenceId.getPeerAddress(); + const long long &peerSipAddressId = insertSipAddress(peerAddress); const long long &localSipAddressId = insertSipAddress(conferenceId.getLocalAddress()); long long chatRoomId = selectChatRoomId(peerSipAddressId, localSipAddressId); @@ -462,7 +463,8 @@ long long MainDbPrivate::insertChatRoom(const shared_ptr<AbstractChatRoom> &chat const string &subject = chatRoomParams->getUtf8Subject(); int ephemeralEnabled = chatRoom->ephemeralEnabled() ? 1 : 0; long ephemeralLifeTime = chatRoom->getEphemeralLifetime(); - const long long &dbConferenceInfoId = selectConferenceInfoId(peerSipAddressId); + const long long peerSipAddressNoGruuId = selectSipAddressId(peerAddress->getUriWithoutGruu(), true); + const long long &dbConferenceInfoId = selectConferenceInfoId(peerSipAddressNoGruuId); const long long conferenceInfoId = (dbConferenceInfoId <= 0) ? 0 : dbConferenceInfoId; *dbSession.getBackendSession() << "INSERT INTO chat_room (" " peer_sip_address_id, local_sip_address_id, creation_time," diff --git a/tester/local-conference-edition-tester.cpp b/tester/local-conference-edition-tester.cpp index 9aa36257da7ffa7fdc2d448b1b36073c84663a5c..5f6768ac08171d9141dc1a85a7051874c8df6675 100644 --- a/tester/local-conference-edition-tester.cpp +++ b/tester/local-conference-edition-tester.cpp @@ -305,6 +305,8 @@ static void edit_simple_conference_base(bool_t from_organizer, focus.registerAsParticipantDevice(michelle); focus.registerAsParticipantDevice(lise); + linphone_core_enable_gruu_in_conference_address(focus.getLc(), TRUE); + setup_conference_info_cbs(marie.getCMgr()); linphone_core_set_file_transfer_server(marie.getLc(), file_transfer_url); diff --git a/tester/local-conference-tester-functions.cpp b/tester/local-conference-tester-functions.cpp index 0fe956a59fabab2e4a77bfe5a705cfd1b65c7321..39785a865ebdbe069dc0ab2f01f87caad9dd3195 100644 --- a/tester/local-conference-tester-functions.cpp +++ b/tester/local-conference-tester-functions.cpp @@ -7127,7 +7127,8 @@ void create_conference_with_chat_base(LinphoneConferenceSecurityLevel security_l bool_t use_relay_ice_candidates, bool_t client_reenter_conference, bool_t network_drops, - time_t start_time) { + time_t start_time, + bool_t enable_gruu_in_conference_address) { Focus focus("chloe_rc"); { // to make sure focus is destroyed after clients. @@ -7157,6 +7158,10 @@ void create_conference_with_chat_base(LinphoneConferenceSecurityLevel security_l linphone_core_set_video_activation_policy(mgr->lc, pol); linphone_video_activation_policy_unref(pol); + if (mgr != pauline.getCMgr()) { + linphone_core_enable_gruu_in_conference_address(mgr->lc, enable_gruu_in_conference_address); + } + linphone_core_set_video_device(mgr->lc, liblinphone_tester_mire_id); linphone_core_enable_video_capture(mgr->lc, TRUE); linphone_core_enable_video_display(mgr->lc, TRUE); diff --git a/tester/local-conference-tester-functions.h b/tester/local-conference-tester-functions.h index a18290ce8861c593c7ecd351967ca89aaeec8023..aeae4f68bb0a0ca3271361246f198a6c029eb223 100644 --- a/tester/local-conference-tester-functions.h +++ b/tester/local-conference-tester-functions.h @@ -360,7 +360,8 @@ void create_conference_with_chat_base(LinphoneConferenceSecurityLevel security_l bool_t slow_ice_negotiation, bool_t client_reenter_conference, bool_t network_drops, - time_t start_time); + time_t start_time, + bool_t enable_gruu_in_conference_address); void configure_end_to_end_encrypted_conference_server(Focus &focus); diff --git a/tester/local-encrypted-conference-tester.cpp b/tester/local-encrypted-conference-tester.cpp index 553f194e4da185dc94c8061ca6e6a33e03dd23b9..2bd0225d072c344f38bafd7d1aeef64bb300a521 100644 --- a/tester/local-encrypted-conference-tester.cpp +++ b/tester/local-encrypted-conference-tester.cpp @@ -904,17 +904,17 @@ static void create_simple_end_to_end_encrypted_conference_with_participant_added static void create_encrypted_conference_with_chat() { create_conference_with_chat_base(LinphoneConferenceSecurityLevelEndToEnd, FALSE, FALSE, TRUE, 1, FALSE, TRUE, FALSE, - ms_time(NULL)); + ms_time(NULL), FALSE); } static void create_encrypted_conference_with_chat_and_cores_restart(void) { create_conference_with_chat_base(LinphoneConferenceSecurityLevelEndToEnd, TRUE, TRUE, TRUE, 1, FALSE, TRUE, FALSE, - (ms_time(NULL) - 45)); + (ms_time(NULL) - 45), FALSE); } static void create_encrypted_conference_with_chat_network_drops_and_participant_rejoining(void) { create_conference_with_chat_base(LinphoneConferenceSecurityLevelEndToEnd, FALSE, FALSE, FALSE, -1, TRUE, TRUE, TRUE, - (ms_time(NULL) - 45)); + (ms_time(NULL) - 45), TRUE); } static void scheduling_failure_check(LinphoneConferenceScheduler *scheduler, LinphoneConferenceSchedulerState state) { diff --git a/tester/local-scheduled-conference-tester.cpp b/tester/local-scheduled-conference-tester.cpp index e6fb504dce159824b9d4f65600ea4c8aee973d29..a18edb287cb8534d13d6565efc45abc0267986fe 100644 --- a/tester/local-scheduled-conference-tester.cpp +++ b/tester/local-scheduled-conference-tester.cpp @@ -6145,27 +6145,27 @@ static void create_simple_conference_in_sfu_payload_mode(void) { static void create_conference_with_chat(void) { create_conference_with_chat_base(LinphoneConferenceSecurityLevelNone, FALSE, FALSE, TRUE, 1, TRUE, FALSE, FALSE, - ms_time(NULL)); + ms_time(NULL), FALSE); } static void create_point_to_point_encrypted_conference_with_chat(void) { create_conference_with_chat_base(LinphoneConferenceSecurityLevelPointToPoint, FALSE, FALSE, TRUE, -1, TRUE, FALSE, - FALSE, ms_time(NULL)); + FALSE, ms_time(NULL), FALSE); } static void create_conference_with_chat_and_participant_rejoining(void) { create_conference_with_chat_base(LinphoneConferenceSecurityLevelNone, FALSE, FALSE, TRUE, -1, TRUE, TRUE, FALSE, - (ms_time(NULL) - 45)); + (ms_time(NULL) - 45), FALSE); } static void create_conference_with_chat_and_cores_restart(void) { create_conference_with_chat_base(LinphoneConferenceSecurityLevelNone, TRUE, TRUE, TRUE, 1, FALSE, FALSE, FALSE, - (ms_time(NULL) - 45)); + (ms_time(NULL) - 45), TRUE); } static void create_conference_with_chat_network_drops_and_participant_rejoining(void) { create_conference_with_chat_base(LinphoneConferenceSecurityLevelNone, FALSE, FALSE, FALSE, -1, TRUE, TRUE, TRUE, - (ms_time(NULL) - 45)); + (ms_time(NULL) - 45), FALSE); } #ifndef HAVE_EKT_SERVER_PLUGIN