Commit d51acdf7 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Some small fixes in the addresses handling for conferences.

parent 30dbfe2b
...@@ -7256,8 +7256,13 @@ bool_t _linphone_core_is_conference_creation (const LinphoneCore *lc, const Linp ...@@ -7256,8 +7256,13 @@ bool_t _linphone_core_is_conference_creation (const LinphoneCore *lc, const Linp
LinphoneAddress *factoryAddr = linphone_address_new(uri); LinphoneAddress *factoryAddr = linphone_address_new(uri);
if (!factoryAddr) if (!factoryAddr)
return FALSE; 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(factoryAddr);
linphone_address_unref(testedAddr);
return result; return result;
} }
......
...@@ -320,7 +320,11 @@ void ClientGroupChatRoom::onParticipantSetAdmin (shared_ptr<ConferenceParticipan ...@@ -320,7 +320,11 @@ void ClientGroupChatRoom::onParticipantSetAdmin (shared_ptr<ConferenceParticipan
return; 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); LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this);
LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr); LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr);
LinphoneChatRoomCbsParticipantAdminStatusChangedCb cb = linphone_chat_room_cbs_get_participant_admin_status_changed(cbs); LinphoneChatRoomCbsParticipantAdminStatusChangedCb cb = linphone_chat_room_cbs_get_participant_admin_status_changed(cbs);
...@@ -331,7 +335,10 @@ void ClientGroupChatRoom::onParticipantSetAdmin (shared_ptr<ConferenceParticipan ...@@ -331,7 +335,10 @@ void ClientGroupChatRoom::onParticipantSetAdmin (shared_ptr<ConferenceParticipan
} }
void ClientGroupChatRoom::onSubjectChanged (shared_ptr<ConferenceSubjectEvent> event) { 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()); RemoteConference::setSubject(event->getSubject());
LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this); LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this);
LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr); LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr);
LinphoneChatRoomCbsSubjectChangedCb cb = linphone_chat_room_cbs_get_subject_changed(cbs); LinphoneChatRoomCbsSubjectChangedCb cb = linphone_chat_room_cbs_get_subject_changed(cbs);
......
...@@ -80,15 +80,11 @@ void RemoteConferenceEventHandler::notifyReceived (const string &xmlBody) { ...@@ -80,15 +80,11 @@ void RemoteConferenceEventHandler::notifyReceived (const string &xmlBody) {
bool isFullState = (confInfo->getState() == StateType::full); bool isFullState = (confInfo->getState() == StateType::full);
Address cleanedConfAddress = d->confAddress; Address cleanedConfAddress = d->confAddress;
cleanedConfAddress.clean(); cleanedConfAddress.clean();
cleanedConfAddress.setPort(0);
// Temporary workaround // Temporary workaround
Address entityAddress(confInfo->getEntity().c_str()); Address entityAddress(confInfo->getEntity().c_str());
Address cleanedConfAddress2(cleanedConfAddress); Address cleanedConfAddress2(cleanedConfAddress);
cleanedConfAddress2.setDomain(entityAddress.getDomain()); cleanedConfAddress2.setDomain(entityAddress.getDomain());
if ( if (entityAddress.weakEqual(cleanedConfAddress) || entityAddress.weakEqual(cleanedConfAddress2)) {
confInfo->getEntity() == cleanedConfAddress.asString() ||
confInfo->getEntity() == cleanedConfAddress2.asString()
) {
if ( if (
confInfo->getConferenceDescription().present() && confInfo->getConferenceDescription().present() &&
confInfo->getConferenceDescription().get().getSubject().present() confInfo->getConferenceDescription().get().getSubject().present()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment