This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/22925 ) Change subject: gsm0808_utils: Move static function further up in file ...................................................................... gsm0808_utils: Move static function further up in file It's a static internal function, so it makes sense to have it at start of its related section. It will be used by other functions in follow up patches. Change-Id: I60f61f8f7bb6543feb068bdcee76d3b752565c95 --- M src/gsm/gsm0808_utils.c 1 file changed, 46 insertions(+), 46 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/25/22925/1 diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index 292b248..e0f0c28 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -767,6 +767,52 @@ return (int)(elem - old_elem); } +/* Store individual Cell Identifier information in a CGI, without clearing the remaining ones. + * This is useful to supplement one CGI with information from more than one Cell Identifier, + * which in turn is useful to match Cell Identifiers of differing kinds to each other. + * Before first invocation, clear the *dst struct externally, this function does only write those members + * that are present in parameter u. + */ +static void cell_id_to_cgi(struct osmo_cell_global_id *dst, + enum CELL_IDENT discr, const union gsm0808_cell_id_u *u) +{ + switch (discr) { + case CELL_IDENT_WHOLE_GLOBAL: + *dst = u->global; + return; + + case CELL_IDENT_WHOLE_GLOBAL_PS: + dst->lai = u->global_ps.rai.lac; + dst->cell_identity = u->global_ps.cell_identity; + return; + + case CELL_IDENT_LAC_AND_CI: + dst->lai.lac = u->lac_and_ci.lac; + dst->cell_identity = u->lac_and_ci.ci; + return; + + case CELL_IDENT_CI: + dst->cell_identity = u->ci; + return; + + case CELL_IDENT_LAI_AND_LAC: + dst->lai = u->lai_and_lac; + return; + + case CELL_IDENT_LAC: + dst->lai.lac = u->lac; + return; + + case CELL_IDENT_NO_CELL: + case CELL_IDENT_BSS: + case CELL_IDENT_UTRAN_PLMN_LAC_RNC: + case CELL_IDENT_UTRAN_RNC: + case CELL_IDENT_UTRAN_LAC_RNC: + /* No values to set. */ + return; + } +} + /* Return the size of the value part of a cell identifier of given type */ int gsm0808_cell_id_size(enum CELL_IDENT discr) { @@ -1619,52 +1665,6 @@ } } -/* Store individual Cell Identifier information in a CGI, without clearing the remaining ones. - * This is useful to supplement one CGI with information from more than one Cell Identifier, - * which in turn is useful to match Cell Identifiers of differing kinds to each other. - * Before first invocation, clear the *dst struct externally, this function does only write those members - * that are present in parameter u. - */ -static void cell_id_to_cgi(struct osmo_cell_global_id *dst, - enum CELL_IDENT discr, const union gsm0808_cell_id_u *u) -{ - switch (discr) { - case CELL_IDENT_WHOLE_GLOBAL: - *dst = u->global; - return; - - case CELL_IDENT_WHOLE_GLOBAL_PS: - dst->lai = u->global_ps.rai.lac; - dst->cell_identity = u->global_ps.cell_identity; - return; - - case CELL_IDENT_LAC_AND_CI: - dst->lai.lac = u->lac_and_ci.lac; - dst->cell_identity = u->lac_and_ci.ci; - return; - - case CELL_IDENT_CI: - dst->cell_identity = u->ci; - return; - - case CELL_IDENT_LAI_AND_LAC: - dst->lai = u->lai_and_lac; - return; - - case CELL_IDENT_LAC: - dst->lai.lac = u->lac; - return; - - case CELL_IDENT_NO_CELL: - case CELL_IDENT_BSS: - case CELL_IDENT_UTRAN_PLMN_LAC_RNC: - case CELL_IDENT_UTRAN_RNC: - case CELL_IDENT_UTRAN_LAC_RNC: - /* No values to set. */ - return; - } -} - /*! Return true if the common information between the two Cell Identifiers match. * For example, if a LAC+CI is compared to LAC, return true if the LAC are the same. * Note that CELL_IDENT_NO_CELL will always return false. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22925 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I60f61f8f7bb6543feb068bdcee76d3b752565c95 Gerrit-Change-Number: 22925 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210215/b8c7fc28/attachment.htm>