gprs_pcu: Use libosmocore osmo_cgi_ps_cmp API
it was noticed that gprs_pcu_get_bts_by_cgi_ps() sometimes failed to return the BTS even if the CGI-PS fields matched, probably due to memcmp checking too padding bytes which may not be zero-initialized in one of the two memory regions being checked. Let's be on the safe side and use libosmocore APIs to check them. Depends: libosmocore.git Change-Id I00e329bc5be8674b30267dec238e7656ddfc21db Change-Id: I7c8ee2c447634e45b367bb8f84adf0140ae48591
This commit is contained in:
parent
3a27102e59
commit
a100a6bc56
|
@ -120,7 +120,7 @@ struct gprs_rlcmac_bts *gprs_pcu_get_bts_by_cgi_ps(struct gprs_pcu *pcu, struct
|
|||
{
|
||||
struct gprs_rlcmac_bts *pos;
|
||||
llist_for_each_entry(pos, &pcu->bts_list, list) {
|
||||
if (memcmp(&pos->cgi_ps, cgi_ps, sizeof(*cgi_ps)) == 0)
|
||||
if (osmo_cgi_ps_cmp(&pos->cgi_ps, cgi_ps) == 0)
|
||||
return pos;
|
||||
}
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue