mirror of https://gerrit.osmocom.org/libosmocore
gsmtap_makemsg_ex: NULL for unknown chan_type
Related: osmo-bts Ic22ab71e520ab44429a93724250d349d16250801 Change-Id: Ib4147a33a75c3cf425c30da8b0678c7fba8a371d
This commit is contained in:
parent
cf70aa0c40
commit
12f93be607
|
@ -169,7 +169,8 @@ void chantype_gsmtap2rsl(uint8_t gsmtap_chantype, uint8_t *rsl_chantype,
|
||||||
* \param[in] snr Signal/Noise Ratio (SNR)
|
* \param[in] snr Signal/Noise Ratio (SNR)
|
||||||
* \param[in] data Pointer to data buffer
|
* \param[in] data Pointer to data buffer
|
||||||
* \param[in] len Length of \ref data
|
* \param[in] len Length of \ref data
|
||||||
* \return dynamically allocated message buffer containing data
|
* \return dynamically allocated message buffer containing data,
|
||||||
|
* or NULL for unknown chan_type
|
||||||
*
|
*
|
||||||
* This function will allocate a new msgb and fill it with a GSMTAP
|
* This function will allocate a new msgb and fill it with a GSMTAP
|
||||||
* header containing the information
|
* header containing the information
|
||||||
|
@ -182,6 +183,9 @@ struct msgb *gsmtap_makemsg_ex(uint8_t type, uint16_t arfcn, uint8_t ts, uint8_t
|
||||||
struct gsmtap_hdr *gh;
|
struct gsmtap_hdr *gh;
|
||||||
uint8_t *dst;
|
uint8_t *dst;
|
||||||
|
|
||||||
|
if (chan_type == GSMTAP_CHANNEL_UNKNOWN)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
msg = msgb_alloc(sizeof(*gh) + len, "gsmtap_tx");
|
msg = msgb_alloc(sizeof(*gh) + len, "gsmtap_tx");
|
||||||
if (!msg)
|
if (!msg)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue