Some small fixes in the addresses handling for conferences.

This commit is contained in:
Ghislain MARY 2017-11-06 16:03:32 +01:00
parent 30dbfe2bf6
commit d51acdf739
3 changed files with 15 additions and 7 deletions

View file

@ -7256,8 +7256,13 @@ bool_t _linphone_core_is_conference_creation (const LinphoneCore *lc, const Linp
LinphoneAddress *factoryAddr = linphone_address_new(uri);
if (!factoryAddr)
return FALSE;
bool_t result = linphone_address_weak_equal(factoryAddr, addr);
// Do not compare ports
linphone_address_set_port(factoryAddr, 0);
LinphoneAddress *testedAddr = linphone_address_clone(addr);
linphone_address_set_port(testedAddr, 0);
bool_t result = linphone_address_weak_equal(factoryAddr, testedAddr);
linphone_address_unref(factoryAddr);
linphone_address_unref(testedAddr);
return result;
}

View file

@ -320,7 +320,11 @@ void ClientGroupChatRoom::onParticipantSetAdmin (shared_ptr<ConferenceParticipan
return;
}
participant->getPrivate()->setAdmin(event->getType() == EventLog::Type::ConferenceParticipantSetAdmin);
bool isAdmin = event->getType() == EventLog::Type::ConferenceParticipantSetAdmin;
if (participant->isAdmin() == isAdmin)
return; // No change in the local admin status, do not notify
participant->getPrivate()->setAdmin(isAdmin);
LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this);
LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr);
LinphoneChatRoomCbsParticipantAdminStatusChangedCb cb = linphone_chat_room_cbs_get_participant_admin_status_changed(cbs);
@ -331,7 +335,10 @@ void ClientGroupChatRoom::onParticipantSetAdmin (shared_ptr<ConferenceParticipan
}
void ClientGroupChatRoom::onSubjectChanged (shared_ptr<ConferenceSubjectEvent> event) {
if (getSubject() == event->getSubject())
return; // No change in the local subject, do not notify
RemoteConference::setSubject(event->getSubject());
LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this);
LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr);
LinphoneChatRoomCbsSubjectChangedCb cb = linphone_chat_room_cbs_get_subject_changed(cbs);

View file

@ -80,15 +80,11 @@ void RemoteConferenceEventHandler::notifyReceived (const string &xmlBody) {
bool isFullState = (confInfo->getState() == StateType::full);
Address cleanedConfAddress = d->confAddress;
cleanedConfAddress.clean();
cleanedConfAddress.setPort(0);
// Temporary workaround
Address entityAddress(confInfo->getEntity().c_str());
Address cleanedConfAddress2(cleanedConfAddress);
cleanedConfAddress2.setDomain(entityAddress.getDomain());
if (
confInfo->getEntity() == cleanedConfAddress.asString() ||
confInfo->getEntity() == cleanedConfAddress2.asString()
) {
if (entityAddress.weakEqual(cleanedConfAddress) || entityAddress.weakEqual(cleanedConfAddress2)) {
if (
confInfo->getConferenceDescription().present() &&
confInfo->getConferenceDescription().get().getSubject().present()