[Asterisk-cvs] asterisk config.c,1.32,1.33

markster at lists.digium.com markster at lists.digium.com
Tue Nov 23 12:59:21 CST 2004


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

Modified Files:
	config.c 
Log Message:
Build out "multi" version of realtime config (directory and realtime extensions will need this)


Index: config.c
===================================================================
RCS file: /usr/cvsroot/asterisk/config.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- config.c	8 Oct 2004 18:20:49 -0000	1.32
+++ config.c	23 Nov 2004 17:58:59 -0000	1.33
@@ -54,6 +54,12 @@
 	}
 }
 
+void ast_category_destroy(struct ast_category *cat)
+{
+	ast_destroy_realtime(cat->root);
+	free(cat);
+}
+
 void ast_destroy(struct ast_config *ast)
 {
 	struct ast_category *cat, *catn;
@@ -591,6 +597,18 @@
 	return __ast_load(configfile, NULL, &tmpc, &last, 0);
 }
 
+void ast_category_append(struct ast_config *config, struct ast_category *cat)
+{
+	struct ast_category *prev = NULL;
+	cat->next = NULL;
+	if (config->root) {
+		prev = config->root;
+		while(prev->next) prev = prev->next;
+		prev->next = cat;
+	} else
+		config->root = cat;
+}
+
 char *ast_category_browse(struct ast_config *config, char *prev)
 {	
 	struct ast_category *cat;




More information about the svn-commits mailing list