Fix ldap enabled option.

This commit is contained in:
Julien Wadel 2025-01-08 15:59:15 +01:00
parent c3bb023f12
commit 30f08bac93

View file

@ -51,6 +51,7 @@ LdapCore::LdapCore(const std::shared_ptr<linphone::RemoteContactDirectory> &ldap
INIT_CORE_MEMBER(SipAttribute, mLdapModel)
INIT_CORE_MEMBER(SipDomain, mLdapModel)
INIT_CORE_MEMBER(Debug, mLdapModel)
INIT_CORE_MEMBER(Enabled, mLdapModel)
}
LdapCore::~LdapCore() {
@ -138,8 +139,8 @@ void LdapCore::writeFromModel(const std::shared_ptr<LdapModel> &model) {
void LdapCore::save() {
mLdapModelConnection->invokeToModel([this]() {
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
mLdapModel->save();
writeIntoModel(mLdapModel);
mLdapModel->save();
mLdapModelConnection->invokeToCore([this] { setSaved(true); });
});
}
@ -148,4 +149,4 @@ void LdapCore::undo() {
if (mLdapModel) {
mLdapModelConnection->invokeToModel([this] { writeFromModel(mLdapModel); });
}
}
}