mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-31 10:59:23 +00:00
Fix log in conference.
Fix removing auth info on bad login. Fix crash on login.
This commit is contained in:
parent
a870dca8fb
commit
4defd26bb6
4 changed files with 16 additions and 6 deletions
|
|
@ -248,7 +248,7 @@ ParticipantGui *ConferenceCore::getMeGui() const {
|
|||
void ConferenceCore::setActiveSpeakerDevice(const QSharedPointer<ParticipantDeviceCore> &device) {
|
||||
if (mActiveSpeakerDevice != device) {
|
||||
mActiveSpeakerDevice = device;
|
||||
log().arg("Changing active speaker device to ").arg(device ? device->getAddress() : "None");
|
||||
qDebug() << log().arg("Changing active speaker device to %1").arg(device ? device->getAddress() : "None");
|
||||
emit activeSpeakerDeviceChanged();
|
||||
}
|
||||
}
|
||||
|
|
@ -256,7 +256,7 @@ void ConferenceCore::setActiveSpeakerDevice(const QSharedPointer<ParticipantDevi
|
|||
void ConferenceCore::setActiveSpeaker(const QSharedPointer<ParticipantCore> &participant) {
|
||||
if (mActiveSpeaker != participant) {
|
||||
mActiveSpeaker = participant;
|
||||
log().arg("Changing active speaker to ").arg(participant ? participant->getSipAddress() : "None");
|
||||
qDebug() << log().arg("Changing active speaker to %1").arg(participant ? participant->getSipAddress() : "None");
|
||||
emit activeSpeakerChanged();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,9 +129,13 @@ bool AccountManager::login(QString username,
|
|||
if (mAccountModel && account == mAccountModel->getAccount()) {
|
||||
if (state == linphone::RegistrationState::Failed) {
|
||||
connect(
|
||||
mAccountModel.get(), &AccountModel::removed, this,
|
||||
mAccountModel.get(), &AccountModel::removedFromCore, this,
|
||||
[this]() {
|
||||
emit mAccountModel->removeListener();
|
||||
auto authInfo = mAccountModel->getMonitor()->findAuthInfo();
|
||||
if (authInfo) {
|
||||
qDebug() << log().arg("Removing auth info after failing to connect on login");
|
||||
CoreModel::getInstance()->getCore()->removeAuthInfo(authInfo);
|
||||
}
|
||||
mAccountModel = nullptr;
|
||||
},
|
||||
Qt::SingleShotConnection);
|
||||
|
|
|
|||
|
|
@ -46,6 +46,10 @@ AccountModel::AccountModel(const std::shared_ptr<linphone::Account> &account, QO
|
|||
emit unreadNotificationsChanged(0 /*mMonitor->getUnreadChatMessageCount()*/,
|
||||
mMonitor->getMissedCallsCount()); // TODO
|
||||
});
|
||||
connect(CoreModel::getInstance().get(), &CoreModel::accountRemoved, this,
|
||||
[this](const std::shared_ptr<linphone::Core> &core, const std::shared_ptr<linphone::Account> &account) {
|
||||
if (account == mMonitor) emit removedFromCore();
|
||||
});
|
||||
}
|
||||
|
||||
AccountModel::~AccountModel() {
|
||||
|
|
@ -117,10 +121,11 @@ void AccountModel::setDefault() {
|
|||
|
||||
void AccountModel::removeAccount() {
|
||||
auto core = CoreModel::getInstance()->getCore();
|
||||
auto params = mMonitor ? mMonitor->getParams() : nullptr;
|
||||
qDebug() << log()
|
||||
.arg("Removing account [%1]")
|
||||
.arg(mMonitor ? Utils::coreStringToAppString(mMonitor->getContactAddress()->asString()) : "Null");
|
||||
core->removeAccount(mMonitor);
|
||||
.arg(params ? Utils::coreStringToAppString(params->getIdentityAddress()->asString()) : "Null");
|
||||
if (mMonitor) core->removeAccount(mMonitor);
|
||||
}
|
||||
|
||||
std::shared_ptr<linphone::Account> AccountModel::getAccount() const {
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ signals:
|
|||
void audioVideoConferenceFactoryAddressChanged(QString value);
|
||||
void limeServerUrlChanged(QString value);
|
||||
void removed();
|
||||
void removedFromCore();
|
||||
void voicemailCountChanged(int count);
|
||||
void showMwiChanged(bool show);
|
||||
void voicemailAddressChanged(QString value);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue