Added compat to new ast_config* API of current Asterisk CVS HEAD.
This commit is contained in:
parent
887913bffc
commit
ec9b3886c6
23
chan_capi.c
23
chan_capi.c
|
@ -52,6 +52,13 @@
|
||||||
#include "chan_capi_app.h"
|
#include "chan_capi_app.h"
|
||||||
#include "chan_capi_pvt.h"
|
#include "chan_capi_pvt.h"
|
||||||
|
|
||||||
|
#define CC_VERSION "cm-0.5"
|
||||||
|
|
||||||
|
#ifdef CAPI_ULAW
|
||||||
|
#define LAW_STRING "uLaw"
|
||||||
|
#else
|
||||||
|
#define LAW_STRING "aLaw"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* personal stuff
|
* personal stuff
|
||||||
|
@ -61,18 +68,10 @@ unsigned ast_capi_ApplID;
|
||||||
static _cword ast_capi_MessageNumber = 1;
|
static _cword ast_capi_MessageNumber = 1;
|
||||||
static char *desc = "Common ISDN API for Asterisk";
|
static char *desc = "Common ISDN API for Asterisk";
|
||||||
#ifdef CC_AST_HAVE_TECH_PVT
|
#ifdef CC_AST_HAVE_TECH_PVT
|
||||||
#ifdef CAPI_ULAW
|
static const char tdesc[] = "Common ISDN API Driver (" CC_VERSION ") " LAW_STRING " " ASTERISKVERSION;
|
||||||
static const char tdesc[] = "Common ISDN API Driver (0.4.0) muLaw "ASTERISKVERSION;
|
|
||||||
#else
|
|
||||||
static const char tdesc[] = "Common ISDN API Driver (0.4.0) aLaw "ASTERISKVERSION;
|
|
||||||
#endif
|
|
||||||
static const char type[] = "CAPI";
|
static const char type[] = "CAPI";
|
||||||
#else
|
#else
|
||||||
#ifdef CAPI_ULAW
|
static char *tdesc = "Common ISDN API Driver (" CC_VERSION ") " LAW_STRING " "ASTERISKVERSION;
|
||||||
static char *tdesc = "Common ISDN API Driver (0.4.0) muLaw "ASTERISKVERSION;
|
|
||||||
#else
|
|
||||||
static char *tdesc = "Common ISDN API Driver (0.4.0) aLaw "ASTERISKVERSION;
|
|
||||||
#endif
|
|
||||||
static char *type = "CAPI";
|
static char *type = "CAPI";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3020,7 +3019,7 @@ int load_module(void)
|
||||||
unsigned int group = 0;
|
unsigned int group = 0;
|
||||||
struct ast_capi_controller *cp;
|
struct ast_capi_controller *cp;
|
||||||
|
|
||||||
cfg = ast_load(config);
|
cfg = ast_config_load(config);
|
||||||
|
|
||||||
/* We *must* have a config file otherwise stop immediately, well no */
|
/* We *must* have a config file otherwise stop immediately, well no */
|
||||||
if (!cfg) {
|
if (!cfg) {
|
||||||
|
@ -3224,7 +3223,7 @@ int load_module(void)
|
||||||
}
|
}
|
||||||
v = v->next;
|
v = v->next;
|
||||||
}
|
}
|
||||||
ast_destroy(cfg);
|
ast_config_destroy(cfg);
|
||||||
|
|
||||||
for (controller = 1; controller <= capi_num_controllers; controller++) {
|
for (controller = 1; controller <= capi_num_controllers; controller++) {
|
||||||
if (capi_used_controllers & (1 << controller)) {
|
if (capi_used_controllers & (1 << controller)) {
|
||||||
|
|
|
@ -74,6 +74,14 @@ else
|
||||||
echo " * no 'transfercapability'"
|
echo " * no 'transfercapability'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if grep -q "ast_config_load" $INCLUDEDIR/config.h; then
|
||||||
|
echo " * found 'ast_config_load'"
|
||||||
|
else
|
||||||
|
echo "#define ast_config_load(x) ast_load(x)" >>$CONFIGFILE
|
||||||
|
echo "#define ast_config_destroy(x) ast_destroy(x)" >>$CONFIGFILE
|
||||||
|
echo " * no 'ast_config_load'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "" >>$CONFIGFILE
|
echo "" >>$CONFIGFILE
|
||||||
echo "#endif /* CHAN_CAPI_CONFIG_H */" >>$CONFIGFILE
|
echo "#endif /* CHAN_CAPI_CONFIG_H */" >>$CONFIGFILE
|
||||||
|
|
Loading…
Reference in New Issue