From 2f959df185cc7de3508d2d8098b76f6a6a83d546 Mon Sep 17 00:00:00 2001 From: Allan Nathanson <42244061+Allan-N@users.noreply.github.com> Date: Sat, 9 Nov 2024 14:24:53 -0500 Subject: [PATCH] PATCH: config.c: problems with #tryinclude statements, whitespace Pull in Asterisk pull requests for the following issues : 1. https://github.com/asterisk/asterisk/issues/920 https://github.com/asterisk/asterisk/pull/918 Correct an issue in ast_config_text_file_save2() when updating configuration files with "#tryinclude" statements. The API currently replaces "#tryinclude" with "#include". The API also creates empty template files if the referenced files do not exist. This patch resolves these problems. 2. https://github.com/asterisk/asterisk/issues/970 https://github.com/asterisk/asterisk/pull/971 Configurations loaded with the ast_config_load2() API and later written out with ast_config_text_file_save2() will have any leading whitespace stripped away. The APIs should make reasonable efforts to maintain the content and formatting of the configuration files. --- phreaknet.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phreaknet.sh b/phreaknet.sh index 5808b42..b690a39 100755 --- a/phreaknet.sh +++ b/phreaknet.sh @@ -2207,6 +2207,8 @@ phreak_patches() { # $1 = $PATCH_DIR, $2 = $AST_SRC_DIR asterisk_pr_unconditional 917 # FreeBSD compilation fixes git_patch "config_c_fix_template_inheritance_overrides.patch" # config.c: fix template inheritance/overrides git_patch "config_c_fix_template_writing.patch" # config.c: fix template inheritance/overrides + asterisk_pr_unconditional 918 # config.c #tryinclude fixes + asterisk_pr_unconditional 971 # config.c fix issues w/ whitespace in comments if [ $AST_MAJOR_VER -lt 21 ]; then if [ "$EXTERNAL_CODECS" = "1" ]; then