Bug 797512 Signaling: simplify set_dtls_fingerprint r=jesup

This commit is contained in:
Ethan Hugg 2012-10-22 16:38:52 -07:00
parent 1aa952bdb9
commit 8c014a3816

View File

@ -1587,9 +1587,8 @@ gsmsdp_set_dtls_fingerprint_attribute (sdp_attr_e sdp_attr, uint16_t level, void
sdp_result_e result; sdp_result_e result;
char hash_and_fingerprint[FSMDEF_MAX_DIGEST_ALG_LEN + FSMDEF_MAX_DIGEST_LEN + 2]; char hash_and_fingerprint[FSMDEF_MAX_DIGEST_ALG_LEN + FSMDEF_MAX_DIGEST_LEN + 2];
sstrncpy(hash_and_fingerprint, (cc_string_t)hash_func, FSMDEF_MAX_DIGEST_ALG_LEN); snprintf(hash_and_fingerprint, sizeof(hash_and_fingerprint),
sstrncat(hash_and_fingerprint, (cc_string_t)" ", sizeof(hash_and_fingerprint) - strlen(hash_and_fingerprint) - 1); "%s %s", hash_func, fingerprint);
sstrncat(hash_and_fingerprint, (cc_string_t)fingerprint, FSMDEF_MAX_DIGEST_LEN);
result = sdp_add_new_attr(sdp_p, level, 0, sdp_attr, &a_instance); result = sdp_add_new_attr(sdp_p, level, 0, sdp_attr, &a_instance);
if (result != SDP_SUCCESS) { if (result != SDP_SUCCESS) {