[asterisk-commits] eliel: branch eliel/data_api_providers_gsoc2010 r281649 - in /team/eliel/data...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 10 14:25:20 CDT 2010


Author: eliel
Date: Tue Aug 10 14:25:16 2010
New Revision: 281649

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=281649
Log:
Fix all the comments given by Tilghman in Review Board.


Modified:
    team/eliel/data_api_providers_gsoc2010/include/asterisk/_private.h
    team/eliel/data_api_providers_gsoc2010/include/asterisk/data.h
    team/eliel/data_api_providers_gsoc2010/main/asterisk.c
    team/eliel/data_api_providers_gsoc2010/main/cli.c
    team/eliel/data_api_providers_gsoc2010/main/data.c
    team/eliel/data_api_providers_gsoc2010/main/frame.c
    team/eliel/data_api_providers_gsoc2010/main/translate.c

Modified: team/eliel/data_api_providers_gsoc2010/include/asterisk/_private.h
URL: http://svnview.digium.com/svn/asterisk/team/eliel/data_api_providers_gsoc2010/include/asterisk/_private.h?view=diff&rev=281649&r1=281648&r2=281649
==============================================================================
--- team/eliel/data_api_providers_gsoc2010/include/asterisk/_private.h (original)
+++ team/eliel/data_api_providers_gsoc2010/include/asterisk/_private.h Tue Aug 10 14:25:16 2010
@@ -24,7 +24,7 @@
 int astdb_init(void);			/*!< Provided by db.c */
 void ast_channels_init(void);		/*!< Provided by channel.c */
 void ast_builtins_init(void);		/*!< Provided by cli.c */
-void ast_builtins_cli_data_init(void);	/*!< Provided by cli.c */
+void ast_cli_builtins_data_init(void);	/*!< Provided by cli.c */
 int ast_cli_perms_init(int reload);	/*!< Provided by cli.c */
 int dnsmgr_init(void);			/*!< Provided by dnsmgr.c */ 
 void dnsmgr_start_refresh(void);	/*!< Provided by dnsmgr.c */

Modified: team/eliel/data_api_providers_gsoc2010/include/asterisk/data.h
URL: http://svnview.digium.com/svn/asterisk/team/eliel/data_api_providers_gsoc2010/include/asterisk/data.h?view=diff&rev=281649&r1=281648&r2=281649
==============================================================================
--- team/eliel/data_api_providers_gsoc2010/include/asterisk/data.h (original)
+++ team/eliel/data_api_providers_gsoc2010/include/asterisk/data.h Tue Aug 10 14:25:16 2010
@@ -819,11 +819,11 @@
  * \param[in] node_name The name of the node where we are going to add the list of
  *                      codecs.
  * \param[in] capability The codecs allowed.
- * \parma[in] all Show all the codecs without checking the capability parameter.
+ * \param[in] format_mask The mask of the codecs to show.
  * \return < 0 on error.
  * \return 0 on success.
  */
-int ast_data_add_codecs(struct ast_data *root, const char *node_name, format_t capability, int all);
+int ast_data_add_codecs(struct ast_data *root, const char *node_name, format_t capability, format_t format_mask);
 
 #if defined(__cplusplus) || defined(c_plusplus)
 }

Modified: team/eliel/data_api_providers_gsoc2010/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/eliel/data_api_providers_gsoc2010/main/asterisk.c?view=diff&rev=281649&r1=281648&r2=281649
==============================================================================
--- team/eliel/data_api_providers_gsoc2010/main/asterisk.c (original)
+++ team/eliel/data_api_providers_gsoc2010/main/asterisk.c Tue Aug 10 14:25:16 2010
@@ -3671,7 +3671,7 @@
 		printf ("%s", term_quit());
 		exit(1);
 	}
-	ast_builtins_cli_data_init();
+	ast_cli_builtins_data_init();
 
 	ast_channels_init();
 

