mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Compatibility fixes for loader changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -199,7 +199,7 @@ static int odbc_log(struct ast_cdr *cdr)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *description(void)
|
static const char *description(void)
|
||||||
{
|
{
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
@@ -450,34 +450,25 @@ static int odbc_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int load_module(void)
|
static int load_module(void *mod)
|
||||||
{
|
{
|
||||||
return odbc_load_module();
|
return odbc_load_module();
|
||||||
}
|
}
|
||||||
|
|
||||||
int unload_module(void)
|
static int unload_module(void *mod)
|
||||||
{
|
{
|
||||||
return odbc_unload_module();
|
return odbc_unload_module();
|
||||||
}
|
}
|
||||||
|
|
||||||
int reload(void)
|
static int reload(void *mod)
|
||||||
{
|
{
|
||||||
odbc_unload_module();
|
odbc_unload_module();
|
||||||
return odbc_load_module();
|
return odbc_load_module();
|
||||||
}
|
}
|
||||||
|
|
||||||
int usecount(void)
|
static const char *key(void)
|
||||||
{
|
|
||||||
/* Simplistic use count */
|
|
||||||
if (ast_mutex_trylock(&odbc_lock)) {
|
|
||||||
return 1;
|
|
||||||
} else {
|
|
||||||
ast_mutex_unlock(&odbc_lock);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *key()
|
|
||||||
{
|
{
|
||||||
return ASTERISK_GPL_KEY;
|
return ASTERISK_GPL_KEY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STD_MOD(MOD_0, reload, NULL, NULL);
|
||||||
|
@@ -551,7 +551,7 @@ static int odbc_unload_module(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int reload(void)
|
static int reload(void *mod)
|
||||||
{
|
{
|
||||||
int res = 0;
|
int res = 0;
|
||||||
struct ast_config *cfg;
|
struct ast_config *cfg;
|
||||||
@@ -667,4 +667,4 @@ static const char *key(void)
|
|||||||
{
|
{
|
||||||
return ASTERISK_GPL_KEY;
|
return ASTERISK_GPL_KEY;
|
||||||
}
|
}
|
||||||
STD_MOD(MOD_1, NULL, NULL, NULL);
|
STD_MOD(MOD_1, reload, NULL, NULL);
|
||||||
|
Reference in New Issue
Block a user