Cannot connect to powered off APs
This commit is contained in:
parent
4500416364
commit
0b3213bf67
@ -1350,6 +1350,7 @@ namespace EduNetworkBuilder
|
||||
if(NB.GetComponentType(nc) == GeneralComponentType.device)
|
||||
{
|
||||
checking = (NetworkDevice)nc;
|
||||
if (checking.PowerOff) continue; //we cannot connect to a powered-off device
|
||||
if (checking == starting) continue;
|
||||
answer = checking.HasWPortSSIDKey(start.SSID, start.EncryptionKey);
|
||||
if(answer != null)
|
||||
|
@ -694,6 +694,7 @@ namespace EduNetworkBuilder
|
||||
if (ItemClickedOn != null)
|
||||
{
|
||||
ItemClickedOn.PowerOff = false;
|
||||
UpdateLinks();
|
||||
UpdateVisuals();
|
||||
}
|
||||
}
|
||||
@ -703,6 +704,7 @@ namespace EduNetworkBuilder
|
||||
if (ItemClickedOn != null)
|
||||
{
|
||||
ItemClickedOn.PowerOff = true;
|
||||
UpdateLinks();
|
||||
UpdateVisuals();
|
||||
}
|
||||
}
|
||||
|
@ -806,7 +806,7 @@ namespace EduNetworkBuilder
|
||||
tryit = true;
|
||||
if(!tryit)
|
||||
{
|
||||
//Check distance
|
||||
//Check distance and power for AP
|
||||
NetworkComponent nc = myNet.GetComponentFromID(nic.ConnectedLink);
|
||||
if(nc != null)
|
||||
{
|
||||
@ -814,6 +814,13 @@ namespace EduNetworkBuilder
|
||||
double distance = nl.LinkDistance();
|
||||
if (distance > NB.WirelessReconnectDistance)
|
||||
tryit = true;
|
||||
//Make sure the far end is powered on
|
||||
HostNicID EndPoint = nl.Dst;
|
||||
if (nic.myID.HostID == EndPoint.HostID) EndPoint = nl.Src;
|
||||
NetworkDevice End = myNet.GetDeviceFromID(EndPoint);
|
||||
if (End != null && End.PowerOff)
|
||||
tryit = true;
|
||||
|
||||
}
|
||||
}
|
||||
//Tryit tells us if we should try to reconnect.
|
||||
|
Loading…
Reference in New Issue
Block a user