[Asterisk-cvs] asterisk cli.c, 1.55, 1.56 config.c, 1.31, 1.32 loader.c, 1.26, 1.27

markster at lists.digium.com markster at lists.digium.com
Fri Oct 8 14:19:39 CDT 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv25822

Modified Files:
	cli.c config.c loader.c 
Log Message:
Minor config updates, add module counts (bug #2593)


Index: cli.c
===================================================================
RCS file: /usr/cvsroot/asterisk/cli.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- cli.c	8 Oct 2004 04:23:22 -0000	1.55
+++ cli.c	8 Oct 2004 18:20:49 -0000	1.56
@@ -337,7 +337,7 @@
 	ast_mutex_lock(&climodentrylock);
 	climodentryfd = fd;
 	ast_cli(fd, MODLIST_FORMAT2, "Module", "Description", "Use Count");
-	ast_update_module_list(modlist_modentry);
+	ast_cli(fd,"%d modules loaded\n",ast_update_module_list(modlist_modentry));
 	climodentryfd = -1;
 	ast_mutex_unlock(&climodentrylock);
 	return RESULT_SUCCESS;

Index: config.c
===================================================================
RCS file: /usr/cvsroot/asterisk/config.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- config.c	8 Oct 2004 05:36:23 -0000	1.31
+++ config.c	8 Oct 2004 18:20:49 -0000	1.32
@@ -431,6 +431,21 @@
 	return res;
 }
 
+struct ast_config *ast_load_realtime_multientry(const char *family, ...)
+{
+	struct ast_config_reg *reg;
+	char db[256]="";
+	char table[256]="";
+	struct ast_config *res=NULL;
+	va_list ap;
+	va_start(ap, family);
+	reg = get_ast_cust_config_keyword(family, db, sizeof(db), table, sizeof(table));
+	if (reg && reg->realtime_multi_func) 
+		res = reg->realtime_multi_func(db, table, ap);
+	va_end(ap);
+	return res;
+}
+
 int ast_update_realtime(const char *family, const char *keyfield, const char *lookup, ...)
 {
 	struct ast_config_reg *reg;

Index: loader.c
===================================================================
RCS file: /usr/cvsroot/asterisk/loader.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- loader.c	3 Sep 2004 14:02:12 -0000	1.26
+++ loader.c	8 Oct 2004 18:20:49 -0000	1.27
@@ -464,16 +464,18 @@
 {
 	struct module *m;
 	int unlock = -1;
+	int total_mod_loaded = 0;
 	if (ast_mutex_trylock(&modlock))
 		unlock = 0;
 	m = module_list;
 	while(m) {
 		modentry(m->resource, m->description(), m->usecount());
 		m = m->next;
+		total_mod_loaded++;
 	}
 	if (unlock)
 		ast_mutex_unlock(&modlock);
-	return 0;
+	return total_mod_loaded;
 }
 
 int ast_loader_register(int (*v)(void)) 




More information about the svn-commits mailing list