[Asterisk-cvs] asterisk/pbx pbx_config.c,1.31,1.32
jeremy at lists.digium.com
jeremy at lists.digium.com
Sun Jan 11 23:56:33 CST 2004
Update of /usr/cvsroot/asterisk/pbx
In directory mongoose.digium.com:/tmp/cvs-serv27383
Modified Files:
pbx_config.c
Log Message:
revert half fixed bug (426)
Index: pbx_config.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/pbx_config.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- pbx_config.c 12 Jan 2004 05:05:35 -0000 1.31
+++ pbx_config.c 12 Jan 2004 05:48:20 -0000 1.32
@@ -903,8 +903,6 @@
{
char filename[256];
struct ast_context *c;
- struct ast_config *cfg;
- struct ast_variable *var;
int context_header_written;
int incomplete = 0; /* incomplete config write? */
FILE *output;
@@ -924,9 +922,6 @@
return RESULT_FAILURE;
}
- /* Load old file first */
- cfg = ast_load(config);
-
/* have config path? */
if (argc == 3) {
/* is there extension.conf too? */
@@ -951,8 +946,6 @@
if (ast_lock_contexts()) {
ast_cli(fd, "Failed to lock contexts list\n");
ast_mutex_unlock(&save_dialplan_lock);
- if (cfg)
- ast_destroy(cfg);
return RESULT_FAILURE;
}
@@ -962,8 +955,6 @@
filename);
ast_unlock_contexts();
ast_mutex_unlock(&save_dialplan_lock);
- if (cfg)
- ast_destroy(cfg);
return RESULT_FAILURE;
}
@@ -972,15 +963,6 @@
static_config ? "yes" : "no",
write_protect_config ? "yes" : "no");
- var = ast_variable_walk(cfg, "globals");
- if (var) {
- fprintf(output, "[globals]\n");
- while(var) {
- fprintf(output, "%s => %s", var->name, var->value);
- var = var->next;
- }
- }
-
/* walk all contexts */
c = ast_walk_contexts(NULL);
while (c) {
@@ -1097,8 +1079,6 @@
ast_unlock_contexts();
ast_mutex_unlock(&save_dialplan_lock);
fclose(output);
- if (cfg)
- ast_destroy(cfg);
if (incomplete) {
ast_cli(fd, "Saved dialplan is incomplete\n");
More information about the svn-commits
mailing list