[Home]

Summary:ASTERISK-17177: [patch] main/xmldoc.c error message is backwards -- fix that, and remove the sources of the error while we're at it
Reporter:John Covert (jcovert)Labels:
Date Opened:2010-12-28 19:41:55.000-0600Date Closed:2011-01-04 15:54:22.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_agent.c.patch
( 1) chan_iax2.c.doc.patch
( 2) chan_sip.c.patch
( 3) xmldoc.c.patch
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
Comments:By: Digium Subversion (svnbot) 2011-01-04 15:52:43.000-0600

Repository: asterisk
Revision: 300520

U   branches/1.6.2/channels/chan_agent.c
U   branches/1.6.2/channels/chan_iax2.c
U   branches/1.6.2/channels/chan_sip.c
U   branches/1.6.2/main/xmldoc.c

------------------------------------------------------------------------
r300520 | lmadsen | 2011-01-04 15:52:43 -0600 (Tue, 04 Jan 2011) | 9 lines

Fix backwards and broken XML documentation.

(closes issue ASTERISK-17177)
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=300520

By: Digium Subversion (svnbot) 2011-01-04 15:53:29.000-0600

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 ASTERISK-17177)
 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

By: Digium Subversion (svnbot) 2011-01-04 15:54:22.000-0600

Repository: asterisk
Revision: 300522

_U  trunk/
U   trunk/channels/chan_agent.c
U   trunk/channels/chan_iax2.c
U   trunk/channels/chan_sip.c
U   trunk/main/xmldoc.c

------------------------------------------------------------------------
r300522 | lmadsen | 2011-01-04 15:54:22 -0600 (Tue, 04 Jan 2011) | 24 lines

Merged revisions 300521 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
 r300521 | lmadsen | 2011-01-04 15:53:27 -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 ASTERISK-17177)
   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=300522