aboutsummaryrefslogtreecommitdiffstats
path: root/loader.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-06-06 20:27:51 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-06-06 20:27:51 +0000
commitb2cbb6a75dfc8ea70554192ea223c3bd5dd52ed8 (patch)
tree2caa31e5bbb676cf8588f73516608ecef258757b /loader.c
parent2d6a1fbb231a5e8e082a2172a31d8def4a6e9607 (diff)
remove experimental module version tags
add per-file revision tags and 'show version files' CLI command git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5864 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'loader.c')
-rwxr-xr-xloader.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/loader.c b/loader.c
index b404fa0fa..bc7e2bdfc 100755
--- a/loader.c
+++ b/loader.c
@@ -17,6 +17,10 @@
#include <stdlib.h>
#include <string.h>
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION("$Revision$")
+
#include "asterisk/module.h"
#include "asterisk/options.h"
#include "asterisk/config.h"
@@ -34,7 +38,6 @@
#include <dlfcn.h>
#endif
#include "asterisk/md5.h"
-#include "asterisk.h"
#ifndef RTLD_NOW
#define RTLD_NOW 0
@@ -51,7 +54,6 @@ struct module {
char *(*description)(void);
char *(*key)(void);
int (*reload)(void);
- const char *(*version)(void);
void *lib;
char resource[256];
struct module *next;
@@ -253,11 +255,6 @@ int ast_module_reload(const char *name)
return reloaded;
}
-static const char *unknown_version(void)
-{
- return "--unknown--";
-}
-
static int __load_resource(const char *resource_name, const struct ast_config *cfg)
{
static char fn[256];
@@ -358,12 +355,6 @@ static int __load_resource(const char *resource_name, const struct ast_config *c
if (m->reload == NULL)
m->reload = dlsym(m->lib, "_reload");
- m->version = dlsym(m->lib, "version");
- if (m->version == NULL)
- m->version = dlsym(m->lib, "_version");
- if (m->version == NULL)
- m->version = unknown_version;
-
if (!m->key || !(key = m->key())) {
ast_log(LOG_WARNING, "Key routine returned NULL in module %s\n", fn);
key = NULL;
@@ -563,7 +554,7 @@ void ast_update_use_count(void)
}
-int ast_update_module_list(int (*modentry)(const char *module, const char *description, int usecnt, const char *version, const char *like),
+int ast_update_module_list(int (*modentry)(const char *module, const char *description, int usecnt, const char *like),
const char *like)
{
struct module *m;
@@ -574,10 +565,7 @@ int ast_update_module_list(int (*modentry)(const char *module, const char *descr
unlock = 0;
m = module_list;
while (m) {
- char ver_string[80];
-
- ast_copy_string(ver_string, m->version(), sizeof(ver_string));
- total_mod_loaded += modentry(m->resource, m->description(), m->usecount(), ast_strip(ast_strip_quoted(ver_string, "$", "$")), like);
+ total_mod_loaded += modentry(m->resource, m->description(), m->usecount(), like);
m = m->next;
}
if (unlock)