[PATCH 5/8] mgcp: NUL-terminate MGCP message

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/OpenBSC@lists.osmocom.org/.

Holger Hans Peter Freyther holger at freyther.de
Mon Dec 2 11:13:57 UTC 2013


On Mon, Dec 02, 2013 at 11:38:27AM +0100, Jacob Erlbeck wrote:

> Or do you rather recommend to use msg->l2h + msgb_l2len(msg) instead of
> msg->tail directly?

I think using msg->l2h + msgb_l2len is the correct thing to use. There
could be other information in the message (yes, I strtok and other things
I did to the message would break things)

> And why do you use msgb_length() and not msgb_l2len()?

Please us l2len. My example was wrong. Thanks for noticing that!




More information about the OpenBSC mailing list