sangho
Committed by Gerrit Code Review

Pushes the flow rules also when devices are available (with DEVICE_AVAILABLLITY_CHANGED event).

Change-Id: Ia92df8c5da5828a9db2492e93a42bfd9a5136d25
......@@ -265,11 +265,18 @@ public class PacketManager
@Override
public void event(DeviceEvent event) {
Device device = event.subject();
if (event.type() == DeviceEvent.Type.DEVICE_ADDED) {
switch (event.type()) {
case DEVICE_ADDED:
case DEVICE_AVAILABILITY_CHANGED:
if (deviceService.isAvailable(event.subject().id())) {
for (PacketRequest request : store.existingRequests()) {
pushRule(device, request);
}
}
break;
default:
break;
}
}
}
......