[asterisk-commits] branch group/new_loader_completion r29468 - in
/team/group/new_loader_complet...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon May 22 09:56:03 MST 2006
Author: kpfleming
Date: Mon May 22 11:56:03 2006
New Revision: 29468
URL: http://svn.digium.com/view/asterisk?rev=29468&view=rev
Log:
remove parts of the loader symbol resolution stuff that won't be used
simplify (for module writers) the use of the new module information macros when the module uses the C++ compiler
Removed:
team/group/new_loader_completion/channels/vpb_module_interface.c
Modified:
team/group/new_loader_completion/cdr/cdr_csv.c
team/group/new_loader_completion/cdr/cdr_custom.c
team/group/new_loader_completion/cdr/cdr_odbc.c
team/group/new_loader_completion/cdr/cdr_pgsql.c
team/group/new_loader_completion/cdr/cdr_sqlite.c
team/group/new_loader_completion/cdr/cdr_tds.c
team/group/new_loader_completion/channels/Makefile
team/group/new_loader_completion/channels/chan_vpb.c
team/group/new_loader_completion/include/asterisk/file.h
team/group/new_loader_completion/include/asterisk/module.h
team/group/new_loader_completion/include/asterisk/translate.h
team/group/new_loader_completion/loader.c
team/group/new_loader_completion/res/res_clioriginate.c
team/group/new_loader_completion/res/res_convert.c
team/group/new_loader_completion/res/res_smdi.c
team/group/new_loader_completion/utils/ael_main.c
Modified: team/group/new_loader_completion/cdr/cdr_csv.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/cdr/cdr_csv.c?rev=29468&r1=29467&r2=29468&view=diff
==============================================================================
--- team/group/new_loader_completion/cdr/cdr_csv.c (original)
+++ team/group/new_loader_completion/cdr/cdr_csv.c Mon May 22 11:56:03 2006
@@ -323,7 +323,7 @@
load_config();
- res = ast_cdr_register(name, ast_module_info.description, csv_log);
+ res = ast_cdr_register(name, ast_module_info->description, csv_log);
if (res) {
ast_log(LOG_ERROR, "Unable to register CSV CDR handling\n");
if (mf)
Modified: team/group/new_loader_completion/cdr/cdr_custom.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/cdr/cdr_custom.c?rev=29468&r1=29467&r2=29468&view=diff
==============================================================================
--- team/group/new_loader_completion/cdr/cdr_custom.c (original)
+++ team/group/new_loader_completion/cdr/cdr_custom.c Mon May 22 11:56:03 2006
@@ -148,7 +148,7 @@
int res = 0;
if (!load_config(0)) {
- res = ast_cdr_register(name, ast_module_info.description, custom_log);
+ res = ast_cdr_register(name, ast_module_info->description, custom_log);
if (res)
ast_log(LOG_ERROR, "Unable to register custom CDR handling\n");
if (mf)
Modified: team/group/new_loader_completion/cdr/cdr_odbc.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/cdr/cdr_odbc.c?rev=29468&r1=29467&r2=29468&view=diff
==============================================================================
--- team/group/new_loader_completion/cdr/cdr_odbc.c (original)
+++ team/group/new_loader_completion/cdr/cdr_odbc.c Mon May 22 11:56:03 2006
@@ -359,7 +359,7 @@
ast_verbose( VERBOSE_PREFIX_3 "cdr_odbc: Unable to connect to datasource: %s\n", dsn);
}
}
- res = ast_cdr_register(name, ast_module_info.description, odbc_log);
+ res = ast_cdr_register(name, ast_module_info->description, odbc_log);
if (res) {
ast_log(LOG_ERROR, "cdr_odbc: Unable to register ODBC CDR handling\n");
}
Modified: team/group/new_loader_completion/cdr/cdr_pgsql.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/cdr/cdr_pgsql.c?rev=29468&r1=29467&r2=29468&view=diff
==============================================================================
--- team/group/new_loader_completion/cdr/cdr_pgsql.c (original)
+++ team/group/new_loader_completion/cdr/cdr_pgsql.c Mon May 22 11:56:03 2006
@@ -280,7 +280,7 @@
connected = 0;
}
- return ast_cdr_register(name, ast_module_info.description, pgsql_log);
+ return ast_cdr_register(name, ast_module_info->description, pgsql_log);
}
static int my_load_module(void)
Modified: team/group/new_loader_completion/cdr/cdr_sqlite.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/cdr/cdr_sqlite.c?rev=29468&r1=29467&r2=29468&view=diff
==============================================================================
--- team/group/new_loader_completion/cdr/cdr_sqlite.c (original)
+++ team/group/new_loader_completion/cdr/cdr_sqlite.c Mon May 22 11:56:03 2006
@@ -202,7 +202,7 @@
/* TODO: here we should probably create an index */
}
- res = ast_cdr_register(name, ast_module_info.description, sqlite_log);
+ res = ast_cdr_register(name, ast_module_info->description, sqlite_log);
if (res) {
ast_log(LOG_ERROR, "Unable to register SQLite CDR handling\n");
return -1;
Modified: team/group/new_loader_completion/cdr/cdr_tds.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/cdr/cdr_tds.c?rev=29468&r1=29467&r2=29468&view=diff
==============================================================================
--- team/group/new_loader_completion/cdr/cdr_tds.c (original)
+++ team/group/new_loader_completion/cdr/cdr_tds.c Mon May 22 11:56:03 2006
@@ -488,7 +488,7 @@
mssql_connect();
/* Register MSSQL CDR handler */
- res = ast_cdr_register(name, ast_module_info.description, tds_log);
+ res = ast_cdr_register(name, ast_module_info->description, tds_log);
if (res)
{
ast_log(LOG_ERROR, "Unable to register MSSQL CDR handling\n");
Modified: team/group/new_loader_completion/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/channels/Makefile?rev=29468&r1=29467&r2=29468&view=diff
==============================================================================
--- team/group/new_loader_completion/channels/Makefile (original)
+++ team/group/new_loader_completion/channels/Makefile Mon May 22 11:56:03 2006
@@ -128,7 +128,7 @@
chan_vpb.o: chan_vpb.c
$(CXX) -c $(CFLAGS:-Werror=) -o $@ $<
-chan_vpb.so: chan_vpb.o vpb_module_interface.o
+chan_vpb.so: chan_vpb.o
$(CXX) $(SOLINK) -o $@ $^ $(VPB_LIB)
ifeq ($(OSARCH),Linux)
Modified: team/group/new_loader_completion/channels/chan_vpb.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/channels/chan_vpb.c?rev=29468&r1=29467&r2=29468&view=diff
==============================================================================
--- team/group/new_loader_completion/channels/chan_vpb.c (original)
+++ team/group/new_loader_completion/channels/chan_vpb.c Mon May 22 11:56:03 2006
@@ -94,6 +94,11 @@
extern "C" {
#endif
/**/
+
+static int load_module(void);
+static int unload_module(void);
+
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "VoiceTronix V6PCI/V12PCI/V4PCI API Support");
static const char desc[] = "VoiceTronix V6PCI/V12PCI/V4PCI API Support";
static const char config[] = "vpb.conf";
Modified: team/group/new_loader_completion/include/asterisk/file.h
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/include/asterisk/file.h?rev=29468&r1=29467&r2=29468&view=diff
==============================================================================
--- team/group/new_loader_completion/include/asterisk/file.h (original)
+++ team/group/new_loader_completion/include/asterisk/file.h Mon May 22 11:56:03 2006
@@ -142,7 +142,7 @@
* returns 0 on success, -1 on failure
*/
int __ast_format_register(const struct ast_format *f, struct ast_module *mod);
-#define ast_format_register(f) __ast_format_register(f, ast_module_info.self)
+#define ast_format_register(f) __ast_format_register(f, ast_module_info->self)
/*! Unregisters a file format */
/*!
Modified: team/group/new_loader_completion/include/asterisk/module.h
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/include/asterisk/module.h?rev=29468&r1=29467&r2=29468&view=diff
==============================================================================
--- team/group/new_loader_completion/include/asterisk/module.h (original)
+++ team/group/new_loader_completion/include/asterisk/module.h Mon May 22 11:56:03 2006
@@ -304,10 +304,6 @@
const char *key;
const struct ast_flags flags;
-
- struct ast_module_symbol *exported_symbols;
- struct ast_module_symbol *required_symbols;
- struct ast_cli_entry *clis;
};
void ast_module_register(const struct ast_module_info *);
@@ -317,45 +313,69 @@
void __ast_module_user_remove(struct ast_module *, struct ast_module_user *);
void __ast_module_user_hangup_all(struct ast_module *);
-#define ast_module_user_add(chan) __ast_module_user_add(ast_module_info.self, chan)
-#define ast_module_user_remove(user) __ast_module_user_remove(ast_module_info.self, user)
-#define ast_module_user_hangup_all() __ast_module_user_hangup_all(ast_module_info.self)
+#define ast_module_user_add(chan) __ast_module_user_add(ast_module_info->self, chan)
+#define ast_module_user_remove(user) __ast_module_user_remove(ast_module_info->self, user)
+#define ast_module_user_hangup_all() __ast_module_user_hangup_all(ast_module_info->self)
struct ast_module *ast_module_ref(struct ast_module *);
void ast_module_unref(struct ast_module *);
-/* forward declare this structure in modules, so that macro/function
- calls that need it can get it, since it will actually be declared
- and populated at the end of the module's source file... however,
- do it a bit differently for C++ modules, since they can't work
- quite the same way */
#if defined(__cplusplus) || defined(c_plusplus)
-extern struct ast_module_info ast_module_info;
-#else
-const static struct ast_module_info ast_module_info;
-#endif
-
-#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...) \
+#define AST_MODULE_INFO(keystr, flags_to_set, desc, load_func, unload_func, reload_func) \
+ const static struct ast_module_info __mod_info = { \
+ NULL, \
+ load_func, \
+ unload_func, \
+ reload_func, \
+ desc, \
+ keystr, \
+ flags_to_set \
+ }; \
static void __attribute__ ((constructor)) __reg_module(void) \
{ \
- ast_module_register(&ast_module_info); \
+ ast_module_register(&__mod_info); \
} \
static void __attribute__ ((destructor)) __unreg_module(void) \
{ \
- ast_module_unregister(&ast_module_info); \
+ ast_module_unregister(&__mod_info); \
} \
- const static struct ast_module_info ast_module_info = { \
+ const static __attribute__((unused)) struct ast_module_info *ast_module_info = &__mod_info
+
+#define AST_MODULE_INFO_STANDARD(keystr, desc) \
+ AST_MODULE_INFO(keystr, AST_MODULE_DEFAULT, desc, \
+ load_module, \
+ unload_module, \
+ NULL \
+ )
+#else
+/* forward declare this pointer in modules, so that macro/function
+ calls that need it can get it, since it will actually be declared
+ and populated at the end of the module's source file... */
+const static __attribute__((unused)) struct ast_module_info *ast_module_info;
+
+#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...) \
+ const static struct ast_module_info __mod_info = { \
.flags = { flags_to_set }, \
.description = desc, \
.key = keystr, \
fields \
- }
+ }; \
+ static void __attribute__ ((constructor)) __reg_module(void) \
+ { \
+ ast_module_register(&__mod_info); \
+ } \
+ static void __attribute__ ((destructor)) __unreg_module(void) \
+ { \
+ ast_module_unregister(&__mod_info); \
+ } \
+ const static struct ast_module_info *ast_module_info = &__mod_info
#define AST_MODULE_INFO_STANDARD(keystr, desc) \
AST_MODULE_INFO(keystr, AST_MODULE_DEFAULT, desc, \
.load = load_module, \
.unload = unload_module, \
)
+#endif
#if defined(__cplusplus) || defined(c_plusplus)
}
Modified: team/group/new_loader_completion/include/asterisk/translate.h
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/include/asterisk/translate.h?rev=29468&r1=29467&r2=29468&view=diff
==============================================================================
--- team/group/new_loader_completion/include/asterisk/translate.h (original)
+++ team/group/new_loader_completion/include/asterisk/translate.h Mon May 22 11:56:03 2006
@@ -151,7 +151,7 @@
* \return 0 on success, -1 on failure
*/
int __ast_register_translator(struct ast_translator *t, struct ast_module *module);
-#define ast_register_translator(t) __ast_register_translator(t, ast_module_info.self)
+#define ast_register_translator(t) __ast_register_translator(t, ast_module_info->self)
/*!
* \brief Unregister a translator
Modified: team/group/new_loader_completion/loader.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/loader.c?rev=29468&r1=29467&r2=29468&view=diff
==============================================================================
--- team/group/new_loader_completion/loader.c (original)
+++ team/group/new_loader_completion/loader.c Mon May 22 11:56:03 2006
@@ -187,275 +187,6 @@
ast_update_use_count();
}
-/*
- * helper routine to print the symbolic name associated to a state
- */
-static const char *st_name(enum st_t state)
-{
- const char *st;
-
- switch (state) {
-#define ST(x) case x: st = # x; break;
- ST(MS_NEW);
- ST(MS_FAILED);
- ST(MS_RESOLVED);
- ST(MS_ACTIVE);
- ST(MS_CANLOAD);
- default:
- st = "unknown";
- }
- return st;
-#undef ST
-}
-
-/*! \brief
- * Fetch/release an exported symbol - modify export_refcount by delta
- * \param delta 1 to fetch a symbol, -1 to release it.
- * \return on success, return symbol value.
- * \note Note, modules in MS_FAIL will never match in a 'get' request.
- * If src is non-NULL, on exit *src points to the source module.
- *
- * Must be called with the lock held.
- */
-static void *module_symbol_helper(const char *name,
- int delta, struct ast_module **src)
-{
- void *ret = NULL;
- struct ast_module *m;
-
- AST_LIST_TRAVERSE(&module_list, m, entry) {
- struct ast_module_symbol *es;
-
- if (delta > 0 && m->state == MS_FAILED)
- continue; /* cannot 'get' a symbol from a failed module */
-
- for (es = m->mod->exported_symbols; ret == NULL && es && es->name; es++) {
- if (!strcmp(es->name, name)) {
- ret = es->value;
- m->export_refcount += delta;
- if (src)
- *src = m;
- break;
- }
- }
- if (ret)
- break;
- }
-
- if (!ret)
- ast_log(LOG_WARNING, "symbol %s not found\n", name);
-
- return ret;
-}
-
-static void *release_module_symbol(const char *name)
-{
- return module_symbol_helper(name, -1, NULL);
-}
-
-static void *get_module_symbol(const char *name, struct ast_module **src)
-{
- return module_symbol_helper(name, +1, src);
-}
-
-/*!
- * \brief Release refcounts to all imported symbols,
- * and change module state to MS_FAILED.
- */
-static void release_module(struct ast_module *m)
-{
- struct ast_module_symbol *s;
-
- for (s = m->mod->required_symbols; s && s->name; s++) {
- if (s->value) {
- release_module_symbol(s->name);
- s->value = NULL;
- }
- }
- m->state = MS_FAILED;
-}
-
-/*! \brief check that no NULL symbols are exported - the algorithms rely on that. */
-static int check_exported(struct ast_module *m)
-{
- struct ast_module_symbol *es = m->mod->exported_symbols;
- int errors = 0;
-
- if (!es)
- return 0;
-
- for (; es->name; es++) {
- void **p = es->value;
- int i;
-
- for (i = 0; i < es->size / sizeof(void *); i++, p++) {
- if (!*p) {
- ast_log(LOG_WARNING, "\t *** null field at offset %d\n", i);
- errors++;
- }
- }
- }
-
- return errors;
-}
-
-/*!
- * \brief Resolve symbols and change state accordingly.
- * \return Return 1 if state changed, 0 otherwise.
- * \note If MS_FAILED, MS_ACTIVE or MS_CANLOAD there is nothing to do.
- * If a symbol cannot be resolved (no supplier or supplier in MS_FAIL),
- * move to MS_FAIL and release all symbols;
- * If all suppliers are MS_ACTIVE, move to MS_CANLOAD
- * otherwise move to MS_RESOLVED.
- */
-static int resolve(struct ast_module *m)
-{
- struct ast_module_symbol *s;
-
- if (m->state == MS_FAILED || m->state == MS_ACTIVE || m->state == MS_CANLOAD)
- return 0; /* already decided what to do */
-
- /* now it's either MS_NEW or MS_RESOLVED.
- * Be optimistic and put it in MS_CANLOAD, then try to
- * resolve and verify symbols, and downgrade as appropriate.
- */
- m->state = MS_CANLOAD;
- for (s = m->mod->required_symbols; s && s->name; s++) {
- void **p = (void **)(s->value);
-
- if (!*p) /* symbol not resolved yet */
- *p = get_module_symbol(s->name, &s->src);
-
- if (!*p || s->src->state == MS_FAILED) { /* fail */
- ast_log(LOG_WARNING,
- "Unresolved symbol %s for module %s\n",
- s->name, m->resource);
- release_module(m); /* and set to MS_FAILED */
- break;
- }
- if (s->src->state != MS_ACTIVE)
- m->state = MS_RESOLVED; /* downgrade */
- }
-
- return 1;
-}
-
-/*!
- * \brief Fixup references and load modules according to their dependency order.
- * Called when new modules are added to the list.
- * The algorithm is as follows:
- * - all modules MS_FAILED are changed to MS_NEW, in case something
- * happened that could help them.
- * - first try to resolve symbols. If successful, change the
- * module's state to MS_RESOLVED otherwise to MS_FAILED
- * - repeat on all modules until there is progress:
- * - if it is MS_ACTIVE or MS_FAILED, continue (no progress)
- * - if one has all required modules in MS_ACTIVE, try to load it.
- * If successful it becomes MS_ACTIVE itself, otherwise
- * MS_FAILED and releases all symbols.
- * In any case, we have progress.
- * - if one of the dependencies is MS_FAILED, release and set to
- * MS_FAILED here too. We have progress.
- * - if we have no progress there is a cyclic dependency.
- * Take first and change to MS_CANLOAD, i.e. as if all required are
- * MS_ACTIVE. we have progress, so repeat.
- * \par NOTE:
- * - must be called with lock held
- * - recursive calls simply return success.
- */
-static int fixup(const char *caller)
-{
- struct ast_module *m;
- int total = 0, new = 0, cycle = 0;
- static int in_fixup = 0; /* disable recursive calls */
-
- if (++in_fixup > 1)
- return 0;
-
- AST_LIST_TRAVERSE(&module_list, m, entry) {
- total++;
- if (m->state == MS_FAILED)
- m->state = MS_NEW;
- if (m->state == MS_NEW)
- new++;
- /* print some debugging info for new modules */
- if (m->state == MS_NEW &&
- (m->mod->exported_symbols || m->mod->required_symbols))
- ast_log(LOG_NOTICE,
- "module %-30s exports %p requires %p state %s(%d)\n",
- m->resource, m->mod->exported_symbols,
- m->mod->required_symbols,
- st_name(m->state), m->state);
- }
-
- for (; ;cycle++) {
- int again = 0; /* set if we need another round */
-
- AST_LIST_TRAVERSE(&module_list, m, entry) {
- if (resolve(m))
- again = 1; /* something changed */
-
- if (m->state != MS_CANLOAD) /* for now, done with this module */
- continue;
-
- /* try to run the load routine */
- if (m->mod->load()) {
- ast_log(LOG_WARNING, "load_module %s fail\n",
- m->resource);
- release_module(m); /* and set to MS_FAIL */
- } else {
- m->state = MS_ACTIVE;
- }
- again = 1; /* something has changed */
- }
- /* Modules in MS_RESOLVED mean a possible cyclic dependency.
- * Break the indecision by setting one to CANLOAD, and repeat.
- */
- AST_LIST_TRAVERSE(&module_list, m, entry) {
- if (m->state == MS_RESOLVED) {
- m->state = MS_CANLOAD;
- again = 1;
- break;
- }
- }
- if (!again) /* we are done */
- break;
- }
-
- in_fixup--;
-
- return 0;
-}
-
-#if 0
-/* test routines to see which modules depend on global symbols
- * exported by other modules.
- */
-static void check_symbols(void)
-{
- struct dirent *d;
- DIR *mods = opendir(ast_config_AST_MODULE_DIR);
- void *lib;
- char buf[1024];
-
- ast_log(LOG_WARNING, "module dir <%s>\n", ast_config_AST_MODULE_DIR);
- if (!mods)
- return;
- while((d = readdir(mods))) {
- int ld = strlen(d->d_name);
- /* Must end in .so to load it. */
- if (ld <= 3 || strcasecmp(d->d_name + ld - 3, ".so"))
- continue;
- snprintf(buf, sizeof(buf), "%s/%s", ast_config_AST_MODULE_DIR, d->d_name);
- lib = dlopen(buf, RTLD_NOW | RTLD_LOCAL);
- if (lib == NULL) {
- ast_log(LOG_WARNING, "(notice only) module %s error %s\n", d->d_name, dlerror());
- }
- dlclose(lib);
- }
-}
-#endif
-
/*! \note
* In addition to modules, the reload command handles some extra keywords
* which are listed here together with the corresponding handlers.
@@ -561,8 +292,6 @@
ast_log(LOG_WARNING, "** Dangerous **: Unloading resource anyway, at user request\n");
}
- release_module(cur);
-
AST_LIST_REMOVE_CURRENT(&module_list, entry);
dlclose(cur->lib);
@@ -680,26 +409,6 @@
return cur ? -1 : 0;
}
-/* lookup a symbol with or without leading '_', accept either form in input */
-static void *find_symbol(struct ast_module *m, const char *name, int verbose)
-{
- char *n1;
- void *s;
-
- if (name[0] == '_')
- name++;
- n1 = alloca(strlen(name) + 2); /* room for leading '_' and final '\0' */
- n1[0] = '_';
- strcpy(n1+1, name);
- s = dlsym(m->lib, n1+1); /* try without '_' */
- if (s == NULL)
- s = dlsym(m->lib, n1);
- if (verbose && s == NULL)
- ast_log(LOG_WARNING, "No symbol '%s' in module '%s\n",
- n1, m->resource);
- return s;
-}
-
/* assumes module_list will be locked */
static struct ast_module * __load_resource(const char *resource_name)
{
@@ -731,16 +440,7 @@
return NULL;
}
- if (!(m = find_symbol(cur, "ast_module_info", 0))) {
- ast_log(LOG_WARNING, "Module '%s' does not provide the proper module information for this version of Asterisk.\n",
- resource_name);
- dlclose(cur->lib);
- free(cur);
- return NULL;
- }
-
cur->mod = m;
- errors = check_exported(cur);
if (!m->load)
errors++;
@@ -806,7 +506,6 @@
AST_LIST_LOCK(&module_list);
m = __load_resource(resource_name);
- fixup(resource_name);
ret = (m->state == MS_FAILED) ? -1 : 0;
AST_LIST_UNLOCK(&module_list);
@@ -914,7 +613,6 @@
closedir(mods);
done:
- fixup("load_modules");
ast_config_destroy(cfg);
return 0;
Modified: team/group/new_loader_completion/res/res_clioriginate.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/res/res_clioriginate.c?rev=29468&r1=29467&r2=29468&view=diff
==============================================================================
--- team/group/new_loader_completion/res/res_clioriginate.c (original)
+++ team/group/new_loader_completion/res/res_clioriginate.c Mon May 22 11:56:03 2006
@@ -126,7 +126,7 @@
return RESULT_SHOWUSAGE;
/* ugly, can be removed when CLI entries have ast_module pointers */
- ast_module_ref(ast_module_info.self);
+ ast_module_ref(ast_module_info->self);
if (!strcasecmp("application", argv[2])) {
res = orig_app(fd, argv[1], argv[3], argv[4]);
@@ -135,7 +135,7 @@
} else
res = RESULT_SHOWUSAGE;
- ast_module_unref(ast_module_info.self);
+ ast_module_unref(ast_module_info->self);
return res;
}
@@ -149,9 +149,9 @@
return NULL;
/* ugly, can be removed when CLI entries have ast_module pointers */
- ast_module_ref(ast_module_info.self);
+ ast_module_ref(ast_module_info->self);
ret = ast_cli_complete(word, choices, state);
- ast_module_unref(ast_module_info.self);
+ ast_module_unref(ast_module_info->self);
return ret;
}
Modified: team/group/new_loader_completion/res/res_convert.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/res/res_convert.c?rev=29468&r1=29467&r2=29468&view=diff
==============================================================================
--- team/group/new_loader_completion/res/res_convert.c (original)
+++ team/group/new_loader_completion/res/res_convert.c Mon May 22 11:56:03 2006
@@ -64,7 +64,7 @@
char *name_in, *ext_in, *name_out, *ext_out;
/* ugly, can be removed when CLI entries have ast_module pointers */
- ast_module_ref(ast_module_info.self);
+ ast_module_ref(ast_module_info->self);
if (argc != 3 || ast_strlen_zero(argv[1]) || ast_strlen_zero(argv[2])) {
ret = RESULT_SHOWUSAGE;
@@ -115,7 +115,7 @@
if (fs_in)
ast_closestream(fs_in);
- ast_module_unref(ast_module_info.self);
+ ast_module_unref(ast_module_info->self);
return ret;
}
Modified: team/group/new_loader_completion/res/res_smdi.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/res/res_smdi.c?rev=29468&r1=29467&r2=29468&view=diff
==============================================================================
--- team/group/new_loader_completion/res/res_smdi.c (original)
+++ team/group/new_loader_completion/res/res_smdi.c Mon May 22 11:56:03 2006
@@ -501,7 +501,7 @@
ASTOBJ_CONTAINER_DESTROY(&iface->mwi_q);
free(iface);
- ast_module_unref(ast_module_info.self);
+ ast_module_unref(ast_module_info->self);
}
/*!
@@ -685,7 +685,7 @@
ASTOBJ_CONTAINER_LINK(&smdi_ifaces, iface);
ASTOBJ_UNREF(iface, ast_smdi_interface_destroy);
- ast_module_ref(ast_module_info.self);
+ ast_module_ref(ast_module_info->self);
} else {
ast_log(LOG_NOTICE, "Ignoring unknown option %s in %s\n", v->name, config_file);
}
Modified: team/group/new_loader_completion/utils/ael_main.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/utils/ael_main.c?rev=29468&r1=29467&r2=29468&view=diff
==============================================================================
--- team/group/new_loader_completion/utils/ael_main.c (original)
+++ team/group/new_loader_completion/utils/ael_main.c Mon May 22 11:56:03 2006
@@ -250,7 +250,7 @@
}
strcpy(ast_config_AST_VAR_DIR, "/var/lib/asterisk");
- ast_module_info.load();
+ ast_module_info->load();
ast_log(4, "ael2_parse", __LINE__, "main", "%d contexts, %d extensions, %d priorities\n", conts, extens, priors);
More information about the asterisk-commits
mailing list