VOL-1982 free flowid as and when flows are deleted from the device
Change-Id: I91da78098caac79a4dfc7347a1291f1c8734ed3a
diff --git a/adaptercore/resourcemanager/resourcemanager.go b/adaptercore/resourcemanager/resourcemanager.go
index 4b0220b..94007db 100755
--- a/adaptercore/resourcemanager/resourcemanager.go
+++ b/adaptercore/resourcemanager/resourcemanager.go
@@ -618,12 +618,16 @@
uniID int32, FlowID uint32) {
var IntfONUID string
var err error
+ FlowIds := make([]uint32, 0)
+
+ FlowIds = append(FlowIds, FlowID)
IntfONUID = fmt.Sprintf("%d,%d,%d", IntfID, onuID, uniID)
err = RsrcMgr.ResourceMgrs[IntfID].UpdateFlowIDForOnu(IntfONUID, FlowID, false)
if err != nil {
log.Error("Failed to Update flow id infor for %s", IntfONUID)
}
RsrcMgr.ResourceMgrs[IntfID].RemoveFlowIDInfo(IntfONUID, FlowID)
+ RsrcMgr.ResourceMgrs[IntfID].FreeResourceID(IntfID, ponrmgr.FLOW_ID, FlowIds)
}
// FreeFlowIDs releases the flow Ids