add function to query if RLC bearer exists (the implementation)

This commit is contained in:
Andre Puschmann 2018-11-02 21:46:03 +01:00
parent 95ac067b6b
commit b71dab87f1
2 changed files with 10 additions and 0 deletions

View File

@ -90,6 +90,7 @@ public:
void del_bearer(uint32_t lcid);
void del_bearer_mrb(uint32_t lcid);
void change_lcid(uint32_t old_lcid, uint32_t new_lcid);
bool has_bearer(uint32_t lcid);
private:
void reset_metrics();

View File

@ -571,6 +571,15 @@ exit:
}
bool rlc::has_bearer(uint32_t lcid)
{
pthread_rwlock_rdlock(&rwlock);
bool ret = valid_lcid(lcid);
pthread_rwlock_unlock(&rwlock);
return ret;
}
/*******************************************************************************
Helpers (Lock must be hold when calling those)
*******************************************************************************/