add msgb_set_talloc_ctx() to set the talloc context for msgb allocations

This commit is contained in:
Harald Welte 2011-06-29 18:46:10 +02:00
parent 7721a77eaf
commit 9e1f0604b5
2 changed files with 7 additions and 0 deletions

View File

@ -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 */

View File

@ -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;
}