mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-03 11:11:05 +00:00
options: Change ast_options from ast_flags to ast_flags64.
DeveloperNote: The 32-bit ast_options has no room left to accomodate new options and so has been converted to an ast_flags64 structure. All internal references to ast_options have been updated to use the 64-bit flag manipulation macros. External module references to the 32-bit ast_options should continue to work on little-endian systems because the least-significant bytes of a 64 bit integer will be in the same location as a 32-bit integer. Because that's not the case on big-endian systems, we've swapped the bytes in the flags manupulation macros on big-endian systems so external modules should still work however you are encouraged to test.
This commit is contained in:
committed by
github-actions[bot]
parent
3e178dcfd6
commit
43bf8a4ded
@@ -261,9 +261,9 @@ static int reload_module(void)
|
||||
|
||||
for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
|
||||
if (!strcasecmp(var->name, "genericplc")) {
|
||||
ast_set2_flag(&ast_options, ast_true(var->value), AST_OPT_FLAG_GENERIC_PLC);
|
||||
ast_set2_flag64(&ast_options, ast_true(var->value), AST_OPT_FLAG_GENERIC_PLC);
|
||||
} else if (!strcasecmp(var->name, "genericplc_on_equal_codecs")) {
|
||||
ast_set2_flag(&ast_options, ast_true(var->value), AST_OPT_FLAG_GENERIC_PLC_ON_EQUAL_CODECS);
|
||||
ast_set2_flag64(&ast_options, ast_true(var->value), AST_OPT_FLAG_GENERIC_PLC_ON_EQUAL_CODECS);
|
||||
}
|
||||
}
|
||||
ast_config_destroy(cfg);
|
||||
@@ -272,7 +272,7 @@ static int reload_module(void)
|
||||
* Force on_equal_codecs to false if generic_plc is false.
|
||||
*/
|
||||
if (!ast_opt_generic_plc) {
|
||||
ast_set2_flag(&ast_options, 0, AST_OPT_FLAG_GENERIC_PLC_ON_EQUAL_CODECS);
|
||||
ast_set2_flag64(&ast_options, 0, AST_OPT_FLAG_GENERIC_PLC_ON_EQUAL_CODECS);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user