[asterisk-bugs] [Asterisk 0013733]: [patch] Add ability to register callback that should run just prior to when asterisk is fully loaded

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Oct 17 13:54:58 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13733 
====================================================================== 
Reported By:                mvanbaak
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13733
Category:                   Core/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     confirmed
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 150708 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-10-17 13:15 CDT
Last Modified:              2008-10-17 13:54 CDT
====================================================================== 
Summary:                    [patch] Add ability to register callback that should
run just prior to when asterisk is fully loaded
Description: 
When asterisk is done starting, execute registered callback functions.

Usecase: the soon to be merged res_clialiases that will check if a CLI
function exists before allowing it to be aliased. For this, everything
needs to be loaded.
====================================================================== 

---------------------------------------------------------------------- 
 (0093911) putnopvut (administrator) - 2008-10-17 13:54
 http://bugs.digium.com/view.php?id=13733#c93911 
---------------------------------------------------------------------- 
Cool idea. I have a couple of suggestions.

1. I think it would be a good idea for the function pointer in the
ast_atstarted struct to take a void * as its argument instead of having a
void parameter list. This would allow for data to be passed into the
callback.

2. I'm not sure that any of the locking is necessary. The reason is that
unlike at exit, the modules are all loaded serially, and so there is no
contention. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-10-17 13:54 putnopvut      Note Added: 0093911                          
======================================================================




More information about the asterisk-bugs mailing list