+
+ switch(action)
+ {
+ case SEARCH:
+ {
+ if(!found)
+ {
+ ueRecord = NULLP;
+ }
+ return ueRecord;
+ }
+
+ case CREATE:
+ {
+ if(node != NULLP)
+ return ueRecord;
+
+ /*Need to add a new node for this LC*/
+
+ /*List is empty; Initialize the LL ControlPointer*/
+ if(pageUeLL->count == 0)
+ {
+ cmLListInit(pageUeLL);
+ }
+
+ ueRecord = NULLP;
+ /*Allocate the List*/
+ DU_ALLOC(ueRecord, sizeof(DuPagUeRecord));
+ if(ueRecord)
+ {
+ ueRecord->pagUeId = pagUeId;
+ ueRecord->sTmsi = sTmsi;
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU APP : Allocation of UE Record failed,ueId:%d",pagUeId);
+ return NULLP;
+ }
+
+ if(duAddNodeToLList(pageUeLL, ueRecord, NULLP) == RFAILED)
+ {
+ DU_LOG("\nERROR --> DU APP : failed to Add Ue Record Node,ueId:%d",pagUeId);
+ DU_FREE(ueRecord, sizeof(DuPagUeRecord));
+ return NULLP;
+ }
+ return ueRecord;
+ }
+ case DELETE:
+ {
+ if(!found || ueRecord == NULLP)
+ {
+ DU_LOG("\nERROR --> DU APP: UeId:%d not found; thus Deletion unsuccessful",pagUeId);
+ }
+ else
+ {
+ if(duDelNodeFromLList(pageUeLL, node) == ROK)
+ DU_FREE(ueRecord, sizeof(DuPagUeRecord));
+ }
+ return NULLP;
+ }
+ case PRINT:
+ case TRAVERSE_ALL:
+ {
+ break;
+ }
+ default:
+ {
+ DU_LOG("\nERROR --> DU APP: Incorrect ActionType:%d on UeRecord",action);
+ }
+ }
+ return NULLP;