mirror of https://gerrit.osmocom.org/libosmocore
add msgb_set_talloc_ctx() to set the talloc context for msgb allocations
This commit is contained in:
parent
7721a77eaf
commit
9e1f0604b5
|
@ -193,5 +193,7 @@ static inline struct msgb *msgb_alloc_headroom(int size, int headroom,
|
|||
uint8_t *msgb_data(const struct msgb *msg);
|
||||
uint16_t msgb_length(const struct msgb *msg);
|
||||
|
||||
/* set the talloc context for msgb_alloc[_headroom] */
|
||||
void msgb_set_talloc_ctx(void *ctx);
|
||||
|
||||
#endif /* _MSGB_H */
|
||||
|
|
|
@ -98,3 +98,8 @@ uint16_t msgb_length(const struct msgb *msg)
|
|||
{
|
||||
return msg->len;
|
||||
}
|
||||
|
||||
void msgb_set_talloc_ctx(void *ctx)
|
||||
{
|
||||
tall_msgb_ctx = ctx;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue