google commit

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10258 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-11-05 20:16:44 +00:00
parent 0cd4cf99bf
commit b03a9e7602
1 changed files with 19 additions and 1 deletions

View File

@ -36,7 +36,12 @@
#include "mod_radius_cdr.h"
SWITCH_MODULE_LOAD_FUNCTION(mod_radius_cdr_load);
SWITCH_MODULE_DEFINITION(mod_radius_cdr, mod_radius_cdr_load, NULL, NULL);
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_cdr_radius_shutdown);
SWITCH_MODULE_DEFINITION(mod_radius_cdr, mod_radius_cdr_load, mod_cdr_radius_shutdown, NULL);
static struct {
int shutdown
} globals = { 0 };
static char cf[] = "mod_radius_cdr.conf";
static char my_dictionary[PATH_MAX];
@ -368,6 +373,10 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
switch_time_exp_t tm;
char buffer[32] = "";
if (globals.shutdown) {
return SWITCH_STATUS_FALSE;
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[mod_radius_cdr] Entering my_on_hangup\n");
rad_config = my_radius_init();
@ -684,6 +693,15 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_radius_cdr_load)
return SWITCH_STATUS_SUCCESS;
}
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_radius_csv_shutdown)
{
globals.shutdown = 1;
switch_core_remove_state_handler(&state_handlers);
return SWITCH_STATUS_SUCCESS;
}
/* For Emacs:
* Local Variables:
* mode:c