Change in osmo-bsc[master]: abis_nm: move fail report parsing to extra func

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

osmith gerrit-no-reply at lists.osmocom.org
Thu Mar 26 13:34:30 UTC 2020


osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/17588 )

Change subject: abis_nm: move fail report parsing to extra func
......................................................................


Patch Set 1:

(3 comments)

https://gerrit.osmocom.org/c/osmo-bsc/+/17588/1/src/osmo-bsc/abis_nm.c 
File src/osmo-bsc/abis_nm.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/17588/1/src/osmo-bsc/abis_nm.c@369 
PS1, Line 369: 	tp = talloc(sd, struct tlv_parsed);
> Can we simply have a struct tlv_parsed instead of a pointer inside struct nm_fail_rep_signal_data? T […]
Yes, that's better. Changed.


https://gerrit.osmocom.org/c/osmo-bsc/+/17588/1/src/osmo-bsc/abis_nm.c@372 
PS1, Line 372: 	abis_nm_tlv_parse(tp, bts, foh->data, oh->length-sizeof(*foh));
> no error checking?
Good catch. This was not present before refactoring either, but I've added it in this patch.


https://gerrit.osmocom.org/c/osmo-bsc/+/17588/1/src/osmo-bsc/abis_nm.c@394 
PS1, Line 394: 		sd->parsed.event_type = "<none>";
> Here you are making it point to a stack-allocated buffer. That's not probably what you want.
That's on purpose. Thanks to talloc, the heap-allocated e_type is automatically deallocated when sd gets deallocated. This means, the caller doesn't need to take care of deallocating sd->parsed.event_type or care at all whether it is on the heap or stack.



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ia51004faf620aa4d40435d58c70d758c9d0054d8
Gerrit-Change-Number: 17588
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Thu, 26 Mar 2020 13:34:30 +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/20200326/328de060/attachment.htm>


More information about the gerrit-log mailing list