Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: libxml2-2.12 deprecates API calls asterisk uses #725

Open
1 task done
gtjoseph opened this issue Apr 29, 2024 · 0 comments · May be fixed by #746
Open
1 task done

[bug]: libxml2-2.12 deprecates API calls asterisk uses #725

gtjoseph opened this issue Apr 29, 2024 · 0 comments · May be fixed by #746
Labels
bug support-level-core Functionality with core support level

Comments

@gtjoseph
Copy link
Member

Severity

Minor

Versions

18,20,21,master

Components/Modules

xml.c,res_calendar_caldav.c

Operating Environment

libxml2 >= 2.12

Frequency of Occurrence

Constant

Issue Description

libxml2-2.12 deprecates the following APIs...

  • xmlSubstituteEntitiesDefault - used by xml.c
  • xmlSAXUserParseMemory - used by res_calendar_caldav.c

Relevant log output

xml.c: In function ‘ast_xml_open’:
xml.c:102:9: warning: ‘xmlSubstituteEntitiesDefault’ is deprecated [-Wdeprecated-declarations]
  102 |         xmlSubstituteEntitiesDefault(1);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from xml.c:35:
/usr/include/libxml2/libxml/parser.h:953:17: note: declared here
  953 |                 xmlSubstituteEntitiesDefault(int val);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
xml.c: In function ‘ast_xslt_open’:
xml.c:508:9: warning: ‘xmlSubstituteEntitiesDefault’ is deprecated [-Wdeprecated-declarations]
  508 |         xmlSubstituteEntitiesDefault(1);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/libxml2/libxml/parser.h:953:17: note: declared here
  953 |                 xmlSubstituteEntitiesDefault(int val);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
xml.c: In function ‘ast_xslt_read_memory’:
xml.c:538:9: warning: ‘xmlSubstituteEntitiesDefault’ is deprecated [-Wdeprecated-declarations]
  538 |         xmlSubstituteEntitiesDefault(1);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/libxml2/libxml/parser.h:953:17: note: declared here
  953 |                 xmlSubstituteEntitiesDefault(int val);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

res_calendar_caldav.c: In function ‘update_caldav’:
res_calendar_caldav.c:591:9: warning: ‘xmlSAXUserParseMemory’ is deprecated [-Wdeprecated-declarations]
  591 |         xmlSAXUserParseMemory(&saxHandler, &state, ast_str_buffer(response), ast_str_strlen(response));
      |         ^~~~~~~~~~~~~~~~~~~~~
In file included from res_calendar_caldav.c:40:
/usr/include/libxml2/libxml/parser.h:1010:17: note: declared here
 1010 |                 xmlSAXUserParseMemory   (xmlSAXHandlerPtr sax,
      |                 ^~~~~~~~~~~~~~~~~~~~~

Asterisk Issue Guidelines

  • Yes, I have read the Asterisk Issue Guidelines
@gtjoseph gtjoseph added bug triage support-level-core Functionality with core support level and removed triage labels Apr 29, 2024
seanbright added a commit to seanbright/asterisk that referenced this issue May 23, 2024
Two functions are deprecated as of libxml2 2.12:

  * xmlSubstituteEntitiesDefault
  * xmlParseMemory

So we update those with supported API.

Additionally, `res_calendar_caldav` has been updated to use libxml2's
xmlreader API instead of the SAX2 API which has always felt a little
hacky (see deleted comment block in `res_calendar_caldav.c`).

The xmlreader API has been around since libxml2 2.5.0 which was
released in 2003.

Fixes asterisk#725
@seanbright seanbright linked a pull request May 23, 2024 that will close this issue
seanbright added a commit to seanbright/asterisk that referenced this issue May 24, 2024
Two functions are deprecated as of libxml2 2.12:

  * xmlSubstituteEntitiesDefault
  * xmlParseMemory

So we update those with supported API.

Additionally, `res_calendar_caldav` has been updated to use libxml2's
xmlreader API instead of the SAX2 API which has always felt a little
hacky (see deleted comment block in `res_calendar_caldav.c`).

The xmlreader API has been around since libxml2 2.5.0 which was
released in 2003.

Fixes asterisk#725
seanbright added a commit to seanbright/asterisk that referenced this issue May 24, 2024
Two functions are deprecated as of libxml2 2.12:

  * xmlSubstituteEntitiesDefault
  * xmlParseMemory

So we update those with supported API.

Additionally, `res_calendar_caldav` has been updated to use libxml2's
xmlreader API instead of the SAX2 API which has always felt a little
hacky (see deleted comment block in `res_calendar_caldav.c`).

The xmlreader API has been around since libxml2 2.5.0 which was
released in 2003.

Fixes asterisk#725
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug support-level-core Functionality with core support level
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant