New PR: Asterisk 22 compatibility (no legacy code removed)#2
Open
mambursoft wants to merge 1 commit into
Open
Conversation
- Use ast_register_application_xml() for ASTERISK_SRC_VERSION >= 1600 - Keep ast_register_application() for older versions - All other code already supports Asterisk 22 via existing >= 1300 branches - No legacy code removed - full backward compatibility maintained - Tested on FreeBSD 14 with Asterisk 22 (ASTERISK_SRC_VERSION=2200)
Owner
|
Hi Olexiy, Don't understand this change. Does the compilation of the module fail with the latest Asterisk? Or, does the compilation succeed and the module load fails at runtime? Suspect the latter is the case. Can you load the module with the latest Asterisk if you disable xml docs? You can disable xml docs when you configure Asterisk with a switch: ./configure --disable-xmldoc --Paul |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Paul,
I've taken a different approach this time.
The new branch asterisk22-compat makes a single minimal change: wrapping ast_register_application() with a version conditional to use ast_register_application_xml() for Asterisk >= 16. All legacy code for older Asterisk versions is fully preserved.
I verified that all other existing version conditionals (channel accessors, frame API, format API, CLI) already have #else branches for >= 1300 that work correctly with Asterisk 22 (ASTERISK_SRC_VERSION=2200). So the only thing missing was the ast_register_application_xml call, which was introduced in Asterisk 16 as a replacement for the 4-argument variant.
The diff is just 4 lines added, 0 removed:
+#if ASTERISK_SRC_VERSION < 1600
res |= ast_register_application(app, app_konference_main, synopsis, descrip);
+#else
+#endif
Tested on FreeBSD 14 with Asterisk 22. The module loads, registers, and works correctly.
PR: https://github.com/mambursoft/appkonference29-asterisk22/pull/new/asterisk22-compat
Best regards, Olexiy