Change in libosmocore[master]: gsm: Deprecate buggy gsm_arfcn2band API and introduce gsm_arfcn2band_rc

Pau Espin Pedrol gerrit-no-reply at
Tue Nov 20 10:06:09 UTC 2018

Hello Vadim Yanitskiy, Neels Hofmeyr, Harald Welte, Jenkins Builder, 

I'd like you to reexamine a change. Please visit

to look at the new patch set (#2).

Change subject: gsm: Deprecate buggy gsm_arfcn2band API and introduce gsm_arfcn2band_rc

gsm: Deprecate buggy gsm_arfcn2band API and introduce gsm_arfcn2band_rc

ARFCNs are values in well defined ranges. Until this patch, ARFCNs not
belonging to any band were blindly assigned to DCS1800 by
gsm_arfcn2band, causing unnoticed bugs and misconfigurations in

Previous API gsm_arfcn2band cannot accomodate this kind of check easily,
so let's deprecate it to tell people to use a new API gsm_arfcn2band_rc
which performs this kind of checks and allows callers to log failures,
misconfigurations, etc.
At the same time, modify implementation of gsm_arfcn2band to abort if an
invalid ARFCN is passed, this way users of this API can notice they are
passing wrong data to it that most probably will produce unexpected

Related: OS#3063
Change-Id: I780d452dcebce385469e32ef2fd844df6033393a
M include/osmocom/gsm/gsm_utils.h
M src/gsm/gsm_utils.c
M src/gsm/
M utils/osmo-arfcn.c
4 files changed, 58 insertions(+), 25 deletions(-)

  git pull ssh:// refs/changes/89/11789/2
To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I780d452dcebce385469e32ef2fd844df6033393a
Gerrit-Change-Number: 11789
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol <pespin at>
Gerrit-Reviewer: Harald Welte <laforge at>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at>
Gerrit-CC: Max <msuraev at>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list