[asterisk-bugs] [Asterisk 0018547]: [patch] main/xmldoc.c error message is backwards -- fix that, and remove the sources of the error while we're at it

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Jan 4 21:53:29 UTC 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18547 
====================================================================== 
Reported By:                jcovert
Assigned To:                lmadsen
====================================================================== 
Project:                    Asterisk
Issue ID:                   18547
Category:                   General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           1.8.1.1 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2010-12-28 19:41 CST
Last Modified:              2011-01-04 15:53 CST
====================================================================== 
Summary:                    [patch] main/xmldoc.c error message is backwards --
fix that, and remove the sources of the error while we're at it
Description: 
There have been a number of reports both in the bug tracker and in various
forums about five messages such as:

[May 12 08:56:54] DEBUG[14460]: xmldoc.c:1720 xmldoc_build_field: Cannot
find variable 'SIPPEER' in tree 'description'

This message should refer to "variable 'description' in tree 'SIPPEER'.

The current code in main/xmldoc.c is:

ast_log(LOG_DEBUG, "Cannot find variable '%s' in tree '%s'\n", name,
var);

and quite obviously should be:

ast_log(LOG_DEBUG, "Cannot find variable '%s' in tree '%s'\n", var,
name);

A patch is supplied to correct this.

HOWEVER, silly answers have appeared in the forums saying things like
"cannot read the xml" or "documentation is missing".  There are exactly
five occurrences of this error, and they are in cases where the
documentation is structured in a way that a "description" section is not
needed.

However, rather than indicating this (as is done appropriately in other
places) with

<description></description>

these five places (in three modules) have

<description />

which the xml parser does not support.

Patches are supplied to correct all of these.

Regards/john
====================================================================== 

---------------------------------------------------------------------- 
 (0130170) svnbot (reporter) - 2011-01-04 15:53
 https://issues.asterisk.org/view.php?id=18547#c130170 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 300521

_U  branches/1.8/
U   branches/1.8/channels/chan_agent.c
U   branches/1.8/channels/chan_iax2.c
U   branches/1.8/channels/chan_sip.c
U   branches/1.8/main/xmldoc.c

------------------------------------------------------------------------
r300521 | lmadsen | 2011-01-04 15:53:28 -0600 (Tue, 04 Jan 2011) | 17
lines

Merged revisions 300520 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r300520 | lmadsen | 2011-01-04 15:52:41 -0600 (Tue, 04 Jan 2011) | 9
lines
  
  Fix backwards and broken XML documentation.
  
  (closes issue https://issues.asterisk.org/view.php?id=18547)
  Reported by: jcovert
  Patches: 
        xmldoc.c.patch uploaded by jcovert (license 551)
        chan_iax2.c.doc.patch uploaded by jcovert (license 551)
        chan_sip.c.patch uploaded by jcovert (license 551)
        chan_agent.c.patch uploaded by jcovert (license 551)
........

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-01-04 15:53 svnbot         Checkin                                      
2011-01-04 15:53 svnbot         Note Added: 0130170                          
======================================================================




More information about the asterisk-bugs mailing list