[Asterisk-cvs] asterisk .cleancount, 1.2, 1.3 Makefile, 1.131,
1.132 asterisk.c, 1.136, 1.137 config.c, 1.49, 1.50 enum.c,
1.20, 1.21 loader.c, 1.36, 1.37 logger.c, 1.54, 1.55 manager.c,
1.81, 1.82 rtp.c, 1.107, 1.108
markster at lists.digium.com
markster at lists.digium.com
Tue Jan 25 00:08:01 CST 2005
- Previous message: [Asterisk-cvs] asterisk/channels chan_skinny.c,1.63,1.64
- Next message: [Asterisk-cvs]
asterisk/cdr cdr_manager.c, 1.1, 1.2 cdr_odbc.c, 1.22,
1.23 cdr_pgsql.c, 1.13, 1.14 cdr_tds.c, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv27198
Modified Files:
.cleancount Makefile asterisk.c config.c enum.c loader.c
logger.c manager.c rtp.c
Log Message:
Merge config updates (bug #3406)
Index: .cleancount
===================================================================
RCS file: /usr/cvsroot/asterisk/.cleancount,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- .cleancount 23 Jan 2005 18:47:51 -0000 1.2
+++ .cleancount 25 Jan 2005 06:10:19 -0000 1.3
@@ -1 +1 @@
-2
+3
Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/Makefile,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -d -r1.131 -r1.132
--- Makefile 21 Jan 2005 04:44:49 -0000 1.131
+++ Makefile 25 Jan 2005 06:10:19 -0000 1.132
@@ -231,7 +231,7 @@
cdr.o tdd.o acl.o rtp.o manager.o asterisk.o ast_expr.o \
dsp.o chanvars.o indications.o autoservice.o db.o privacy.o \
astmm.o enum.o srv.o dns.o aescrypt.o aestab.o aeskey.o \
- utils.o
+ utils.o config_old.o
ifeq (${OSARCH},Darwin)
OBJS+=poll.o dlfcn.o
ASTLINK=-Wl,-dynamic
@@ -597,4 +597,3 @@
if ! cmp -s .cleancount .lastclean ; then \
$(MAKE) clean; cp -f .cleancount .lastclean;\
fi
-
Index: asterisk.c
===================================================================
RCS file: /usr/cvsroot/asterisk/asterisk.c,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -d -r1.136 -r1.137
--- asterisk.c 21 Jan 2005 07:06:24 -0000 1.136
+++ asterisk.c 25 Jan 2005 06:10:19 -0000 1.137
@@ -48,7 +48,6 @@
#include "editline/histedit.h"
#include "asterisk.h"
#include <asterisk/config.h>
-#include <asterisk/config_pvt.h>
#include <sys/resource.h>
#include <grp.h>
#include <pwd.h>
@@ -1498,11 +1497,11 @@
char *config = ASTCONFPATH;
if (option_overrideconfig == 1) {
- cfg = ast_load((char *)ast_config_AST_CONFIG_FILE);
+ cfg = ast_config_load((char *)ast_config_AST_CONFIG_FILE);
if (!cfg)
ast_log(LOG_WARNING, "Unable to open specified master config file '%s', using builtin defaults\n", ast_config_AST_CONFIG_FILE);
} else {
- cfg = ast_load(config);
+ cfg = ast_config_load(config);
}
/* init with buildtime config */
@@ -1571,7 +1570,7 @@
}
v = v->next;
}
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
}
int main(int argc, char *argv[])
@@ -1742,10 +1741,10 @@
ast_readconfig();
if (option_console && !option_verbose)
- ast_verbose("[ Initializing Custom Configuration Options]");
+ ast_verbose("[ Initializing Custom Configuration Options ]");
/* custom config setup */
register_config_cli();
- read_ast_cust_config();
+ read_config_maps();
if (option_console) {
Index: config.c
===================================================================
RCS file: /usr/cvsroot/asterisk/config.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- config.c 22 Jan 2005 22:13:11 -0000 1.49
+++ config.c 25 Jan 2005 06:10:19 -0000 1.50
@@ -25,7 +25,6 @@
# include <glob.h>
#endif
#include <asterisk/config.h>
-#include <asterisk/config_pvt.h>
#include <asterisk/cli.h>
#include <asterisk/lock.h>
#include <asterisk/options.h>
@@ -40,8 +39,7 @@
#define COMMENT_META ';'
#define COMMENT_TAG '-'
[...1188 lines suppressed...]
- map->database = map->driver + strlen(map->driver) + 1;
- strcpy(map->database, database);
- if (table) {
- map->table = map->database + strlen(map->database) + 1;
- strcpy(map->table, table);
- } else
- map->table = NULL;
- map->next = maps;
- if (option_verbose > 1)
- ast_verbose(VERBOSE_PREFIX_2 "Binding %s to %s/%s/%s\n",map->name,map->driver, map->database, map->table ? map->table : map->name);
- maps = map;
- }
- }
- }
-
- ast_destroy(config);
- }
-
- return 0;
-}
Index: enum.c
===================================================================
RCS file: /usr/cvsroot/asterisk/enum.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- enum.c 14 Jul 2004 07:44:19 -0000 1.20
+++ enum.c 25 Jan 2005 06:10:19 -0000 1.21
@@ -413,7 +413,7 @@
free(sl);
}
toplevs = NULL;
- cfg = ast_load("enum.conf");
+ cfg = ast_config_load("enum.conf");
if (cfg) {
sl = NULL;
v = ast_variable_browse(cfg, "general");
@@ -430,7 +430,7 @@
}
v = v->next;
}
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
} else {
toplevs = enum_newtoplev(TOPLEV);
}
Index: loader.c
===================================================================
RCS file: /usr/cvsroot/asterisk/loader.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- loader.c 21 Jan 2005 07:06:24 -0000 1.36
+++ loader.c 25 Jan 2005 06:10:19 -0000 1.37
@@ -19,7 +19,6 @@
#include <asterisk/module.h>
#include <asterisk/options.h>
#include <asterisk/config.h>
-#include <asterisk/config_pvt.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/term.h>
@@ -169,9 +168,9 @@
ret = strdup(m->resource);
} else {
ret = NULL;
- if (!strncasecmp(word, "astconfig", strlen(word))) {
+ if (!strncasecmp(word, "extconfig", strlen(word))) {
if (++which > state)
- ret = strdup("astconfig");
+ ret = strdup("extconfig");
} else if (!strncasecmp(word, "manager", strlen(word))) {
if (++which > state)
ret = strdup("manager");
@@ -200,8 +199,8 @@
ast_verbose("The previous reload command didn't finish yet\n");
return -1;
}
- if (!name || !strcasecmp(name, "astconfig")) {
- read_ast_cust_config();
+ if (!name || !strcasecmp(name, "extconfig")) {
+ read_config_maps();
reloaded = 2;
}
if (!name || !strcasecmp(name, "manager")) {
@@ -403,11 +402,11 @@
/* Keep the module file parsing silent */
o = option_verbose;
option_verbose = 0;
- cfg = ast_load(AST_MODULE_CONFIG);
+ cfg = ast_config_load(AST_MODULE_CONFIG);
option_verbose = o;
res = __load_resource(resource_name, cfg);
if (cfg)
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
return res;
}
@@ -444,7 +443,7 @@
char tmp[80];
if (option_verbose)
ast_verbose( "Asterisk Dynamic Loader Starting:\n");
- cfg = ast_load(AST_MODULE_CONFIG);
+ cfg = ast_config_load(AST_MODULE_CONFIG);
if (cfg) {
/* Load explicitly defined modules */
v = ast_variable_browse(cfg, "modules");
@@ -459,7 +458,7 @@
if (__load_resource(v->value, cfg)) {
ast_log(LOG_WARNING, "Loading module %s failed!\n", v->value);
if (cfg)
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
return -1;
}
}
@@ -509,7 +508,7 @@
if (__load_resource(d->d_name, cfg)) {
ast_log(LOG_WARNING, "Loading module %s failed!\n", d->d_name);
if (cfg)
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
return -1;
}
}
@@ -521,7 +520,7 @@
}
}
}
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
return 0;
}
Index: logger.c
===================================================================
RCS file: /usr/cvsroot/asterisk/logger.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- logger.c 27 Dec 2004 22:41:58 -0000 1.54
+++ logger.c 25 Jan 2005 06:10:19 -0000 1.55
@@ -267,7 +267,7 @@
/* close syslog */
closelog();
- cfg = ast_load("logger.conf");
+ cfg = ast_config_load("logger.conf");
/* If no config file, we're fine */
if (!cfg)
@@ -299,7 +299,7 @@
var = var->next;
}
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
ast_mutex_unlock(&loglock);
}
Index: manager.c
===================================================================
RCS file: /usr/cvsroot/asterisk/manager.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- manager.c 21 Jan 2005 07:06:24 -0000 1.81
+++ manager.c 25 Jan 2005 06:10:19 -0000 1.82
@@ -398,7 +398,7 @@
char *key = astman_get_header(m, "Key");
char *events = astman_get_header(m, "Events");
- cfg = ast_load("manager.conf");
+ cfg = ast_config_load("manager.conf");
if (!cfg)
return -1;
cat = ast_category_browse(cfg, NULL);
@@ -423,7 +423,7 @@
if (ha && !ast_apply_ha(ha, &(s->sin))) {
ast_log(LOG_NOTICE, "%s failed to pass IP ACL as '%s'\n", ast_inet_ntoa(iabuf, sizeof(iabuf), s->sin.sin_addr), user);
ast_free_ha(ha);
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
return -1;
} else if (ha)
ast_free_ha(ha);
@@ -443,7 +443,7 @@
if (!strcmp(md5key, key))
break;
else {
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
return -1;
}
}
@@ -451,7 +451,7 @@
break;
} else {
ast_log(LOG_NOTICE, "%s failed to authenticate as '%s'\n", ast_inet_ntoa(iabuf, sizeof(iabuf), s->sin.sin_addr), user);
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
return -1;
}
}
@@ -462,13 +462,13 @@
strncpy(s->username, cat, sizeof(s->username) - 1);
s->readperm = get_perm(ast_variable_retrieve(cfg, cat, "read"));
s->writeperm = get_perm(ast_variable_retrieve(cfg, cat, "write"));
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
if (events)
set_eventmask(s, events);
return 0;
}
ast_log(LOG_NOTICE, "%s tried to authenticate with non-existant user '%s'\n", ast_inet_ntoa(iabuf, sizeof(iabuf), s->sin.sin_addr), user);
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
return -1;
}
@@ -1455,7 +1455,7 @@
}
portno = DEFAULT_MANAGER_PORT;
displayconnects = 1;
- cfg = ast_load("manager.conf");
+ cfg = ast_config_load("manager.conf");
if (!cfg) {
ast_log(LOG_NOTICE, "Unable to open management configuration manager.conf. Call management disabled.\n");
return 0;
@@ -1507,7 +1507,7 @@
ast_log(LOG_WARNING, "Unable to change management port / enabled\n");
#endif
}
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
/* If not enabled, do nothing */
if (!enabled) {
Index: rtp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/rtp.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- rtp.c 21 Jan 2005 07:06:24 -0000 1.107
+++ rtp.c 25 Jan 2005 06:10:19 -0000 1.108
@@ -1753,7 +1753,7 @@
#ifdef SO_NO_CHECK
checksums = 1;
#endif
- cfg = ast_load("rtp.conf");
+ cfg = ast_config_load("rtp.conf");
if (cfg) {
if ((s = ast_variable_retrieve(cfg, "general", "rtpstart"))) {
rtpstart = atoi(s);
@@ -1780,7 +1780,7 @@
ast_log(LOG_WARNING, "Disabling RTP checksums is not supported on this operating system!\n");
#endif
}
- ast_destroy(cfg);
+ ast_config_destroy(cfg);
}
if (rtpstart >= rtpend) {
ast_log(LOG_WARNING, "Unreasonable values for RTP start in rtp.conf/end\n");
- Previous message: [Asterisk-cvs] asterisk/channels chan_skinny.c,1.63,1.64
- Next message: [Asterisk-cvs]
asterisk/cdr cdr_manager.c, 1.1, 1.2 cdr_odbc.c, 1.22,
1.23 cdr_pgsql.c, 1.13, 1.14 cdr_tds.c, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list