diff options
author | Joshua Colp <jcolp@digium.com> | 2015-02-14 18:21:02 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2015-02-14 18:21:02 +0000 |
commit | cc96e4a7ef9c8ac35929a184ebc3739421f1b18c (patch) | |
tree | e3558a8fdf81e8c69e206b8b3962c730157dc15d /channels/pjsip/dialplan_functions.c | |
parent | f00ebf0a2dfae62b0c3455ad90ca14c0d1d33b3e (diff) |
Multiple revisions 431751-431752
........
r431751 | file | 2015-02-14 14:19:07 -0400 (Sat, 14 Feb 2015) | 5 lines
chan_pjsip: Fix crash when CHANNEL dialplan function is invoked with pjsip argument and no type.
ASTERISK-24771 #close
Reported by: Niklas Larsson
........
r431752 | file | 2015-02-14 14:20:27 -0400 (Sat, 14 Feb 2015) | 2 lines
'information' ends with an 'n'.
........
Merged revisions 431751-431752 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/pjsip/dialplan_functions.c')
-rw-r--r-- | channels/pjsip/dialplan_functions.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/channels/pjsip/dialplan_functions.c b/channels/pjsip/dialplan_functions.c index 91044a618..8080f86a4 100644 --- a/channels/pjsip/dialplan_functions.c +++ b/channels/pjsip/dialplan_functions.c @@ -591,7 +591,10 @@ static int channel_read_pjsip(struct ast_channel *chan, const char *type, const dlg = channel->session->inv_session->dlg; - if (!strcmp(type, "secure")) { + if (ast_strlen_zero(type)) { + ast_log(LOG_WARNING, "You must supply a type field for 'pjsip' information\n"); + return -1; + } else if (!strcmp(type, "secure")) { #ifdef HAVE_PJSIP_GET_DEST_INFO pjsip_host_info dest; pj_pool_t *pool = pjsip_endpt_create_pool(ast_sip_get_pjsip_endpoint(), "secure-check", 128, 128); |