[asterisk-commits] qwell: branch 1.8 r305254 - in /branches/1.8: ./ apps/ channels/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jan 31 17:07:05 CST 2011
Author: qwell
Date: Mon Jan 31 17:07:00 2011
New Revision: 305254
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=305254
Log:
Merged revisions 305253 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r305253 | qwell | 2011-01-31 16:59:34 -0600 (Mon, 31 Jan 2011) | 17 lines
Merged revisions 305252 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r305252 | qwell | 2011-01-31 16:56:54 -0600 (Mon, 31 Jan 2011) | 10 lines
Prevent a crash when dialing a technology with no destination (ex: Dial(SIP/))
chan_iax2 and other channel drivers already had code to prevent this. The
attempt that app_dial was making to prevent it was not correct, so I fixed that.
(closes issue #18371)
Reported by: gbour
Patches:
18371.patch uploaded by gbour (license 1162)
........
................
Modified:
branches/1.8/ (props changed)
branches/1.8/apps/app_dial.c
branches/1.8/channels/chan_sip.c
Propchange: branches/1.8/
------------------------------------------------------------------------------
Binary property 'branch-1.6.2-merged' - no diff available.
Modified: branches/1.8/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_dial.c?view=diff&rev=305254&r1=305253&r2=305254
==============================================================================
--- branches/1.8/apps/app_dial.c (original)
+++ branches/1.8/apps/app_dial.c Mon Jan 31 17:07:00 2011
@@ -1944,7 +1944,7 @@
struct ast_dialed_interface *di;
AST_LIST_HEAD(, ast_dialed_interface) *dialed_interfaces;
num_dialed++;
- if (!number) {
+ if (ast_strlen_zero(number)) {
ast_log(LOG_WARNING, "Dial argument takes format (technology/[device:]number1)\n");
goto out;
}
Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=305254&r1=305253&r2=305254
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Mon Jan 31 17:07:00 2011
@@ -25142,6 +25142,12 @@
}
ast_debug(1, "Asked to create a SIP channel with formats: %s\n", ast_getformatname_multiple(tmp, sizeof(tmp), oldformat));
+ if (ast_strlen_zero(dest)) {
+ ast_log(LOG_ERROR, "Unable to create channel with empty destination.\n");
+ *cause = AST_CAUSE_CHANNEL_UNACCEPTABLE;
+ return NULL;
+ }
+
if (!(p = sip_alloc(NULL, NULL, 0, SIP_INVITE, NULL))) {
ast_log(LOG_ERROR, "Unable to build sip pvt data for '%s' (Out of memory or socket error)\n", dest);
*cause = AST_CAUSE_SWITCH_CONGESTION;
More information about the asterisk-commits
mailing list