osmo_epdg: db: handle duplicate by removing them

This still leaves the IPSec tunnel open, but ignore it for now
This commit is contained in:
Alexander Couzens 2024-02-17 01:57:42 +01:00
parent 43457788ef
commit c513e1c778
1 changed files with 3 additions and 4 deletions

View File

@ -61,12 +61,11 @@ METHOD(osmo_epdg_db_t, create_subscriber, osmo_epdg_ue_t *,
}
this->lock->write_lock(this->lock);
ue = this->subscribers_imsi->get(this->subscribers_imsi, imsi);
ue = this->subscribers_imsi->remove(this->subscribers_imsi, imsi);
if (ue)
{
/* TODO: handle dups! */
this->lock->unlock(this->lock);
return ue;
/* TODO: handle dups! Will remove it for now */
ue->put(ue);
}
ue = osmo_epdg_ue_create(unique, imsi);