From e29ec85375f004e63c650e69a9fe5910b15a00eb Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 5 Jan 2018 14:30:22 +0100 Subject: Use existing function for TLLI encoding Use bssgp_msgb_tlli_put() instead of copy-pasted code. Change-Id: I06d60566a19dcae701f8648c19fbd8db6d586f77 --- src/gb/gprs_bssgp_bss.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/gb/gprs_bssgp_bss.c') diff --git a/src/gb/gprs_bssgp_bss.c b/src/gb/gprs_bssgp_bss.c index c7e5e4d6..487286c4 100644 --- a/src/gb/gprs_bssgp_bss.c +++ b/src/gb/gprs_bssgp_bss.c @@ -396,7 +396,6 @@ int bssgp_tx_fc_ms(struct bssgp_bvc_ctx *bctx, uint32_t tlli, uint8_t tag, struct msgb *msg; struct bssgp_normal_hdr *bgph; uint16_t e_bucket_size, e_leak_rate; - uint32_t e_tlli; if ((ms_bucket_size / 100) > 0xffff) return -EINVAL; @@ -412,8 +411,7 @@ int bssgp_tx_fc_ms(struct bssgp_bvc_ctx *bctx, uint32_t tlli, uint8_t tag, msgb_bvci(msg) = bctx->bvci; bgph->pdu_type = BSSGP_PDUT_FLOW_CONTROL_MS; - e_tlli = osmo_htonl(tlli); - msgb_tvlv_put(msg, BSSGP_IE_TLLI, sizeof(e_tlli), (uint8_t *)&e_tlli); + bssgp_msgb_tlli_put(msg, tlli); msgb_tvlv_put(msg, BSSGP_IE_TAG, sizeof(tag), (uint8_t *)&tag); msgb_tvlv_put(msg, BSSGP_IE_MS_BUCKET_SIZE, sizeof(e_bucket_size), (uint8_t *) &e_bucket_size); -- cgit v1.2.3