This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "An utility library for Open Source Mobile Communications".
The branch, neels/msgb_ctx has been created
at c69eb4585c89f5a6c28fbe8e5da8804322460f91 (commit)
- Log -----------------------------------------------------------------
http://cgit.osmocom.org/libosmocore/commit/?id=c69eb4585c89f5a6c28fbe8e5da8…
commit c69eb4585c89f5a6c28fbe8e5da8804322460f91
Author: Neels Hofmeyr <nhofmeyr(a)sysmocom.de>
Date: Fri Sep 16 02:37:24 2016 +0200
gsm0408_test: initialize msgb talloc ctx
Change-Id: Ib26214add1932e93651c248cc09fbc68339b4dce
http://cgit.osmocom.org/libosmocore/commit/?id=c6e058be7b39ec3e91c5db5e238f…
commit c6e058be7b39ec3e91c5db5e238f7f8c0a817621
Author: Neels Hofmeyr <nhofmeyr(a)sysmocom.de>
Date: Fri Sep 16 00:15:56 2016 +0200
msgb: add msgb_talloc_ctx_init(), deprecate msgb_set_talloc_ctx()
So far each and every main() scope creates a msgb talloc context and either
passes it to msgb_set_talloc_ctx() or sets tall_msgb_ctx directly (by defining
it extern first).
Remove some code duplication: add one central function that creates the
"msgb"
talloc context for all.
Most users of msgb employ a talloc_named_const(), but osmo-bts uses a
talloc_pool() instead. Offer both ways by means of the pool_size argument, and
for both ways make sure the context is called "msgb".
Suggest that msgb users should move to this new function: deprecate
msgb_set_talloc_ctx(). To be able to do so, include core/defs.h in msgb.h.
There's a tradeoff between hiding the msgb talloc context behind API that tries
to guess all use cases versus avoiding code dup. This patch opts against code
dup and boldly assumes that all future use is covered.
Also, the new function suggests to not access tall_msgb_ctx directly, which can
be considered a style improvement.
It seems that not all main scopes that use msgb actually initialize the msgb
ctx. As a fallback for these, explicitly initialize tall_msgb_ctx to NULL.
Change-Id: I747fbbf977c4d2c868c8dead64cfc5fd86eb8d4c
-----------------------------------------------------------------------
hooks/post-receive
--
An utility library for Open Source Mobile Communications