summaryrefslogtreecommitdiff
path: root/res/res_rtp_asterisk.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-07-08 06:21:16 -0300
committerJoshua Colp <jcolp@digium.com>2015-07-08 04:28:12 -0500
commit7ff1ac8797a479ae5416d7c51a761552ecde011e (patch)
tree5a8356cb6226dc151a25094770ec3f9b5bae3768 /res/res_rtp_asterisk.c
parentb842a8dabf01b91ed5c972457ff14b059fdf90a2 (diff)
res_rtp_asterisk: Ensure DTLS timeout timer is -1 if DTLS is not used.
This change fixes a bug where the DTLS timeout timer would be initialized to 0 if DTLS was not used for an RTP session. ASTERISK-25103 Change-Id: If8d26bb054f1d300838850da5b8db9044c2fe2ac
Diffstat (limited to 'res/res_rtp_asterisk.c')
-rw-r--r--res/res_rtp_asterisk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index f0e2f8379..adce9e7ed 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -1232,7 +1232,6 @@ static int dtls_details_initialize(struct dtls_details *dtls, SSL_CTX *ssl_ctx,
dtls->connection = AST_RTP_DTLS_CONNECTION_NEW;
ast_mutex_init(&dtls->lock);
- dtls->timeout_timer = -1;
return 0;
@@ -2523,6 +2522,7 @@ static int ast_rtp_new(struct ast_rtp_instance *instance,
#ifdef HAVE_OPENSSL_SRTP
rtp->rekeyid = -1;
+ rtp->dtls.timeout_timer = -1;
#endif
rtp->f.subclass.format = ao2_bump(ast_format_none);
@@ -4723,6 +4723,7 @@ static void ast_rtp_prop_set(struct ast_rtp_instance *instance, enum ast_rtp_pro
#endif
#ifdef HAVE_OPENSSL_SRTP
+ rtp->rtcp->dtls.timeout_timer = -1;
dtls_setup_rtcp(instance);
#endif