Bug 797512 Signaling: simplify set_dtls_fingerprint r=jesup
authorEthan Hugg <ethanhugg@gmail.com>
Mon, 22 Oct 2012 16:38:52 -0700
changeset 111181 f10906c2a70508ba1db3c972cabda00249a43184
parent 111180 a1925dde08ba5656733b72b5d406ab8a8b1a4479
child 111182 04a2e09f4bc1da54f8638abdb5f66a62f1eb2fd5
push id16917
push userrjesup@wgate.com
push dateTue, 23 Oct 2012 20:18:56 +0000
treeherdermozilla-inbound@04a2e09f4bc1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs797512
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 797512 Signaling: simplify set_dtls_fingerprint r=jesup
media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
--- a/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
+++ b/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
@@ -1582,19 +1582,18 @@ gsmsdp_set_rtcp_mux_attribute (sdp_attr_
 static void
 gsmsdp_set_dtls_fingerprint_attribute (sdp_attr_e sdp_attr, uint16_t level, void *sdp_p,
   char *hash_func,char *fingerprint)
 {
     uint16_t      a_instance = 0;
     sdp_result_e  result;
     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);
-    sstrncat(hash_and_fingerprint, (cc_string_t)" ", sizeof(hash_and_fingerprint) - strlen(hash_and_fingerprint) - 1);
-    sstrncat(hash_and_fingerprint, (cc_string_t)fingerprint, FSMDEF_MAX_DIGEST_LEN);
+    snprintf(hash_and_fingerprint, sizeof(hash_and_fingerprint),
+         "%s %s", hash_func, fingerprint);
 
     result = sdp_add_new_attr(sdp_p, level, 0, sdp_attr, &a_instance);
     if (result != SDP_SUCCESS) {
         GSM_ERR_MSG("Failed to add attribute\n");
         return;
     }
 
     result = sdp_attr_set_dtls_fingerprint_attribute(sdp_p, level, 0, sdp_attr, a_instance, hash_and_fingerprint);