osmo-epdg: UE: use .refcount = 1 instead of ref_get() in the constructor
This commit is contained in:
parent
e1d2902a78
commit
39f114fd95
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue