diff --git a/plugins/provider/sip/calls-sdp-crypto-context.c b/plugins/provider/sip/calls-sdp-crypto-context.c index 1cf6d7b..726e65c 100644 --- a/plugins/provider/sip/calls-sdp-crypto-context.c +++ b/plugins/provider/sip/calls-sdp-crypto-context.c @@ -468,8 +468,6 @@ calls_sdp_crypto_context_generate_offer (CallsSdpCryptoContext *self) gboolean calls_sdp_crypto_context_generate_answer (CallsSdpCryptoContext *self) { - calls_srtp_crypto_attribute *attr = NULL; - g_return_val_if_fail (CALLS_IS_SDP_CRYPTO_CONTEXT (self), FALSE); if (self->state != CALLS_CRYPTO_CONTEXT_STATE_OFFER_REMOTE) { @@ -482,20 +480,17 @@ calls_sdp_crypto_context_generate_answer (CallsSdpCryptoContext *self) calls_srtp_crypto_attribute *attr_offer = node->data; if (crypto_attribute_is_supported (self, attr_offer)) { - attr = calls_srtp_crypto_attribute_new (1); + calls_srtp_crypto_attribute *attr = calls_srtp_crypto_attribute_new (1); + attr->crypto_suite = attr_offer->crypto_suite; attr->tag = attr_offer->tag; calls_srtp_crypto_attribute_init_keys (attr); - break; + self->local_crypto_attributes = g_list_append (NULL, attr); + return update_state (self); } } - if (!attr) - return FALSE; - - self->local_crypto_attributes = g_list_append (NULL, attr); - - return update_state (self); + return FALSE; } diff --git a/plugins/provider/sip/calls-srtp-utils.h b/plugins/provider/sip/calls-srtp-utils.h index d807275..94d097f 100644 --- a/plugins/provider/sip/calls-srtp-utils.h +++ b/plugins/provider/sip/calls-srtp-utils.h @@ -32,8 +32,8 @@ typedef enum { CALLS_SRTP_SUITE_UNKNOWN = 0, CALLS_SRTP_SUITE_AES_CM_128_SHA1_32, /* RFC 4568 */ CALLS_SRTP_SUITE_AES_CM_128_SHA1_80, /* RFC 4568 */ - CALLS_SRTP_SUITE_AES_192_CM_SHA1_32, /* RFC 6188 not supperted by Gst */ - CALLS_SRTP_SUITE_AES_192_CM_SHA1_80, /* RFC 6188 not supperted by Gst */ + CALLS_SRTP_SUITE_AES_192_CM_SHA1_32, /* RFC 6188 not supported by Gst */ + CALLS_SRTP_SUITE_AES_192_CM_SHA1_80, /* RFC 6188 not supported by Gst */ CALLS_SRTP_SUITE_AES_256_CM_SHA1_32, /* RFC 6188 */ CALLS_SRTP_SUITE_AES_256_CM_SHA1_80, /* RFC 6188 */ CALLS_SRTP_SUITE_F8_128_HMAC_SHA1_32, /* RFC 4568 but not supported by GstSrtpEnc/GstSrtpDec */