diff options
Diffstat (limited to 'client/Proxifier.cpp')
-rw-r--r-- | client/Proxifier.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/client/Proxifier.cpp b/client/Proxifier.cpp index 46e4339..a4c2d08 100644 --- a/client/Proxifier.cpp +++ b/client/Proxifier.cpp @@ -300,6 +300,9 @@ bool Proxifier::TurnProxyOn(Proxy& proxy) // the "Default" rule can't be disabled from Proxifier's UI // so we can skip this check here string action = "Chain"; + + Logger::Debug("Changing default rule action\n"); + if (!SetRuleAction(defaultRule, action, chainId)) { return false; @@ -1140,7 +1143,8 @@ bool Proxifier::AddRule(Rule& rule) { QString actionId; actionId.setNum(rule.actId); - QDomText portsTxt = configDom.createTextNode(actionId); + QDomText actId = configDom.createTextNode(actionId); + actionElem.appendChild(actId); } ruleElem.appendChild(actionElem); // update state to reflect all the changes @@ -1185,7 +1189,7 @@ bool Proxifier::SetRuleAction(string& name, string& action, int actId) Logger::Error("Invalid Proxifier configuration file!\n"); return false; } - QDomElement ruleListElem = root.firstChildElement("ChainList"); + QDomElement ruleListElem = root.firstChildElement("RuleList"); if (ruleListElem.isNull()) { return false; @@ -1209,7 +1213,8 @@ bool Proxifier::SetRuleAction(string& name, string& action, int actId) { QString actionId; actionId.setNum(actId); - QDomText portsTxt = configDom.createTextNode(actionId); + QDomText actId = configDom.createTextNode(actionId); + newActionElem.appendChild(actId); } ruleElem.appendChild(newActionElem); break; |