[Home]

Summary:ASTERISK-13213: [patch] Improve debugging output for specific context inclusion failure case in pbx_config
Reporter:Kenneth Shumard (kshumard)Labels:
Date Opened:2008-12-12 16:04:18.000-0600Date Closed:2008-12-16 10:50:47.000-0600
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:PBX/pbx_config
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) pbx_config.patch.improvederroroutput.txt
Description:The dialplan below results in a generic, "WARNING[18233]: pbx_config.c:1560 pbx_load_config: Unable to include context 'local' in context 'longdistance'" message, output by ast_context_add_include2(). This patch copies the "switch (errno)" block out of handle_cli_dialplan_add_include() that follows the call to ast_context_add_include(). This makes the warning much more descriptive, i.e. "WARNING[20865]: pbx_config.c:1570 pbx_load_config: Context 'local' already included in 'longdistance' context".

[longdistance]
include => local

[local]
exten => s,1,Noop

[longdistance]
exten => s,1,Noop
include => local

While the example seems somewhat contrived, a student in an Asterisk Advanced training class encountered it. Every improvement to documentation helps, right? : )
Comments:By: Kenneth Shumard (kshumard) 2008-12-12 16:06:10.000-0600

I failed to check the "Check if this is a code or documentation submission." box. Forgive me, O Wise Ones!

By: Leif Madsen (lmadsen) 2008-12-12 16:32:22.000-0600

/me punts kshumard!

(I have marked it as code for you :))

By: Digium Subversion (svnbot) 2008-12-16 10:50:47.000-0600

Repository: asterisk
Revision: 164733

U   trunk/pbx/pbx_config.c

------------------------------------------------------------------------
r164733 | file | 2008-12-16 10:50:46 -0600 (Tue, 16 Dec 2008) | 6 lines

Be more detailed about why the include did not get included.
(closes issue ASTERISK-13213)
Reported by: kshumard
Patches:
     pbx_config.patch.improvederroroutput.txt uploaded by kshumard (license 92)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=164733