osmo-epdg: UE: use .refcount = 1 instead of ref_get() in the constructor

This commit is contained in:
Alexander Couzens 2024-02-17 01:40:45 +01:00
parent e1d2902a78
commit 39f114fd95
2 changed files with 2 additions and 2 deletions

View File

@ -77,8 +77,8 @@ METHOD(osmo_epdg_db_t, create_subscriber, osmo_epdg_ue_t *,
return NULL;
}
/* UE comes with refcount = 1 */
this->subscribers_imsi->put(this->subscribers_imsi, ue->get_imsi(ue), ue);
ue->get(ue);
this->lock->unlock(this->lock);
return ue;

View File

@ -162,8 +162,8 @@ osmo_epdg_ue_t *osmo_epdg_ue_create(uint32_t id, char *imsi)
.id = id,
.lock = rwlock_create(RWLOCK_TYPE_DEFAULT),
.state = UE_WAIT_LOCATION_UPDATE,
.refcount = 1,
);
ref_get(&this->refcount);
return &this->public;
}