fixed a bug in the optical path provisoner

Change-Id: Ib5960d07d044b0b2645cf98c47b3ec1c040f6251
diff --git a/apps/optical/src/main/java/org/onlab/onos/optical/provisioner/OpticalPathProvisioner.java b/apps/optical/src/main/java/org/onlab/onos/optical/provisioner/OpticalPathProvisioner.java
index eb1cce8..ba79d33 100644
--- a/apps/optical/src/main/java/org/onlab/onos/optical/provisioner/OpticalPathProvisioner.java
+++ b/apps/optical/src/main/java/org/onlab/onos/optical/provisioner/OpticalPathProvisioner.java
@@ -160,7 +160,7 @@
            ConnectPoint dstWdmPoint = null;
            Iterator<Path> itrPath = paths.iterator();
            Path firstPath = itrPath.next();
-           log.info(firstPath.toString());
+           log.info(firstPath.links().toString());
 
            ArrayList<Map<ConnectPoint, ConnectPoint>> connectionList = new ArrayList<>();
 
@@ -181,14 +181,17 @@
                    } else {
                        break;
                    }
+
+                   /*
                    if (itrLink.hasNext()) {
                        Link link3 = itrLink.next();
-                       if (!isOpticalLink(link3)) {
+                       if (isOpticalLink(link3)) {
                           break;
                        }
                    } else {
                        break;
-                   }
+                   }*/
+
                }
 
                Map<ConnectPoint, ConnectPoint> pair =
@@ -210,7 +213,8 @@
 
                    intentService.submit(opticalIntent);
 
-                   log.info(opticalIntent.toString());
+                   log.info(srcWdmPoint.toString());
+                   log.info(dstWdmPoint.toString());
                }
            }