This commit is contained in:
Ziver Koc 2017-03-13 18:08:36 +01:00
parent fddaa34c30
commit 9687f28eb0
2 changed files with 5 additions and 5 deletions

View file

@ -74,8 +74,8 @@ public class NetScanController implements HalEventController, HalAutoScannableCo
//logger.finest("Pinging IP "+ device.getHost()); //logger.finest("Pinging IP "+ device.getHost());
boolean online = InetScanner.isReachable(device.getHost(), executor); boolean online = InetScanner.isReachable(device.getHost(), executor);
if (data == null || data.isOn() != online) { if (data == null || data.isOn() != online) {
entry.setValue( data = new SwitchEventData(online, System.currentTimeMillis());
new SwitchEventData(online, System.currentTimeMillis())); entry.setValue(data);
logger.fine("IP "+device.getHost() +" state has changed to "+ data); logger.fine("IP "+device.getHost() +" state has changed to "+ data);
listener.reportReceived(device, data); listener.reportReceived(device, data);
} }

View file

@ -63,11 +63,11 @@ public class TriggerFlow extends DBBean {
*/ */
public boolean evaluate(){ public boolean evaluate(){
for(Trigger trigger : triggerList){ for(Trigger trigger : triggerList){
if (trigger.evaluate()) if (!trigger.evaluate())
return true;
}
return false; return false;
} }
return true;
}
/** /**
* Executes the associated actionList in this flow * Executes the associated actionList in this flow