добавил корректное сохранение конфига

This commit is contained in:
Vladislav Ostapov 2024-11-12 11:04:52 +03:00
parent 5175362d1b
commit 00aa17bb37

View File

@ -210,8 +210,9 @@ public:
void setStrringsCinc(bool readback = true) {} void setStrringsCinc(bool readback = true) {}
void setStrringsBucLnb(const buc_lnb_settings& bucLnb, bool readback = true) { void setStrringsBucLnb(const buc_lnb_settings& bucLnb, bool readback = true) {
std::lock_guard lock(this->cpApiMutex);
buc_lnb_settings tmp = bucLnb; buc_lnb_settings tmp = bucLnb;
std::lock_guard lock(this->cpApiMutex);
CP_SetDmaDebug(sid, "begin_save_config", "");
CP_SetBUC_LNB_settings(this->sid, tmp); CP_SetBUC_LNB_settings(this->sid, tmp);
if (readback) { if (readback) {
CP_GetBUC_LNB_settings(this->sid, tmp); CP_GetBUC_LNB_settings(this->sid, tmp);
@ -220,10 +221,12 @@ public:
this->bucLnbSettings = tmp; this->bucLnbSettings = tmp;
} }
} }
CP_SetDmaDebug(sid, "save_config", "");
} }
void setQosSettings(bool enabled, const std::string& str, bool readback = true) { void setQosSettings(bool enabled, const std::string& str, bool readback = true) {
std::lock_guard lock(this->cpApiMutex); std::lock_guard lock(this->cpApiMutex);
CP_SetDmaDebug(sid, "begin_save_config", "");
CP_SetQoSSettings(this->sid, str, enabled); CP_SetQoSSettings(this->sid, str, enabled);
if (readback) { if (readback) {
bool tmp1; std::string tmp2; bool tmp1; std::string tmp2;
@ -234,6 +237,7 @@ public:
this->qosClassesJson = tmp2; this->qosClassesJson = tmp2;
} }
} }
CP_SetDmaDebug(sid, "save_config", "");
} }
~TerminalApiDaemon() { ~TerminalApiDaemon() {