Commit 00ef8531 authored by johan's avatar johan
Browse files

Give DTLS fingerprint to context as soon as possible(do not wait for ice)

parent 6cbac7f1
......@@ -2349,6 +2349,36 @@ void static start_dtls_on_all_streams(LinphoneCall *call) {
void static set_dtls_fingerprint( MSMediaStreamSessions *sessions, const SalStreamDescription *sd,const SalStreamDescription *remote) {
if (sal_stream_description_has_dtls(sd) == TRUE) {
SalDtlsRole salRole = sd->dtls_role;
if (salRole!=SalDtlsRoleInvalid) { /* if DTLS is available at both end points */
/* give the peer certificate fingerprint to dtls context */
ms_dtls_srtp_set_peer_fingerprint(sessions->dtls_context, remote->dtls_fingerprint);
} else {
ms_warning("unable to start DTLS engine on stream session [%p], Dtls role in resulting media description is invalid",sessions);
void static set_dtls_fingerprint_on_all_streams(LinphoneCall *call) {
SalMediaDescription *remote_desc = sal_call_get_remote_media_description(call->op);
SalMediaDescription *result_desc = sal_call_get_final_media_description(call->op);
if (call->audiostream && (media_stream_get_state((const MediaStream *)call->audiostream) == MSStreamStarted))/*dtls must start at the end of ice*/
if (call->videostream && (media_stream_get_state((const MediaStream *)call->videostream) == MSStreamStarted))/*dtls must start at the end of ice*/
static void linphone_call_start_audio_stream(LinphoneCall *call, bool_t muted, bool_t send_ringbacktone, bool_t use_arc){
LinphoneCore *lc=call->core;
LpConfig* conf;
......@@ -2666,6 +2696,8 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut
LinphoneMediaEncryptionSRTP : LinphoneMediaEncryptionNone;
if ((call->ice_session != NULL) && (ice_session_state(call->ice_session) != IS_Completed)) {
} else {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment