[Asterisk-code-review] chan sip: Allow DTLS to be disabled when reloading. (asterisk[13])

Anonymous Coward asteriskteam at digium.com
Wed Mar 1 11:43:55 CST 2017


Anonymous Coward #1000019 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5086 )

Change subject: chan_sip: Allow DTLS to be disabled when reloading.
......................................................................


chan_sip: Allow DTLS to be disabled when reloading.

This change fixes a problem where removing the DTLS configuration
options and reloading would not disable DTLS. This occurred
because the DTLS configuration was not reset to an unconfigured
state on reload.

ASTERISK-26313

Change-Id: I10952709cc4a7727fb50534b042bce9d64894b39
---
M channels/chan_sip.c
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Anonymous Coward #1000019: Verified
  Matthew Fredrickson: Looks good to me, approved
  Joshua Colp: Looks good to me, but someone else must approve



diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 77ea5f2..9a5d6c5 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -31104,6 +31104,8 @@
 			firstpass = 0;
 		} else {
 			ast_format_cap_remove_by_type(peer->caps, AST_MEDIA_TYPE_UNKNOWN);
+			ast_rtp_dtls_cfg_free(&peer->dtls_cfg);
+			memset(&peer->dtls_cfg, 0, sizeof(peer->dtls_cfg));
 		}
 	} else {
 		if (!(peer = ao2_t_alloc(sizeof(*peer), sip_destroy_peer_fn, "allocate a peer struct"))) {

-- 
To view, visit https://gerrit.asterisk.org/5086
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I10952709cc4a7727fb50534b042bce9d64894b39
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Vitezslav Novy <a1 at vnovy.net>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>



More information about the asterisk-code-review mailing list