mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-15 17:27:02 +00:00
fixed issue, that if chan_misdn is loaded and couldn't be initialized it would cause a segfault after 'reload'. Reported by Drew/Matt thx.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -64,6 +64,7 @@
|
||||
|
||||
char global_tracefile[BUFFERSIZE+1];
|
||||
|
||||
static int g_config_initialized=0;
|
||||
|
||||
struct misdn_jb{
|
||||
int size;
|
||||
@@ -706,6 +707,11 @@ static char *misdn_get_ch_state(struct chan_list *p)
|
||||
static void reload_config(void)
|
||||
{
|
||||
int i, cfg_debug;
|
||||
|
||||
if (!g_config_initialized) {
|
||||
ast_log(LOG_WARNING, "chan_misdn is not initialized properly, still reloading ?\n");
|
||||
return ;
|
||||
}
|
||||
|
||||
free_robin_list();
|
||||
misdn_cfg_reload();
|
||||
@@ -4091,7 +4097,6 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
|
||||
*******************************************/
|
||||
|
||||
|
||||
static int g_config_initialized=0;
|
||||
|
||||
int load_module(void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user