[asterisk-commits] file: branch 11 r374756 - /branches/11/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Oct 9 16:34:03 CDT 2012
Author: file
Date: Tue Oct 9 16:34:01 2012
New Revision: 374756
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=374756
Log:
Improve logging for DTLS-SRTP failure situations.
(closes issue ASTERISK-20487)
Reported by: mjordan
Modified:
branches/11/channels/chan_sip.c
Modified: branches/11/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_sip.c?view=diff&rev=374756&r1=374755&r2=374756
==============================================================================
--- branches/11/channels/chan_sip.c (original)
+++ branches/11/channels/chan_sip.c Tue Oct 9 16:34:01 2012
@@ -5531,11 +5531,21 @@
return -1;
}
- if (!(dtls = ast_rtp_instance_get_dtls(rtp)) ||
- dtls->set_configuration(rtp, &dialog->dtls_cfg) ||
- !(*srtp = sip_srtp_alloc())) {
+ if (!(dtls = ast_rtp_instance_get_dtls(rtp))) {
ast_log(LOG_ERROR, "No DTLS-SRTP support present on engine for RTP instance '%p', was it compiled with support for it?\n",
- instance);
+ rtp);
+ return -1;
+ }
+
+ if (dtls->set_configuration(rtp, &dialog->dtls_cfg)) {
+ ast_log(LOG_ERROR, "Attempted to set an invalid DTLS-SRTP configuration on RTP instance '%p'\n",
+ rtp);
+ return -1;
+ }
+
+ if (!(*srtp = sip_srtp_alloc())) {
+ ast_log(LOG_ERROR, "Failed to create required SRTP structure on RTP instance '%p'\n",
+ rtp);
return -1;
}
More information about the asterisk-commits
mailing list