Commit 87cf71d7 authored by jehan's avatar jehan

update ice to be compatible with rtp transport modifiers

parent 3138f02d
......@@ -127,7 +127,7 @@ typedef struct _IceStunServerCheckTransaction {
} IceStunServerCheckTransaction;
typedef struct _IceStunServerCheck {
ortp_socket_t sock;
RtpTransport *rtptp;
int srcport;
MSList *transactions; /**< List of IceStunServerCheckTransaction structures. */
MSTimeSpec next_transmission_time;
......
......@@ -389,19 +389,12 @@ static void ms_dtls_srtp_set_transport(MSDtlsSrtpContext *userData, RtpSession *
rtp_session_get_transports(s,&rtpt,&rtcpt);
ms_dtls_srtp_transport_modifier_new(userData, &rtp_modifier,&rtcp_modifier);
/*if transports are set, we assume they are meta transporters, otherwise create them*/
if (rtpt==NULL&&rtcpt==NULL){
meta_rtp_transport_new(&rtpt, TRUE, NULL, 0);
meta_rtp_transport_new(&rtcpt, FALSE, NULL, 0);
}
meta_rtp_transport_append_modifier(rtpt, rtp_modifier);
meta_rtp_transport_append_modifier(rtcpt, rtcp_modifier);
/* save transport modifier into context, needed to inject packets generated by DTLS */
userData->rtp_modifier = rtp_modifier;
rtp_session_set_transports(s, rtpt, rtcpt);
}
MSDtlsSrtpContext* ms_dtls_srtp_context_new(MediaStream *stream, RtpSession *s, MSDtlsSrtpParams *params){
......
This diff is collapsed.
......@@ -267,14 +267,8 @@ static int check_srtp_session_created(MediaStream *stream){
stream->sessions.srtp_session=session;
srtp_transport_modifier_new(session,&rtp_modifier,&rtcp_modifier);
rtp_session_get_transports(stream->sessions.rtp_session,&rtp,&rtcp);
/*if transports are set, we assume they are meta transporters, otherwise create them*/
if (rtp==NULL&&rtcp==NULL){
meta_rtp_transport_new(&rtp, TRUE, NULL, 0);
meta_rtp_transport_new(&rtcp, FALSE, NULL, 0);
}
meta_rtp_transport_append_modifier(rtp, rtp_modifier);
meta_rtp_transport_append_modifier(rtcp, rtcp_modifier);
rtp_session_set_transports(stream->sessions.rtp_session,rtp,rtcp);
stream->sessions.is_secured=TRUE;
}
return 0;
......
......@@ -355,19 +355,11 @@ static void ms_zrtp_set_transport(MSZrtpContext *userData, RtpSession *s) {
rtp_session_get_transports(s,&rtpt,&rtcpt);
ms_zrtp_transport_modifier_new(userData, &rtp_modifier,&rtcp_modifier);
/*if transports are set, we assume they are meta transporters, otherwise create them*/
if (rtpt==NULL&&rtcpt==NULL){
meta_rtp_transport_new(&rtpt, TRUE, NULL, 0);
meta_rtp_transport_new(&rtcpt, FALSE, NULL, 0);
}
meta_rtp_transport_append_modifier(rtpt, rtp_modifier);
meta_rtp_transport_append_modifier(rtcpt, rtcp_modifier);
/* save transport modifier into context, needed to inject packets generated by ZRTP */
userData->rtp_modifier = rtp_modifier;
rtp_session_set_transports(s, rtpt, rtcpt);
}
static MSZrtpContext* ms_zrtp_configure_context(MSZrtpContext *userData, RtpSession *s) {
bzrtpContext_t *context=userData->zrtpContext;
......
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