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:
George Joseph
2025-07-21 13:12:40 -06:00
committed by github-actions[bot]
parent 3e178dcfd6
commit 43bf8a4ded
13 changed files with 167 additions and 140 deletions

View File

@@ -509,7 +509,7 @@ static char *handle_debug_or_trace(int handler, struct ast_cli_entry *e, int cmd
}
AST_RWLIST_REMOVE(modules, ml, entry);
if (AST_RWLIST_EMPTY(modules)) {
ast_clear_flag(&ast_options, module_option);
ast_clear_flag64(&ast_options, module_option);
}
AST_RWLIST_UNLOCK(modules);
ast_cli(a->fd, "Core %s was %u and has been set to 0 for '%s'.\n", handler_name,
@@ -537,7 +537,7 @@ static char *handle_debug_or_trace(int handler, struct ast_cli_entry *e, int cmd
strcpy(ml->module, mod);
AST_RWLIST_INSERT_TAIL(modules, ml, entry);
}
ast_set_flag(&ast_options, module_option);
ast_set_flag64(&ast_options, module_option);
ast_cli(a->fd, "Core %s was %d and has been set to %u for '%s'.\n", handler_name,
oldval, ml->level, ml->module);
@@ -555,7 +555,7 @@ static char *handle_debug_or_trace(int handler, struct ast_cli_entry *e, int cmd
while ((ml = AST_RWLIST_REMOVE_HEAD(modules, entry))) {
ast_free(ml);
}
ast_clear_flag(&ast_options, AST_OPT_FLAG_DEBUG_MODULE);
ast_clear_flag64(&ast_options, AST_OPT_FLAG_DEBUG_MODULE);
AST_RWLIST_UNLOCK(modules);
}
oldval = *core_option;
@@ -1971,7 +1971,7 @@ static char *handle_cli_wait_fullybooted(struct ast_cli_entry *e, int cmd, struc
return NULL;
}
while (!ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)) {
while (!ast_fully_booted) {
usleep(100);
}