Adding some simple logs to aid debugging
Change-Id: If50c44dfeedc6e0332a50ace7b185b2bf9807152
diff --git a/app/src/main/java/org/opencord/olt/impl/Olt.java b/app/src/main/java/org/opencord/olt/impl/Olt.java
index 663d650..37aeafb 100644
--- a/app/src/main/java/org/opencord/olt/impl/Olt.java
+++ b/app/src/main/java/org/opencord/olt/impl/Olt.java
@@ -1035,10 +1035,17 @@
break;
case DEVICE_AVAILABILITY_CHANGED:
if (deviceService.isAvailable(devId)) {
+ log.info("Handling available device: {}", dev.id());
handleDeviceConnection(dev, false);
} else {
if (deviceService.getPorts(devId).isEmpty()) {
+ log.info("Handling controlled device disconnection .. "
+ + "flushing all state for dev:{}", devId);
handleDeviceDisconnection(dev, false);
+ } else {
+ log.info("Disconnected device has available ports .. "
+ + "assuming temporary disconnection, "
+ + "retaining state for device {}", devId);
}
}
break;