622abeeaf1287724a30b01b0fe615059b903097c — Stephen Paul Weber 3 years ago d424a90
Default to active on session-accept

Sometimes we send session-accept before the other side has expressed a clear
preference (or before we have processed it, anyway...) -- so just assume the
other side sent actpass, which will set us to active.  This is find so long as
the other side would actually say actpass or passive, but probably very bad if
the other side would say active.
1 files changed, 6 insertions(+), 0 deletions(-)

M channels/chan_motif.c
M channels/chan_motif.c => channels/chan_motif.c +6 -0
@@ 1598,6 1598,12 @@ static void jingle_send_session_initiate(struct jingle_session *session)
/*! \brief Internal function which sends a session-accept message */
static void jingle_send_session_accept(struct jingle_session *session)
	struct ast_rtp_engine_dtls *dtls;
	if ((dtls = ast_rtp_instance_get_dtls(session->rtp)) && dtls->get_setup(session->rtp) == AST_RTP_DTLS_SETUP_ACTPASS) {
		// We don't know what the remote wants yet, so just assume both?
		// This will cause us to reply with active
		dtls->set_setup(session->rtp, AST_RTP_DTLS_SETUP_ACTPASS);
	jingle_send_session_action(session, session->transport == JINGLE_TRANSPORT_GOOGLE_V1 ? "accept" : "session-accept");