[asterisk-commits] kmoore: trunk r414949 - in /trunk: ./ res/res_pjsip_refer.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 30 09:53:47 CDT 2014
Author: kmoore
Date: Fri May 30 09:53:44 2014
New Revision: 414949
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=414949
Log:
PJSIP: Prevent crash on blind transfer
Blind transfers don't go too well with NULL channels which can occur if
the channel has already been transferred away.
(closes issue ASTERISK-23718)
Reported by: Jonathan Rose
........
Merged revisions 414948 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/res/res_pjsip_refer.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: trunk/res/res_pjsip_refer.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_refer.c?view=diff&rev=414949&r1=414948&r2=414949
==============================================================================
--- trunk/res/res_pjsip_refer.c (original)
+++ trunk/res/res_pjsip_refer.c Fri May 30 09:53:44 2014
@@ -691,11 +691,16 @@
static int refer_incoming_blind_request(struct ast_sip_session *session, pjsip_rx_data *rdata, pjsip_sip_uri *target,
struct refer_progress *progress)
{
- const char *context = (session->channel ? pbx_builtin_getvar_helper(session->channel, "TRANSFER_CONTEXT") : "");
+ const char *context;
char exten[AST_MAX_EXTENSION];
struct refer_blind refer = { 0, };
+ if (!session->channel) {
+ return 404;
+ }
+
/* If no explicit transfer context has been provided use their configured context */
+ context = pbx_builtin_getvar_helper(session->channel, "TRANSFER_CONTEXT");
if (ast_strlen_zero(context)) {
context = session->endpoint->context;
}
More information about the asterisk-commits
mailing list