Fix Bug005 - remoteSwitches not initialized.
Print details on titan exceptions in addLink and deleteLink code.
diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java
index 0247544..6fc6d62 100644
--- a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java
+++ b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java
@@ -1859,7 +1859,8 @@
this.switchLinks = new HashMap<Long, Set<Link>>();
this.quarantineQueue = new LinkedBlockingQueue<NodePortTuple>();
this.maintenanceQueue = new LinkedBlockingQueue<NodePortTuple>();
-
+ this.remoteSwitches = new HashMap<Long, IOFSwitch>();
+
this.evHistTopologySwitch =
new EventHistory<EventHistoryTopologySwitch>("Topology: Switch");
this.evHistTopologyLink =
diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImpl.java b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImpl.java
index 98605b2..249d626 100644
--- a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImpl.java
+++ b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImpl.java
@@ -106,7 +106,8 @@
/*
* retry till we succeed?
*/
- log.error("addOrUpdateLink(): titan exception {} {}", new Object[]{op, lt});
+ log.error("addOrUpdateLink(): titan exception {} {} {}", new Object[]{op, lt, e.toString()});
+ e.printStackTrace();
}
}
@@ -159,7 +160,8 @@
/*
* retry till we succeed?
*/
- log.error("deleteLink(): titan exception {}", lt);
+ log.error("deleteLink(): titan exception {} {}", new Object[]{lt, e.toString()});
+ e.printStackTrace();
}
}