[asterisk-commits] file: branch file/res_sorcery_realtime r384122 - in /team/file/res_sorcery_re...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 27 14:13:48 CDT 2013


Author: file
Date: Wed Mar 27 14:13:44 2013
New Revision: 384122

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384122
Log:
Few more to add.

Modified:
    team/file/res_sorcery_realtime/include/asterisk/config.h
    team/file/res_sorcery_realtime/main/config.c

Modified: team/file/res_sorcery_realtime/include/asterisk/config.h
URL: http://svnview.digium.com/svn/asterisk/team/file/res_sorcery_realtime/include/asterisk/config.h?view=diff&rev=384122&r1=384121&r2=384122
==============================================================================
--- team/file/res_sorcery_realtime/include/asterisk/config.h (original)
+++ team/file/res_sorcery_realtime/include/asterisk/config.h Wed Mar 27 14:13:44 2013
@@ -305,7 +305,9 @@
  * You should use the constant SENTINEL to terminate arguments, in
  * order to preserve cross-platform compatibility.
  */
+struct ast_variable *ast_load_realtime_fields(const char *family, const struct ast_variable *fields);
 struct ast_variable *ast_load_realtime(const char *family, ...) attribute_sentinel;
+struct ast_variable *ast_load_realtime_all_fields(const char *family, const struct ast_variable *fields);
 struct ast_variable *ast_load_realtime_all(const char *family, ...) attribute_sentinel;
 
 /*!

Modified: team/file/res_sorcery_realtime/main/config.c
URL: http://svnview.digium.com/svn/asterisk/team/file/res_sorcery_realtime/main/config.c?view=diff&rev=384122&r1=384121&r2=384122
==============================================================================
--- team/file/res_sorcery_realtime/main/config.c (original)
+++ team/file/res_sorcery_realtime/main/config.c Wed Mar 27 14:13:44 2013
@@ -2540,7 +2540,7 @@
 	return fields;
 }
 
-static struct ast_variable *ast_load_realtime_helper(const char *family, const struct ast_variable *fields)
+struct ast_variable *ast_load_realtime_all_fields(const char *family, const struct ast_variable *fields)
 {
 	struct ast_config_engine *eng;
 	char db[256];
@@ -2572,25 +2572,19 @@
 	va_end(ap);
 
 	if (fields) {
-		res = ast_load_realtime_helper(family, fields);
+		res = ast_load_realtime_all_fields(family, fields);
 	}
 
 	return res;
 }
 
-struct ast_variable *ast_load_realtime(const char *family, ...)
+struct ast_variable *ast_load_realtime_fields(const char *family, const struct ast_variable *fields)
 {
 	struct ast_variable *res;
 	struct ast_variable *cur;
 	struct ast_variable **prev;
-	RAII_VAR(struct ast_variable *, fields, NULL, ast_variables_destroy);
-	va_list ap;
-
-	va_start(ap, family);
-	fields = realtime_arguments_to_fields(ap);
-	va_end(ap);
-
-	res = ast_load_realtime_helper(family, fields);
+
+	res = ast_load_realtime_all_fields(family, fields);
 
 	/* Filter the list. */
 	prev = &res;
@@ -2617,6 +2611,18 @@
 		}
 	}
 	return res;
+}
+
+struct ast_variable *ast_load_realtime(const char *family, ...)
+{
+	RAII_VAR(struct ast_variable *, fields, NULL, ast_variables_destroy);
+	va_list ap;
+
+	va_start(ap, family);
+	fields = realtime_arguments_to_fields(ap);
+	va_end(ap);
+
+	return ast_load_realtime_fields(family, fields);
 }
 
 /*! \brief Check if realtime engine is configured for family */




More information about the asterisk-commits mailing list