[svn-commits] russell: branch russell/data_retrieval r111599 - in /team/russell/data_retrie...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Mar 27 23:11:23 CDT 2008


Author: russell
Date: Thu Mar 27 23:11:23 2008
New Revision: 111599

URL: http://svn.digium.com/view/asterisk?view=rev&rev=111599
Log:
Remove an argument that ended up being redundant to ast_data_query().

Modified:
    team/russell/data_retrieval/include/asterisk/data.h
    team/russell/data_retrieval/main/data.c

Modified: team/russell/data_retrieval/include/asterisk/data.h
URL: http://svn.digium.com/view/asterisk/team/russell/data_retrieval/include/asterisk/data.h?view=diff&rev=111599&r1=111598&r2=111599
==============================================================================
--- team/russell/data_retrieval/include/asterisk/data.h (original)
+++ team/russell/data_retrieval/include/asterisk/data.h Thu Mar 27 23:11:23 2008
@@ -108,7 +108,7 @@
 /*! @{ Data Query */
 /*********************************************************************************************/
 
-struct ast_data_node *ast_data_query(const char *provider_name, const struct ast_data_node *query);
+struct ast_data_node *ast_data_query(const struct ast_data_node *query);
 
 /*! @} */
 

Modified: team/russell/data_retrieval/main/data.c
URL: http://svn.digium.com/view/asterisk/team/russell/data_retrieval/main/data.c?view=diff&rev=111599&r1=111598&r2=111599
==============================================================================
--- team/russell/data_retrieval/main/data.c (original)
+++ team/russell/data_retrieval/main/data.c Thu Mar 27 23:11:23 2008
@@ -203,10 +203,10 @@
 	return ast_data_node_add_child(parent, node);
 }
 
-struct ast_data_node *ast_data_query(const char *provider_name, const struct ast_data_node *query)
+struct ast_data_node *ast_data_query(const struct ast_data_node *query)
 {
 	struct ast_data_provider tmp_provider = {
-		.name = provider_name,
+		.name = "",
 	};
 	struct ast_data_prov_holder tmp_holder = {
 		.data_prov = &tmp_provider,
@@ -214,8 +214,10 @@
 	struct ast_data_prov_holder *holder;
 	struct ast_data_node *result;
 
+	tmp_provider.name = ast_data_node_get_name(query);
+
 	if (!(holder = ao2_find(data_providers, &tmp_holder, OBJ_POINTER))) {
-		ast_log(LOG_ERROR, "Data provider '%s' not found for query\n", provider_name);
+		ast_log(LOG_ERROR, "Data provider '%s' not found for query\n", tmp_provider.name);
 		return NULL;
 	}
 
@@ -378,7 +380,7 @@
 		return CLI_FAILURE;
 	}
 
-	if (!(results = ast_data_query(provider_name, query))) {
+	if (!(results = ast_data_query(query))) {
 		ast_data_node_destroy(query);
 		return CLI_FAILURE;
 	}




More information about the svn-commits mailing list