Vadim Yanitskiy has uploaded this change for review. (
https://gerrit.osmocom.org/12786
Change subject: common/sim.c: use msgb_get() in gsm_sim_reply()
......................................................................
common/sim.c: use msgb_get() in gsm_sim_reply()
Change-Id: Ie5843c8adafc37da0d69c335c97b422552b85049
---
M src/host/layer23/src/common/sim.c
1 file changed, 1 insertion(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/86/12786/1
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 @@
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 @@
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;
--
To view, visit https://gerrit.osmocom.org/12786
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5843c8adafc37da0d69c335c97b422552b85049
Gerrit-Change-Number: 12786
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <[email protected]>