Reimplement searchActiveSwitch
diff --git a/src/main/java/net/onrc/onos/util/GraphDBUtils.java b/src/main/java/net/onrc/onos/util/GraphDBUtils.java
index 3409f59..7ed51b9 100644
--- a/src/main/java/net/onrc/onos/util/GraphDBUtils.java
+++ b/src/main/java/net/onrc/onos/util/GraphDBUtils.java
@@ -232,7 +232,12 @@
 
 	@Override
 	public ISwitchObject searchActiveSwitch(GraphDBConnection conn, String dpid) {
-		// TODO Auto-generated method stub
-		return null;
+
+        ISwitchObject sw = searchSwitch(conn, dpid);
+        if ((sw != null) &&
+            sw.getState().equals(SwitchState.ACTIVE.toString())) {
+            return sw;
+        }
+        return null;
 	}
 }