зеркало из https://github.com/mozilla/gecko-dev.git
Bug 884573 - Add a=identity support for sipcc. r=abr
This commit is contained in:
Родитель
7097fddfd4
Коммит
2bc58720fc
|
@ -1888,17 +1888,15 @@ gsmsdp_set_setup_attribute(uint16_t level,
|
|||
*
|
||||
* Parameters:
|
||||
*
|
||||
* session - true = session level attribute, false = media line attribute
|
||||
* sdp_attr - The attribute to set
|
||||
* level - The media level of the SDP where the media attribute exists.
|
||||
* sdp_p - Pointer to the SDP to set the ice candidate attribute against.
|
||||
* hash_func - hash function string, e.g. "sha-1"
|
||||
* hash_func_len - string len
|
||||
* sdp_p - Pointer to the SDP to set the attribute against.
|
||||
* hash_func - hash function string, e.g. "sha-256"
|
||||
* fingerprint - fingerprint attribute to set
|
||||
* fingerprint_len - string len of fingerprint
|
||||
*/
|
||||
static void
|
||||
gsmsdp_set_dtls_fingerprint_attribute (sdp_attr_e sdp_attr, uint16_t level, void *sdp_p,
|
||||
char *hash_func,char *fingerprint)
|
||||
char *hash_func, char *fingerprint)
|
||||
{
|
||||
uint16_t a_instance = 0;
|
||||
sdp_result_e result;
|
||||
|
@ -1913,12 +1911,47 @@ gsmsdp_set_dtls_fingerprint_attribute (sdp_attr_e sdp_attr, uint16_t level, void
|
|||
return;
|
||||
}
|
||||
|
||||
result = sdp_attr_set_dtls_fingerprint_attribute(sdp_p, level, 0, sdp_attr, a_instance, hash_and_fingerprint);
|
||||
result = sdp_attr_set_dtls_fingerprint_attribute(sdp_p, level, 0, sdp_attr,
|
||||
a_instance, hash_and_fingerprint);
|
||||
if (result != SDP_SUCCESS) {
|
||||
GSM_ERR_MSG("Failed to set dtls fingerprint attribute");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* gsmsdp_set_identity_attribute
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* Adds an identity attribute to the specified SDP.
|
||||
*
|
||||
* Parameters:
|
||||
*
|
||||
* level - The media level of the SDP where the media attribute exists.
|
||||
* sdp_p - Pointer to the SDP to set the ice candidate attribute against.
|
||||
* identity - attribute value to set
|
||||
* identity_len - string len of fingerprint
|
||||
*/
|
||||
static void
|
||||
gsmsdp_set_identity_attribute (uint16_t level, void *sdp_p,
|
||||
char *identity)
|
||||
{
|
||||
uint16_t a_instance = 0;
|
||||
sdp_result_e result;
|
||||
|
||||
result = sdp_add_new_attr(sdp_p, level, 0, SDP_ATTR_IDENTITY, &a_instance);
|
||||
if (result != SDP_SUCCESS) {
|
||||
GSM_ERR_MSG("Failed to add attribute");
|
||||
return;
|
||||
}
|
||||
|
||||
result = sdp_attr_set_simple_string(sdp_p, level, 0, SDP_ATTR_IDENTITY,
|
||||
a_instance, identity);
|
||||
if (result != SDP_SUCCESS) {
|
||||
GSM_ERR_MSG("Failed to set identity attribute");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* gsmsdp_remove_sdp_direction
|
||||
*
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -168,6 +168,8 @@ const sdp_attrarray_t sdp_attr[SDP_MAX_ATTR_TYPES] =
|
|||
sdp_parse_attr_rtcp_mux_attr, sdp_build_attr_rtcp_mux_attr},
|
||||
{"fingerprint", sizeof("fingerprint"),
|
||||
sdp_parse_attr_fingerprint_attr, sdp_build_attr_simple_string},
|
||||
{"identity", sizeof("identity"),
|
||||
sdp_parse_attr_simple_string, sdp_build_attr_simple_string},
|
||||
{"maxptime", sizeof("maxptime"),
|
||||
sdp_parse_attr_simple_u32, sdp_build_attr_simple_u32},
|
||||
{"rtcp-fb", sizeof("rtcp-fb"),
|
||||
|
|
|
@ -246,6 +246,7 @@ typedef enum {
|
|||
SDP_ATTR_RTCP_FB, /* RFC 4585 */
|
||||
SDP_ATTR_SETUP,
|
||||
SDP_ATTR_CONNECTION,
|
||||
SDP_ATTR_IDENTITY,
|
||||
SDP_MAX_ATTR_TYPES,
|
||||
SDP_ATTR_INVALID
|
||||
} sdp_attr_e;
|
||||
|
|
Загрузка…
Ссылка в новой задаче