osmux: add osmux_xfrm_input_fini()
To clean up the osmux input handle.
This commit is contained in:
parent
69d989aa96
commit
0143d6ec18
|
@ -68,6 +68,7 @@ static inline uint8_t *osmux_get_payload(struct osmux_hdr *osmuxh)
|
|||
int osmux_snprintf(char *buf, size_t size, struct msgb *msg);
|
||||
|
||||
void osmux_xfrm_input_init(struct osmux_in_handle *h);
|
||||
void osmux_xfrm_input_fini(struct osmux_in_handle *h);
|
||||
|
||||
int osmux_xfrm_input(struct osmux_in_handle *h, struct msgb *msg, int ccid);
|
||||
void osmux_xfrm_input_deliver(struct osmux_in_handle *h);
|
||||
|
|
12
src/osmux.c
12
src/osmux.c
|
@ -557,6 +557,18 @@ void osmux_xfrm_input_init(struct osmux_in_handle *h)
|
|||
h->internal_data = (void *)batch;
|
||||
}
|
||||
|
||||
void osmux_xfrm_input_fini(struct osmux_in_handle *h)
|
||||
{
|
||||
struct osmux_batch *batch = (struct osmux_batch *)h->internal_data;
|
||||
struct batch_list_node *node, *next;
|
||||
|
||||
llist_for_each_entry_safe(node, next, &batch->node_list, head) {
|
||||
llist_del(&node->head);
|
||||
talloc_free(node);
|
||||
}
|
||||
talloc_free(batch);
|
||||
}
|
||||
|
||||
struct osmux_tx_handle {
|
||||
struct osmo_timer_list timer;
|
||||
struct msgb *msg;
|
||||
|
|
Loading…
Reference in New Issue