Change in osmo-bsc[master]: nanobts: use libosmocore's osmo_store*() for OML attr. patching

Pau Espin Pedrol gerrit-no-reply at
Tue Mar 26 16:15:44 UTC 2019

Pau Espin Pedrol has posted comments on this change. ( )

Change subject: nanobts: use libosmocore's osmo_store*() for OML attr. patching

Patch Set 1:

File src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c:
PS1, Line 202: 	buf[0] = bts->gprs.nsvc[0].nsvci >> 8;
Aren't these 2 lines assuming the code runs on a little endian system? afaiu it converts nsvci to big endian to store it in the message, but that's wrong on BE system. I think we need here something like this:
osmo_store16be(&bts->gprs.nsvc[0].nsvci, &buf[0])

Or maybe specs just expect something special?
PS1, Line 207: 	osmo_store16be(bts->gprs.nsvc[0].remote_port, &buf[0]);
Be careful, you are changing the result/encoding here. Either before there was a bug or you are introducing it now. In any of the cases, please describe and state so in the commit log.

Before it used to memcpy, and now you are mangling what you store on little endian systems, so there's a change.

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I28cfb09f224072db9889a89923a3da15a6070e2a
Gerrit-Change-Number: 13418
Gerrit-PatchSet: 1
Gerrit-Owner: Max <msuraev at>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at>
Gerrit-Reviewer: dexter <pmaier at>
Gerrit-CC: Pau Espin Pedrol <pespin at>
Gerrit-Comment-Date: Tue, 26 Mar 2019 16:15:44 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list