diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-09-29 14:17:43 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-09-29 14:25:04 +0200 |
commit | fd356bdcd268a57194f1e2093ae079b0f30be448 (patch) | |
tree | 8732e6dc773db22f7e8e87b6e6e6c0eab29b8833 | |
parent | ae6ae89a199556293f4cfca26efbfadd828e3252 (diff) |
Allocate struct osmux_in_handle through new libosmo-netif APIs
Depends: libosmo-netif.git I752ab031f935f04731bb1a354333f1682a1aa5bd
Change-Id: I132a7c03213cb20dfe118616c8cfd7032b075507
-rw-r--r-- | TODO-RELEASE | 2 | ||||
-rw-r--r-- | src/common/osmux.c | 19 |
2 files changed, 8 insertions, 13 deletions
diff --git a/TODO-RELEASE b/TODO-RELEASE index d0ab49f3..84937cf8 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -8,5 +8,5 @@ # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line libosmocore >1.7.0 BTS_FEAT_OSMUX, RSL_IE_OSMO_OSMUX_CID -libosmo-netif >1.2.0 OSMUX_DEFAULT_PORT +libosmo-netif >1.2.0 OSMUX_DEFAULT_PORT, new osmux APIs libosmo-abis >1.3.0 e1inp_ipa_bts_rsl_close_n() diff --git a/src/common/osmux.c b/src/common/osmux.c index e443d1d0..caea4eca 100644 --- a/src/common/osmux.c +++ b/src/common/osmux.c @@ -138,7 +138,7 @@ static void osmux_handle_put(struct gsm_bts *bts, struct osmux_in_handle *in) in->stats.output_osmux_msgs, in->stats.output_osmux_bytes); llist_del(&h->head); - osmux_xfrm_input_fini(h->in); + TALLOC_FREE(h->in); talloc_free(h); } return; @@ -159,22 +159,17 @@ static struct osmux_handle *osmux_handle_alloc(struct gsm_bts *bts, const struct h->rem_addr = *rem_addr; h->refcnt++; - h->in = talloc_zero(h, struct osmux_in_handle); + h->in = osmux_xfrm_input_alloc(h); if (!h->in) { talloc_free(h); return NULL; } - /* sequence number to start OSMUX message from */ - h->in->osmux_seq = 0; - - h->in->batch_factor = bts->osmux.batch_factor; - - /* If batch size is zero, the library defaults to 1470 bytes. */ - h->in->batch_size = bts->osmux.batch_size; - h->in->deliver = osmux_deliver_cb; - osmux_xfrm_input_init(h->in); - h->in->data = h; + osmux_xfrm_input_set_initial_seqnum(h->in, 0); + osmux_xfrm_input_set_batch_factor(h->in, bts->osmux.batch_factor); + /* If batch size is zero, the library defaults to 1472 bytes. */ + osmux_xfrm_input_set_batch_size(h->in, bts->osmux.batch_size); + osmux_xfrm_input_set_deliver_cb(h->in, osmux_deliver_cb, h); llist_add(&h->head, &bts->osmux.osmux_handle_list); |