Change in libosmocore[master]: gsm_04_08: add parser for Mobile Station Classmark 3

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/.

fixeria gerrit-no-reply at lists.osmocom.org
Mon Nov 9 13:04:43 UTC 2020


fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/21083 )

Change subject: gsm_04_08: add parser for Mobile Station Classmark 3
......................................................................


Patch Set 1:

(4 comments)

https://gerrit.osmocom.org/c/libosmocore/+/21083/1/src/gsm/gsm48_ie.c 
File src/gsm/gsm48_ie.c:

https://gerrit.osmocom.org/c/libosmocore/+/21083/1/src/gsm/gsm48_ie.c@1318 
PS1, Line 1318: classmark3_len > sizeof(data
How is this possible given that typeof(classmark3_len) is 'uint8_t' and thus the maximum is 255?
Maybe use size_t instead?


https://gerrit.osmocom.org/c/libosmocore/+/21083/1/src/gsm/gsm48_ie.c@1326 
PS1, Line 1326: 	bv.data = (uint8_t*) data;
> why not using classmark3 directly?
I guess because of 'const', but what if we do it like this:

  const struct bitvec bv = (struct bitvec) {
    .data_len = classmark3_len,
    .data = (uint8_t *) data,
  };

This way there would be no need for memcpy() and memset(). All bitvec_get() functions should still work.


https://gerrit.osmocom.org/c/libosmocore/+/21083/1/tests/gsm0408/gsm0408_test.c 
File tests/gsm0408/gsm0408_test.c:

https://gerrit.osmocom.org/c/libosmocore/+/21083/1/tests/gsm0408/gsm0408_test.c@330 
PS1, Line 330: void dump_cm3(struct gsm48_classmark3 *cm3)
static


https://gerrit.osmocom.org/c/libosmocore/+/21083/1/tests/gsm0408/gsm0408_test.c@507 
PS1, Line 507: uint8_t
const



-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21083
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ic8b2bfd00330235f5bed00771e421588abfaac1f
Gerrit-Change-Number: 21083
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Comment-Date: Mon, 09 Nov 2020 13:04:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201109/dff9dd22/attachment.htm>


More information about the gerrit-log mailing list