|
|
@ -58,6 +58,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|
|
|
#define SMDI_MSG_EXPIRY_TIME 30000 /* 30 seconds */
|
|
|
|
#define SMDI_MSG_EXPIRY_TIME 30000 /* 30 seconds */
|
|
|
|
|
|
|
|
|
|
|
|
static const char config_file[] = "smdi.conf";
|
|
|
|
static const char config_file[] = "smdi.conf";
|
|
|
|
|
|
|
|
static int smdi_loaded;
|
|
|
|
|
|
|
|
|
|
|
|
/*! \brief SMDI message desk message queue. */
|
|
|
|
/*! \brief SMDI message desk message queue. */
|
|
|
|
struct ast_smdi_md_queue {
|
|
|
|
struct ast_smdi_md_queue {
|
|
|
@ -1340,6 +1341,7 @@ static int _unload_module(int fromload);
|
|
|
|
static int load_module(void)
|
|
|
|
static int load_module(void)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int res;
|
|
|
|
int res;
|
|
|
|
|
|
|
|
smdi_loaded = 1;
|
|
|
|
|
|
|
|
|
|
|
|
/* initialize our containers */
|
|
|
|
/* initialize our containers */
|
|
|
|
memset(&smdi_ifaces, 0, sizeof(smdi_ifaces));
|
|
|
|
memset(&smdi_ifaces, 0, sizeof(smdi_ifaces));
|
|
|
@ -1367,6 +1369,10 @@ static int load_module(void)
|
|
|
|
|
|
|
|
|
|
|
|
static int _unload_module(int fromload)
|
|
|
|
static int _unload_module(int fromload)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!smdi_loaded) {
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* this destructor stops any running smdi_read threads */
|
|
|
|
/* this destructor stops any running smdi_read threads */
|
|
|
|
ASTOBJ_CONTAINER_DESTROYALL(&smdi_ifaces, ast_smdi_interface_destroy);
|
|
|
|
ASTOBJ_CONTAINER_DESTROYALL(&smdi_ifaces, ast_smdi_interface_destroy);
|
|
|
|
ASTOBJ_CONTAINER_DESTROY(&smdi_ifaces);
|
|
|
|
ASTOBJ_CONTAINER_DESTROY(&smdi_ifaces);
|
|
|
@ -1387,6 +1393,7 @@ static int _unload_module(int fromload)
|
|
|
|
ast_custom_function_unregister(&smdi_msg_function);
|
|
|
|
ast_custom_function_unregister(&smdi_msg_function);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
smdi_loaded = 0;
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|