[Home]

Summary:ASTERISK-14381: [patch] Cannot find XML documentation under non linux platforms
Reporter:snuffy (snuffy)Labels:
Date Opened:2009-06-25 18:26:19Date Closed:2010-07-22 14:52:17
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/Portability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) bug_xmlpatt-v2.diff
( 1) bug_xmlpatt-v3.diff
Description:After installing * on opensolaris and starting up get XML Errors.
This is due to the use of non-POSIX standard arguments to the glob() function.
Attached is a first draft patch
Comments:By: snuffy (snuffy) 2009-06-25 23:40:44

It might also be good to not report as 'ERROR' that '/thirdparty' xml files could not be loaded..
That should be treated more as a warning I believe.

By: snuffy (snuffy) 2009-07-16 07:47:29

New version.. now with dynamic sorta string via alloca :)

By: snuffy (snuffy) 2009-08-03 08:25:19

fixed order of precedence

By: Leif Madsen (lmadsen) 2009-11-19 11:40:15.000-0600

Just pinging this issue because it is old :)

By: snuffy (snuffy) 2009-11-19 13:18:16.000-0600

It still works fine..
Was waiting on eliel to approve, worked under linux/solaris/opensolaris

By: Chris Walton (crjw) 2010-01-11 22:23:36.000-0600

I just tested this patch on Solaris nevada build ASTERISK-125 with the latest trunk.
The patch works.  It would be nice to see it committed soon.

However, there are still errors on the asterisk console due to the thirdparty directories not being found:
[Jan 12 04:01:36] ERROR[17379]: xmldoc.c:1936 ast_xmldoc_load_documentation: Could not open XML documentation at '/apps/asterisk/lib/documentation/thirdparty/*-en_US.xml'
[Jan 12 04:01:36] ERROR[17379]: xmldoc.c:1936 ast_xmldoc_load_documentation: Could not open XML documentation at '/apps/asterisk/lib/documentation/thirdparty/*-en_??.xml'

The errors can be fixed by removing the GLOB_NOCHECK flag from "MY_GLOB_FLAGS" in include/asterisk/compat.h.  I am suspicious that the GLOB_NOCHECK flag is not required anywhere in the asterisk code and it could safely be removed... I tried removing it and I have not come across any problems yet.

By: Digium Subversion (svnbot) 2010-07-22 14:45:29

Repository: asterisk
Revision: 278708

U   trunk/main/xmldoc.c

------------------------------------------------------------------------
r278708 | jpeeler | 2010-07-22 14:45:29 -0500 (Thu, 22 Jul 2010) | 16 lines

Add method for finding XML doc files for systems that don't support GLOB_BRACE.

In particular, Solaris and perhaps others do not support the above mentioned
GNU extension. In this case the paths are simply expanded without the braces
and the calls to glob are made separately.

Note: I could not explain memory allocation failures that were being reported
from within libxml itself when making calls to glob without using GLOB_NOCHECK.
This is the only reason why that flag is being used.

(closes issue ASTERISK-14381)
Reported by: snuffy
Patches:
     bug_xmlpatt-v3.diff uploaded by snuffy (license 35),
     modified by me

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

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

By: Digium Subversion (svnbot) 2010-07-22 14:52:16

Repository: asterisk
Revision: 278709

_U  branches/1.6.2/
U   branches/1.6.2/main/xmldoc.c

------------------------------------------------------------------------
r278709 | jpeeler | 2010-07-22 14:52:15 -0500 (Thu, 22 Jul 2010) | 23 lines

Merged revisions 278708 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r278708 | jpeeler | 2010-07-22 14:45:30 -0500 (Thu, 22 Jul 2010) | 16 lines
 
 Add method for finding XML doc files for systems that don't support GLOB_BRACE.
 
 In particular, Solaris and perhaps others do not support the above mentioned
 GNU extension. In this case the paths are simply expanded without the braces
 and the calls to glob are made separately.
 
 Note: I could not explain memory allocation failures that were being reported
 from within libxml itself when making calls to glob without using GLOB_NOCHECK.
 This is the only reason why that flag is being used.
 
 (closes issue ASTERISK-14381)
 Reported by: snuffy
 Patches:
       bug_xmlpatt-v3.diff uploaded by snuffy (license 35),
       modified by me
........

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

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