This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/12924
Change subject: Fix BSSMAP length generated by gsm0808_create_clear_command2()
......................................................................
Fix BSSMAP length generated by gsm0808_create_clear_command2()
In Change-Id Id8a75e1da2d5f520064666e4ee413d1c91da6ae3 we recently
introduced adding the "CSFB INDICATOR" IE to the CLEAR COMMAND,
but we did so with a wrong length value.
Change-Id: I4d07d25fb03ca0f89fd7b94226c54309c77a010a
Closes: OS#3805
Related: OS#2778
---
M src/gsm/gsm0808.c
1 file changed, 8 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/24/12924/1
diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c
index 2907255..d44560c 100644
--- a/src/gsm/gsm0808.c
+++ b/src/gsm/gsm0808.c
@@ -183,16 +183,7 @@
* \returns callee-allocated msgb with BSSMAP Clear Command message */
struct msgb *gsm0808_create_clear_command(uint8_t cause)
{
- struct msgb *msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM,
- "bssmap: clear command");
- if (!msg)
- return NULL;
-
- msg->l3h = msgb_tv_put(msg, BSSAP_MSG_BSS_MANAGEMENT, 4);
- msgb_v_put(msg, BSS_MAP_MSG_CLEAR_CMD);
- gsm0808_enc_cause(msg, cause);
-
- return msg;
+ return gsm0808_create_clear_command2(cause, false);
}
/*! Create BSSMAP Clear Command message.
@@ -201,13 +192,19 @@
* \returns callee-allocated msgb with BSSMAP Clear Command message. */
struct msgb *gsm0808_create_clear_command2(uint8_t cause, bool csfb_ind)
{
- struct msgb *msg = gsm0808_create_clear_command(cause);
+ struct msgb *msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM,
+ "bssmap: clear command");
if (!msg)
return NULL;
+ msgb_v_put(msg, BSS_MAP_MSG_CLEAR_CMD);
+ gsm0808_enc_cause(msg, cause);
+
if (csfb_ind)
msgb_v_put(msg, GSM0808_IE_CSFB_INDICATION);
+ msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg));
+
return msg;
}
--
To view, visit https://gerrit.osmocom.org/12924
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d07d25fb03ca0f89fd7b94226c54309c77a010a
Gerrit-Change-Number: 12924
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190218/0c0a3ba3/attachment.htm>