mirror of https://gerrit.osmocom.org/libosmocore
Rename msgb_wrap_with_TL()
This resolves an issue introduced in 84fb5bb6a0
when msgb_wrap_with_TL() was introduced as an inline function with
*exactly the same name* as in osmo-msc.git and openbsc.git. We *NEVER*
do something like this. Functions moved from applications to library
*MUST* always be renamed. This has been the case for almost a decade
now.
With this subsequent change we make sure the libosmocore function
has a different name and doesn't clash. After this commit, old
openbsc.git and osmo-bsc.git should again build fine.
Change-Id: If1e851ac605c8d2fde3da565b0bd674ea6350c2e
This commit is contained in:
parent
a0c1cba28a
commit
b27e6feb69
|
@ -368,7 +368,7 @@ static inline void msgb_push_u32(struct msgb *msg, uint32_t word)
|
||||||
osmo_store32be(word, space);
|
osmo_store32be(word, space);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned char *msgb_wrap_with_TL(struct msgb *msgb, uint8_t tag)
|
static inline unsigned char *msgb_push_tl(struct msgb *msgb, uint8_t tag)
|
||||||
{
|
{
|
||||||
uint8_t *data = msgb_push(msgb, 2);
|
uint8_t *data = msgb_push(msgb, 2);
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ int gsm0480_wrap_invoke(struct msgb *msg, int op, int link_id)
|
||||||
msgb_tlv1_push(msg, GSM0480_COMPIDTAG_INVOKE_ID, link_id);
|
msgb_tlv1_push(msg, GSM0480_COMPIDTAG_INVOKE_ID, link_id);
|
||||||
|
|
||||||
/* 1. component tag */
|
/* 1. component tag */
|
||||||
msgb_wrap_with_TL(msg, GSM0480_CTYPE_INVOKE);
|
msgb_push_tl(msg, GSM0480_CTYPE_INVOKE);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ int gsm0480_wrap_invoke(struct msgb *msg, int op, int link_id)
|
||||||
/* wrap the GSM 04.08 Facility IE around it */
|
/* wrap the GSM 04.08 Facility IE around it */
|
||||||
int gsm0480_wrap_facility(struct msgb *msg)
|
int gsm0480_wrap_facility(struct msgb *msg)
|
||||||
{
|
{
|
||||||
msgb_wrap_with_TL(msg, GSM0480_IE_FACILITY);
|
msgb_push_tl(msg, GSM0480_IE_FACILITY);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -793,26 +793,26 @@ struct msgb *gsm0480_gen_ussd_resp_7bit(uint8_t invoke_id, const char *text)
|
||||||
msgb_put(msg, response_len);
|
msgb_put(msg, response_len);
|
||||||
|
|
||||||
/* Then wrap it as an Octet String */
|
/* Then wrap it as an Octet String */
|
||||||
msgb_wrap_with_TL(msg, ASN1_OCTET_STRING_TAG);
|
msgb_push_tl(msg, ASN1_OCTET_STRING_TAG);
|
||||||
|
|
||||||
/* Pre-pend the DCS octet string */
|
/* Pre-pend the DCS octet string */
|
||||||
msgb_tlv1_push(msg, ASN1_OCTET_STRING_TAG, 0x0F);
|
msgb_tlv1_push(msg, ASN1_OCTET_STRING_TAG, 0x0F);
|
||||||
|
|
||||||
/* Then wrap these as a Sequence */
|
/* Then wrap these as a Sequence */
|
||||||
msgb_wrap_with_TL(msg, GSM_0480_SEQUENCE_TAG);
|
msgb_push_tl(msg, GSM_0480_SEQUENCE_TAG);
|
||||||
|
|
||||||
/* Pre-pend the operation code */
|
/* Pre-pend the operation code */
|
||||||
msgb_tlv1_push(msg, GSM0480_OPERATION_CODE,
|
msgb_tlv1_push(msg, GSM0480_OPERATION_CODE,
|
||||||
GSM0480_OP_CODE_PROCESS_USS_REQ);
|
GSM0480_OP_CODE_PROCESS_USS_REQ);
|
||||||
|
|
||||||
/* Wrap the operation code and IA5 string as a sequence */
|
/* Wrap the operation code and IA5 string as a sequence */
|
||||||
msgb_wrap_with_TL(msg, GSM_0480_SEQUENCE_TAG);
|
msgb_push_tl(msg, GSM_0480_SEQUENCE_TAG);
|
||||||
|
|
||||||
/* Pre-pend the invoke ID */
|
/* Pre-pend the invoke ID */
|
||||||
msgb_tlv1_push(msg, GSM0480_COMPIDTAG_INVOKE_ID, invoke_id);
|
msgb_tlv1_push(msg, GSM0480_COMPIDTAG_INVOKE_ID, invoke_id);
|
||||||
|
|
||||||
/* Wrap this up as a Return Result component */
|
/* Wrap this up as a Return Result component */
|
||||||
msgb_wrap_with_TL(msg, GSM0480_CTYPE_RETURN_RESULT);
|
msgb_push_tl(msg, GSM0480_CTYPE_RETURN_RESULT);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
@ -832,7 +832,7 @@ struct msgb *gsm0480_create_ussd_resp(uint8_t invoke_id, uint8_t trans_id, const
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* Wrap the component in a Facility message */
|
/* Wrap the component in a Facility message */
|
||||||
msgb_wrap_with_TL(msg, GSM0480_IE_FACILITY);
|
msgb_push_tl(msg, GSM0480_IE_FACILITY);
|
||||||
|
|
||||||
/* And finally pre-pend the L3 header */
|
/* And finally pre-pend the L3 header */
|
||||||
gsm48_push_l3hdr_tid(msg, GSM48_PDISC_NC_SS,
|
gsm48_push_l3hdr_tid(msg, GSM48_PDISC_NC_SS,
|
||||||
|
@ -863,7 +863,7 @@ struct msgb *gsm0480_gen_return_error(uint8_t invoke_id, uint8_t error_code)
|
||||||
msgb_tlv1_push(msg, GSM0480_COMPIDTAG_INVOKE_ID, invoke_id);
|
msgb_tlv1_push(msg, GSM0480_COMPIDTAG_INVOKE_ID, invoke_id);
|
||||||
|
|
||||||
/* Wrap this up as a Reject component */
|
/* Wrap this up as a Reject component */
|
||||||
msgb_wrap_with_TL(msg, GSM0480_CTYPE_RETURN_ERROR);
|
msgb_push_tl(msg, GSM0480_CTYPE_RETURN_ERROR);
|
||||||
|
|
||||||
/* FIXME: Wrap in Facility + L3? */
|
/* FIXME: Wrap in Facility + L3? */
|
||||||
return msg;
|
return msg;
|
||||||
|
@ -896,7 +896,7 @@ struct msgb *gsm0480_gen_reject(int invoke_id, uint8_t problem_tag, uint8_t prob
|
||||||
msgb_tlv1_push(msg, GSM0480_COMPIDTAG_INVOKE_ID, invoke_id);
|
msgb_tlv1_push(msg, GSM0480_COMPIDTAG_INVOKE_ID, invoke_id);
|
||||||
|
|
||||||
/* Wrap this up as a Reject component */
|
/* Wrap this up as a Reject component */
|
||||||
msgb_wrap_with_TL(msg, GSM0480_CTYPE_REJECT);
|
msgb_push_tl(msg, GSM0480_CTYPE_REJECT);
|
||||||
|
|
||||||
/* FIXME: Wrap in Facility + L3? */
|
/* FIXME: Wrap in Facility + L3? */
|
||||||
return msg;
|
return msg;
|
||||||
|
|
Loading…
Reference in New Issue