Modified: team/eliel/data_api_providers_gsoc2010/main/cli.c
URL: http://svnview.digium.com/svn/asterisk/team/eliel/data_api_providers_gsoc2010/main/cli.c?view=diff&rev=281649&r1=281648&r2=281649
==============================================================================
--- team/eliel/data_api_providers_gsoc2010/main/cli.c (original)
+++ team/eliel/data_api_providers_gsoc2010/main/cli.c Tue Aug 10 14:25:16 2010
@@ -1891,7 +1891,7 @@
 }
 
 /*! \brief Initialize cli data providers */
-void ast_builtins_cli_data_init(void)
+void ast_cli_builtins_data_init(void)
 {
 	ast_data_register_multiple_core(cli_data_providers, ARRAY_LEN(cli_data_providers));
 }

Modified: team/eliel/data_api_providers_gsoc2010/main/data.c
URL: http://svnview.digium.com/svn/asterisk/team/eliel/data_api_providers_gsoc2010/main/data.c?view=diff&rev=281649&r1=281648&r2=281649
==============================================================================
--- team/eliel/data_api_providers_gsoc2010/main/data.c (original)
+++ team/eliel/data_api_providers_gsoc2010/main/data.c Tue Aug 10 14:25:16 2010
@@ -3174,7 +3174,7 @@
 	return RESULT_SUCCESS;
 }
 
-int ast_data_add_codecs(struct ast_data *root, const char *node_name, format_t capability, int all)
+int ast_data_add_codecs(struct ast_data *root, const char *node_name, format_t capability, format_t format_mask)
 {
 	struct ast_data *codecs, *codec;
 	size_t fmlist_size;
@@ -3192,7 +3192,7 @@
 
 	fmlist = ast_get_format_list(&fmlist_size);
 	for (x = 0; x < fmlist_size; x++) {
-		if (all || fmlist[x].bits & capability) {
+		if (fmlist[x].bits & format_mask || fmlist[x].bits & capability) {
 			codec = ast_data_add_node(codecs, "codec");
 			if (!codec) {
 				return -1;

Modified: team/eliel/data_api_providers_gsoc2010/main/frame.c
URL: http://svnview.digium.com/svn/asterisk/team/eliel/data_api_providers_gsoc2010/main/frame.c?view=diff&rev=281649&r1=281648&r2=281649
==============================================================================
--- team/eliel/data_api_providers_gsoc2010/main/frame.c (original)
+++ team/eliel/data_api_providers_gsoc2010/main/frame.c Tue Aug 10 14:25:16 2010
@@ -971,7 +971,6 @@
 			    term_color(cn, name, COLOR_YELLOW, COLOR_BLACK, sizeof(cn)));
 }
 
-
 /* Builtin Asterisk CLI-commands for debugging */
 static struct ast_cli_entry my_clis[] = {
 	AST_CLI_DEFINE(show_codecs, "Displays a list of codecs"),
@@ -988,7 +987,7 @@
 static int codecs_data_provider_get(const struct ast_data_search *search,
 		struct ast_data *data_root)
 {
-	ast_data_add_codecs(data_root, NULL, 0, 1);
+	ast_data_add_codecs(data_root, NULL, 0, AST_FORMAT_AUDIO_MASK | AST_FORMAT_VIDEO_MASK | AST_FORMAT_TEXT_MASK);
 
 	return 0;
 }

Modified: team/eliel/data_api_providers_gsoc2010/main/translate.c
URL: http://svnview.digium.com/svn/asterisk/team/eliel/data_api_providers_gsoc2010/main/translate.c?view=diff&rev=281649&r1=281648&r2=281649
==============================================================================
--- team/eliel/data_api_providers_gsoc2010/main/translate.c (original)
+++ team/eliel/data_api_providers_gsoc2010/main/translate.c Tue Aug 10 14:25:16 2010
@@ -587,7 +587,8 @@
 static int translation_data_provider_get(const struct ast_data_search *search,
         struct ast_data *data_root)
 {
-#define SHOW_TRANS 16
+#undef SHOW_TRANS
+#define SHOW_TRANS 64
 	int x, y;
 	struct ast_data *data_from, *data_to;
 




More information about the asterisk-commits mailing list