mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Modules: Make ast_module_info->self available to auxiliary sources.
ast_module_info->self is often needed to register items with the core. Many modules have ad-hoc code to make this pointer available to auxiliary sources. This change updates the module build process to make the needed information available to all sources in a module. ASTERISK-25056 #close Reported by: Corey Farrell Change-Id: I18c8cd58fbcb1b708425f6757becaeca9fa91815
This commit is contained in:
@@ -678,11 +678,10 @@ static void parking_manager_enable_stasis(void)
|
||||
int load_parking_manager(void)
|
||||
{
|
||||
int res;
|
||||
const struct ast_module_info *module = parking_get_module_info();
|
||||
|
||||
res = ast_manager_register2("Parkinglots", EVENT_FLAG_CALL, manager_parking_lot_list, module->self, NULL, NULL);
|
||||
res |= ast_manager_register2("ParkedCalls", EVENT_FLAG_CALL, manager_parking_status, module->self, NULL, NULL);
|
||||
res |= ast_manager_register2("Park", EVENT_FLAG_CALL, manager_park, module->self, NULL, NULL);
|
||||
res = ast_manager_register_xml("Parkinglots", EVENT_FLAG_CALL, manager_parking_lot_list);
|
||||
res |= ast_manager_register_xml("ParkedCalls", EVENT_FLAG_CALL, manager_parking_status);
|
||||
res |= ast_manager_register_xml("Park", EVENT_FLAG_CALL, manager_park);
|
||||
parking_manager_enable_stasis();
|
||||
return res ? -1 : 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user