[asterisk-commits] kpfleming: trunk r47691 - in /trunk: ./ main/config.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Nov 15 13:05:27 MST 2006


Author: kpfleming
Date: Wed Nov 15 14:05:26 2006
New Revision: 47691

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47691
Log:
Merged revisions 47690 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r47690 | kpfleming | 2006-11-15 14:01:22 -0600 (Wed, 15 Nov 2006) | 20 lines

Merged revisions 47686,47688-47689 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r47686 | kpfleming | 2006-11-15 13:42:05 -0600 (Wed, 15 Nov 2006) | 2 lines

clear the category's variable tail pointer as well when variables are detached from it

........
r47688 | kpfleming | 2006-11-15 13:47:43 -0600 (Wed, 15 Nov 2006) | 2 lines

when appending a list of variable to a category, ensure the tail pointer points to the last variable in the list

........
r47689 | kpfleming | 2006-11-15 13:58:46 -0600 (Wed, 15 Nov 2006) | 2 lines

when re-writing the config file, don't repeat the path if it hasn't changed

........

................

Modified:
    trunk/   (props changed)
    trunk/main/config.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/config.c
URL: http://svn.digium.com/view/asterisk/trunk/main/config.c?view=diff&rev=47691&r1=47690&r2=47691
==============================================================================
--- trunk/main/config.c (original)
+++ trunk/main/config.c Wed Nov 15 14:05:26 2006
@@ -207,6 +207,8 @@
 	else
 		category->root = variable;
 	category->last = variable;
+	while (category->last->next)
+		category->last = category->last->next;
 }
 
 void ast_variables_destroy(struct ast_variable *v)
@@ -392,6 +394,7 @@
 
 	v = cat->root;
 	cat->root = NULL;
+	cat->last = NULL;
 
 	return v;
 }
@@ -977,7 +980,10 @@
 			ast_verbose(VERBOSE_PREFIX_2 "Saving '%s': ", fn);
 		fprintf(f, ";!\n");
 		fprintf(f, ";! Automatically generated configuration file\n");
-		fprintf(f, ";! Filename: %s (%s)\n", configfile, fn);
+		if (strcmp(configfile, fn))
+			fprintf(f, ";! Filename: %s (%s)\n", configfile, fn);
+		else
+			fprintf(f, ";! Filename: %s\n", configfile);
 		fprintf(f, ";! Generator: %s\n", generator);
 		fprintf(f, ";! Creation Date: %s", date);
 		fprintf(f, ";!\n");



More information about the asterisk-commits mailing list