From b3fc27423a76ab4178a3734423800bebd2e9f639 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 17 Jul 2015 19:55:18 +0200 Subject: osmux: introduce osmux_xfrm_input_close_circuit() Add this new function to explicitly remove an existing circuit. Thus, the client application (openbsc) is in full control to release circuits. Before this patch, the circuit object was added when the first RTP messages was seen, and it was removed when transforming the list of pending RTP messages to the Osmux message (once the timer expired). Moreover, check circuit->nmsgs to account bytes that are consumed by the osmux header, given that !circuit doesn't mean "this is the first packet" anymore. --- include/osmocom/netif/osmux.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/osmocom/netif/osmux.h') diff --git a/include/osmocom/netif/osmux.h b/include/osmocom/netif/osmux.h index 0f6f5c9..14c967f 100644 --- a/include/osmocom/netif/osmux.h +++ b/include/osmocom/netif/osmux.h @@ -84,6 +84,8 @@ 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); +void osmux_xfrm_input_close_circuit(struct osmux_in_handle *h, int ccid); + int osmux_xfrm_input(struct osmux_in_handle *h, struct msgb *msg, int ccid); void osmux_xfrm_input_deliver(struct osmux_in_handle *h); -- cgit v1.2.3