1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Use speed only for glorytun or if no values set for SQM/QoS

This commit is contained in:
Ycarus 2019-03-22 20:27:13 +01:00
parent 67e6cbd987
commit 9db2c461dc
2 changed files with 41 additions and 19 deletions

View file

@ -215,19 +215,25 @@ function wizard_add()
end
if downloadspeed ~= "0" and uploadspeed ~= "0" then
ucic:set("sqm",intf,"download",downloadspeed)
ucic:set("sqm",intf,"upload",uploadspeed)
ucic:set("sqm",intf,"enabled","1")
ucic:set("qos",intf,"download",downloadspeed)
ucic:set("qos",intf,"upload",uploadspeed)
ucic:set("qos",intf,"enabled","1")
else
ucic:set("sqm",intf,"download","0")
ucic:set("sqm",intf,"upload","0")
ucic:set("sqm",intf,"enabled","0")
ucic:set("qos",intf,"download","0")
ucic:set("qos",intf,"upload","0")
ucic:set("qos",intf,"enabled","0")
ucic:set("network",intf,"downloadspeed",downloadspeed)
ucic:set("network",intf,"uploadspeed",uploadspeed)
if ucic:get("sqm",intf,"download") == "" then
ucic:set("sqm",intf,"download",downloadspeed)
ucic:set("sqm",intf,"upload",uploadspeed)
--ucic:set("sqm",intf,"enabled","1")
end
if ucic:get("qos",intf,"download") == "" then
ucic:set("qos",intf,"download",downloadspeed)
ucic:set("qos",intf,"upload",uploadspeed)
--ucic:set("qos",intf,"enabled","1")
end
--else
-- ucic:set("sqm",intf,"download","0")
-- ucic:set("sqm",intf,"upload","0")
-- ucic:set("sqm",intf,"enabled","0")
-- ucic:set("qos",intf,"download","0")
-- ucic:set("qos",intf,"upload","0")
-- ucic:set("qos",intf,"enabled","0")
end
end
ucic:save("sqm")