diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2019-02-02 12:37:50 +0300 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2019-02-02 12:37:50 +0300 |
commit | 1c6263b2be90b3916471a37c2ff323fc725dfc92 (patch) | |
tree | e4444439d3e39b39c30c7f8bb8cff279406932cc /src/host/layer23/src/common/sim.c | |
parent | 6c04bd39c4a8bb99397058ec3ccbf9f00d8b9617 (diff) |
common/sim.c: use msgb_get() in gsm_sim_reply()
Change-Id: Ie5843c8adafc37da0d69c335c97b422552b85049
Diffstat (limited to 'src/host/layer23/src/common/sim.c')
-rw-r--r-- | src/host/layer23/src/common/sim.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/host/layer23/src/common/sim.c b/src/host/layer23/src/common/sim.c index f214e679..2c6c83c6 100644 --- a/src/host/layer23/src/common/sim.c +++ b/src/host/layer23/src/common/sim.c @@ -146,7 +146,6 @@ void gsm_sim_reply(struct osmocom_ms *ms, uint8_t result_type, uint8_t *result, struct gsm_sim *sim = &ms->sim; struct msgb *msg = sim->job_msg; struct sim_hdr *sh; - uint16_t payload_len; struct gsm_sim_handler *handler; LOGP(DSIM, LOGL_INFO, "sending result to callback function " @@ -164,11 +163,8 @@ void gsm_sim_reply(struct osmocom_ms *ms, uint8_t result_type, uint8_t *result, return; } - payload_len = msg->len - sizeof(*sh); - /* remove data */ - msg->tail -= payload_len; - msg->len -= payload_len; + msgb_get(msg, msg->len - sizeof(*sh)); /* add reply data */ sh->job_type = result_type; |