[asterisk-commits] eliel: branch group/data_api_gsoc2009 r204405 - /team/group/data_api_gsoc2009...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 30 10:43:56 CDT 2009


Author: eliel
Date: Tue Jun 30 10:43:53 2009
New Revision: 204405

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=204405
Log:
Remove the reference after linking the node to its parent.
(thanks russellb!)


Modified:
    team/group/data_api_gsoc2009/main/data.c

Modified: team/group/data_api_gsoc2009/main/data.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/data_api_gsoc2009/main/data.c?view=diff&rev=204405&r1=204404&r2=204405
==============================================================================
--- team/group/data_api_gsoc2009/main/data.c (original)
+++ team/group/data_api_gsoc2009/main/data.c Tue Jun 30 10:43:53 2009
@@ -488,8 +488,6 @@
 {
 	struct ast_data *root = obj;
 
-	ast_log(LOG_ERROR, "Destroying node: %s\n", root->name);
-
 	switch (root->type) {
 	case AST_DATA_POINTER:
 	case AST_DATA_STRING:
@@ -630,6 +628,7 @@
 		generated = root_provider->handler->get();
 		if (generated) {
 			data_result_add_child(node, generated);
+			ao2_ref(generated, -1);
 		}
 
 		return node;
@@ -641,6 +640,7 @@
 		generated = __data_result_generate_node(query, provider, provider->name, filter);
 		if (generated) {
 			data_result_add_child(node, generated);
+			ao2_ref(generated, -1);
 		}
 		ao2_ref(provider, -1);
 	}




More information about the asterisk-commits mailing list