SEBA-690

Change-Id: If591c0c3ad3f27852051b356998d7d7b0a5bdd3a
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 36ef722..326767f 100644
--- a/app/src/main/java/org/opencord/olt/impl/Olt.java
+++ b/app/src/main/java/org/opencord/olt/impl/Olt.java
@@ -328,6 +328,15 @@
 
         checkNotNull(deviceService.getPort(deviceId, subscriberPortNo),
                 "Invalid connect point");
+
+        // If the subscriber is modified then first remove the previous and proceed
+        SubscriberAndDeviceInformation subscriber = programmedSubs.get(connectPoint);
+        if (subscriber != null) {
+            log.info("Subscriber on connectionPoint {} was previously programmed, " +
+                    "remove it before adding again", connectPoint);
+            removeSubscriber(connectPoint);
+        }
+
         // Find the subscriber on this connect point
         SubscriberAndDeviceInformation sub = getSubscriber(connectPoint);
         if (sub == null) {
@@ -1804,4 +1813,4 @@
                             }));
         }
     }
-}
\ No newline at end of file
+}