summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-02-02 12:37:50 +0300
committerVadim Yanitskiy <axilirator@gmail.com>2019-02-02 12:37:50 +0300
commit1c6263b2be90b3916471a37c2ff323fc725dfc92 (patch)
treee4444439d3e39b39c30c7f8bb8cff279406932cc /src
parent6c04bd39c4a8bb99397058ec3ccbf9f00d8b9617 (diff)
common/sim.c: use msgb_get() in gsm_sim_reply()
Diffstat (limited to 'src')
-rw-r--r--src/host/layer23/src/common/sim.c6
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 f214e67..2c6c83c 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;