[Asterisk-cvs] asterisk asterisk.c, 1.119, 1.120 cli.c, 1.49,
1.50 loader.c, 1.24, 1.25
markster at lists.digium.com
markster at lists.digium.com
Thu Sep 2 16:42:13 CDT 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv14593
Modified Files:
asterisk.c cli.c loader.c
Log Message:
Don't try to look offhook with channel banks & Loopstart (bug #2362), also make individual modules reloadable...
Index: asterisk.c
===================================================================
RCS file: /usr/cvsroot/asterisk/asterisk.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
--- asterisk.c 31 Aug 2004 13:32:11 -0000 1.119
+++ asterisk.c 2 Sep 2004 20:45:24 -0000 1.120
@@ -446,7 +446,7 @@
if (restartnow)
execvp(_argv[0], _argv);
/* XXX This could deadlock XXX */
- ast_module_reload();
+ ast_module_reload(NULL);
}
static void child_handler(int sig)
Index: cli.c
===================================================================
RCS file: /usr/cvsroot/asterisk/cli.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- cli.c 7 Aug 2004 19:27:54 -0000 1.49
+++ cli.c 2 Sep 2004 20:45:24 -0000 1.50
@@ -109,9 +109,14 @@
static int handle_reload(int fd, int argc, char *argv[])
{
- if (argc != 1)
+ int x;
+ if (argc < 1)
return RESULT_SHOWUSAGE;
- ast_module_reload();
+ if (argc > 1) {
+ for (x=1;x<argc;x++)
+ ast_module_reload(argv[x]);
+ } else
+ ast_module_reload(NULL);
return RESULT_SUCCESS;
}
Index: loader.c
===================================================================
RCS file: /usr/cvsroot/asterisk/loader.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- loader.c 22 Jun 2004 18:48:59 -0000 1.24
+++ loader.c 2 Sep 2004 20:45:24 -0000 1.25
@@ -3,9 +3,9 @@
*
* Module Loader
*
- * Copyright (C) 1999, Mark Spencer
+ * Copyright (C) 1999-2004, Digium, Inc.
*
- * Mark Spencer <markster at linux-support.net>
+ * Mark Spencer <markster at digium.com>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
@@ -147,7 +147,7 @@
return res;
}
-void ast_module_reload(void)
+void ast_module_reload(const char *name)
{
struct module *m;
@@ -166,10 +166,12 @@
ast_mutex_lock(&modlock);
m = module_list;
while(m) {
- if (m->reload) {
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Reloading module '%s' (%s)\n", m->resource, m->description());
- m->reload();
+ if (!name || !strcasecmp(name, m->resource)) {
+ if (m->reload) {
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Reloading module '%s' (%s)\n", m->resource, m->description());
+ m->reload();
+ }
}
m = m->next;
}
More information about the svn-commits
mailing list