gsm0808: Fix the format of the clear IE...
authorHolger Hans Peter Freyther <zecke@selfish.org>
Wed, 27 Oct 2010 10:36:05 +0000 (12:36 +0200)
committerHolger Hans Peter Freyther <zecke@selfish.org>
Wed, 27 Oct 2010 10:36:05 +0000 (12:36 +0200)
This is really TLV...

src/gsm0808.c

index 2424d8c..3962baa 100644 (file)
@@ -115,8 +115,9 @@ struct msgb *gsm0808_create_clear_command(uint8_t reason)
        if (!msg)
                return NULL;
 
-       msg->l3h = msgb_tv_put(msg, BSSAP_MSG_BSS_MANAGEMENT, 2);
-       msgb_tv_put(msg, BSS_MAP_MSG_CLEAR_CMD, reason);
+       msg->l3h = msgb_tv_put(msg, BSSAP_MSG_BSS_MANAGEMENT, 4);
+       msgb_v_put(msg, BSS_MAP_MSG_CLEAR_CMD);
+       msgb_tlv_put(msg, GSM0808_IE_CAUSE, 1, &reason);
        return msg;
 }