[asterisk-commits] file: branch 10 r376167 - in /branches/10: ./ main/pbx.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Nov 12 14:45:00 CST 2012
Author: file
Date: Mon Nov 12 14:44:56 2012
New Revision: 376167
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=376167
Log:
Properly check if the "Context" and "Extension" headers are empty in a ShowDialPlan action.
The code which handles the ShowDialPlan action wrongly assumed that a non-NULL return value
from the function which retrieves headers from an action indicates that the header has a
value. This is incorrect and the contents must be checked to see if they are blank.
(closes issue ASTERISK-20628)
Reported by: jkroon
Patches:
asterisk-showdialplan-incorrect-error.patch uploaded by jkroon
........
Merged revisions 376166 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Modified:
branches/10/ (props changed)
branches/10/main/pbx.c
Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/10/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/pbx.c?view=diff&rev=376167&r1=376166&r2=376167
==============================================================================
--- branches/10/main/pbx.c (original)
+++ branches/10/main/pbx.c Mon Nov 12 14:44:56 2012
@@ -7039,22 +7039,26 @@
manager_show_dialplan_helper(s, m, idtext, context, exten, &counters, NULL);
- if (context && !counters.context_existence) {
+ if (!ast_strlen_zero(context) && !counters.context_existence) {
char errorbuf[BUFSIZ];
snprintf(errorbuf, sizeof(errorbuf), "Did not find context %s", context);
astman_send_error(s, m, errorbuf);
return 0;
}
- if (exten && !counters.extension_existence) {
+ if (!ast_strlen_zero(exten) && !counters.extension_existence) {
char errorbuf[BUFSIZ];
- if (context)
+ if (!ast_strlen_zero(context))
snprintf(errorbuf, sizeof(errorbuf), "Did not find extension %s@%s", exten, context);
else
snprintf(errorbuf, sizeof(errorbuf), "Did not find extension %s in any context", exten);
astman_send_error(s, m, errorbuf);
return 0;
+ }
+
+ if (!counters.total_items) {
+ manager_dpsendack(s, m);
}
astman_append(s, "Event: ShowDialPlanComplete\r\n"
More information about the asterisk-commits
mailing list