mobile: gsm_forward_mncc(): call mncc_sock_from_cc() directly

This way we can avoid allocating another msgb and enqueue the given
msgb directly to the write queue of the MNCC socket.

Change-Id: I29305866e61a0bc3bd082108af6a9ba8ff86bcf2
Related: OS#5599
This commit is contained in:
Vadim Yanitskiy 2022-11-30 22:38:41 +07:00
parent 100ec4ca6f
commit e69d3f4ba1
1 changed files with 2 additions and 3 deletions

View File

@ -51,9 +51,8 @@ static int gsm_forward_mncc(struct osmocom_ms *ms, struct msgb *msg)
}
/* distribute and then free */
if (ms->mncc_entity.mncc_recv && ms->mncc_entity.ref) {
ms->mncc_entity.mncc_recv(ms, mncc->msg_type, mncc);
}
if (ms->mncc_entity.sock_state && ms->mncc_entity.ref)
return mncc_sock_from_cc(ms->mncc_entity.sock_state, msg);
exit_free:
msgb_free(msg);