[BUGFIX] session_init before auth_status

This commit is contained in:
Martin/Geno 2018-09-01 17:46:51 +02:00
parent b92c33b10e
commit 77278ca130
No known key found for this signature in database
GPG Key ID: 9D7D3C6BFF600C6A
3 changed files with 9 additions and 3 deletions

View File

@ -62,7 +62,7 @@ func (n *Node) SSHUpdate(sshmgmt *ssh.Manager) bool {
uci set wireless.%s.txpower='%d'; uci set wireless.%s.txpower='%d';
uci commit wireless;`, uci commit wireless;`,
radio, n.Wireless.TxPower24)) radio, n.Wireless.TxPower24))
runWifi = true //runWifi = true
} }
if n.Wireless.Channel24 != n.WirelessRespondd.Channel24 { if n.Wireless.Channel24 != n.WirelessRespondd.Channel24 {
//ubus call hostapd.%s switch_chan '{"freq":%d}' //ubus call hostapd.%s switch_chan '{"freq":%d}'
@ -92,7 +92,7 @@ func (n *Node) SSHUpdate(sshmgmt *ssh.Manager) bool {
uci set wireless.%s.txpower='%d'; uci set wireless.%s.txpower='%d';
uci commit wireless;`, uci commit wireless;`,
radio, n.Wireless.TxPower5)) radio, n.Wireless.TxPower5))
runWifi = true //runWifi = true
} }
if n.Wireless.Channel5 != n.WirelessRespondd.Channel5 { if n.Wireless.Channel5 != n.WirelessRespondd.Channel5 {
//ubus call hostapd.%s switch_chan '{"freq":%d}' //ubus call hostapd.%s switch_chan '{"freq":%d}'

View File

@ -13,4 +13,8 @@ nav .login {
color: #fff; color: #fff;
padding-left: 2px; padding-left: 2px;
} }
input {
color: white;
}
} }

View File

@ -11,6 +11,7 @@ const RECONNECT_AFTER = 5000,
let connectionID = localStorage.getItem('session'), let connectionID = localStorage.getItem('session'),
socket = null, socket = null,
sessionInit = false,
connectionEstablished = false; connectionEstablished = false;
function newUUID () { function newUUID () {
@ -51,7 +52,7 @@ function onopen () {
export function sendjson (obj, callback) { export function sendjson (obj, callback) {
if (socket.readyState !== 1) { if (socket.readyState !== 1 || (!sessionInit && obj.subject !== 'session_init')) {
query.push({ query.push({
'callback': callback, 'callback': callback,
'obj': obj 'obj': obj
@ -79,6 +80,7 @@ function onmessage (raw) {
msg.id = connectionID; msg.id = connectionID;
sendjson(msg); sendjson(msg);
render(); render();
sessionInit = true;
return; return;
} }