Commit 62d33ce5 authored by luis_pereira87's avatar luis_pereira87

Add function to remove all SDAP entities for a UE

parent 57a3f9fe
......@@ -486,3 +486,23 @@ int nr_sdap_delete_entity(ue_id_t ue_id, int pdusession_id)
}
return 0;
}
void nr_sdap_delete_ue_entities(ue_id_t ue_id)
{
nr_sdap_entity_t *entityPtr = sdap_info.sdap_entity_llist;
int pos = 0;
while (entityPtr != NULL) {
if (entityPtr->ue_id == ue_id) {
if (pos == 0) {
sdap_info.sdap_entity_llist = sdap_info.sdap_entity_llist->next_entity;
}
LOG_I(SDAP, "Deleting SDAP entity for UE %lx and PDU Session id %d\n", ue_id, entityPtr->pdusession_id);
nr_sdap_entity_t *entityPrev = entityPtr;
free(entityPtr);
entityPtr = entityPrev->next_entity;
} else {
entityPtr = entityPtr->next_entity;
}
pos++;
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment