Add mandatory "security description" SDP parameter to the PANU profile
Pointed-out by: Iain Hibbert < plunky at rya-online dot net > MFC after: 3 days
This commit is contained in:
parent
e653f1f0f4
commit
07f8cd18c6
@ -675,6 +675,8 @@ struct sdp_panu_profile
|
|||||||
uint8_t reserved;
|
uint8_t reserved;
|
||||||
uint8_t load_factor;
|
uint8_t load_factor;
|
||||||
uint16_t psm; /* HBO */
|
uint16_t psm; /* HBO */
|
||||||
|
uint16_t security_description; /* HBO */
|
||||||
|
uint16_t reserved2;
|
||||||
};
|
};
|
||||||
typedef struct sdp_panu_profile sdp_panu_profile_t;
|
typedef struct sdp_panu_profile sdp_panu_profile_t;
|
||||||
typedef struct sdp_panu_profile * sdp_panu_profile_p;
|
typedef struct sdp_panu_profile * sdp_panu_profile_p;
|
||||||
|
@ -128,6 +128,19 @@ panu_profile_create_service_availability(
|
|||||||
&panu->load_factor, 1));
|
&panu->load_factor, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int32_t
|
||||||
|
panu_profile_create_security_description(
|
||||||
|
uint8_t *buf, uint8_t const * const eob,
|
||||||
|
uint8_t const *data, uint32_t datalen)
|
||||||
|
{
|
||||||
|
provider_p provider = (provider_p) data;
|
||||||
|
sdp_panu_profile_p panu = (sdp_panu_profile_p) provider->data;
|
||||||
|
|
||||||
|
return (bnep_profile_create_security_description(buf, eob,
|
||||||
|
(uint8_t const *) &panu->security_description,
|
||||||
|
sizeof(panu->security_description)));
|
||||||
|
}
|
||||||
|
|
||||||
static attr_t panu_profile_attrs[] = {
|
static attr_t panu_profile_attrs[] = {
|
||||||
{ SDP_ATTR_SERVICE_RECORD_HANDLE,
|
{ SDP_ATTR_SERVICE_RECORD_HANDLE,
|
||||||
common_profile_create_service_record_handle },
|
common_profile_create_service_record_handle },
|
||||||
@ -145,6 +158,8 @@ static attr_t panu_profile_attrs[] = {
|
|||||||
panu_profile_create_service_name },
|
panu_profile_create_service_name },
|
||||||
{ SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_DESCRIPTION_OFFSET,
|
{ SDP_ATTR_PRIMARY_LANGUAGE_BASE_ID + SDP_ATTR_SERVICE_DESCRIPTION_OFFSET,
|
||||||
panu_profile_create_service_description },
|
panu_profile_create_service_description },
|
||||||
|
{ SDP_ATTR_SECURITY_DESCRIPTION,
|
||||||
|
panu_profile_create_security_description },
|
||||||
{ 0, NULL } /* end entry */
|
{ 0, NULL } /* end entry */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user