bugfix: do not retry without encryption when call is cancelled

This commit is contained in:
Simon Morlat 2012-04-04 12:29:03 +02:00
parent 5d60fae67e
commit 2111e92a39

View file

@ -561,16 +561,18 @@ static void call_failure(SalOp *op, SalError error, SalReason sr, const char *de
int i;
ms_message("Outgoing call failed with SRTP (SAVP) enabled - retrying with AVP");
linphone_call_stop_media_streams(call);
/* clear SRTP local params */
call->params.media_encryption = LinphoneMediaEncryptionNone;
for(i=0; i<call->localdesc->nstreams; i++) {
call->localdesc->streams[i].proto = SalProtoRtpAvp;
memset(call->localdesc->streams[i].crypto, 0, sizeof(call->localdesc->streams[i].crypto));
if (call->state==LinphoneCallOutgoingInit || call->state==LinphoneCallOutgoingProgress){
/* clear SRTP local params */
call->params.media_encryption = LinphoneMediaEncryptionNone;
for(i=0; i<call->localdesc->nstreams; i++) {
call->localdesc->streams[i].proto = SalProtoRtpAvp;
memset(call->localdesc->streams[i].crypto, 0, sizeof(call->localdesc->streams[i].crypto));
}
linphone_core_start_invite(lc, call, NULL);
}
linphone_core_start_invite(lc, call, NULL);
return;
}
msg=_("No common codecs");
msg=_("Incompatible media parameters.");
if (lc->vtable.display_status)
lc->vtable.display_status(lc,msg);
break;