[asterisk-commits] tilghman: branch group/codec_bits r112119 - in /team/group/codec_bits: apps/ ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 31 17:29:28 CDT 2008


Author: tilghman
Date: Mon Mar 31 17:29:28 2008
New Revision: 112119

URL: http://svn.digium.com/view/asterisk?view=rev&rev=112119
Log:
Several more conversions, committed before end of day

Modified:
    team/group/codec_bits/apps/app_meetme.c
    team/group/codec_bits/channels/chan_iax2.c
    team/group/codec_bits/include/asterisk/translate.h

Modified: team/group/codec_bits/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/group/codec_bits/apps/app_meetme.c?view=diff&rev=112119&r1=112118&r2=112119
==============================================================================
--- team/group/codec_bits/apps/app_meetme.c (original)
+++ team/group/codec_bits/apps/app_meetme.c Mon Mar 31 17:29:28 2008
@@ -2538,9 +2538,11 @@
 						 (user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) ||
 						 (!user->talking)) ) {
 						int index;
-						for (index = 0; index < AST_FRAME_BITS; index++)
-							if (chan->rawwriteformat & (1 << index))
+						for (index = 0; index < AST_FRAME_BITS; index++) {
+							if (chan->rawwriteformat & (1 << index)) {
 								break;
+							}
+						}
 						if (index >= AST_FRAME_BITS)
 							goto bailoutandtrynormal;
 						ast_mutex_lock(&conf->listenlock);

Modified: team/group/codec_bits/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/group/codec_bits/channels/chan_iax2.c?view=diff&rev=112119&r1=112118&r2=112119
==============================================================================
--- team/group/codec_bits/channels/chan_iax2.c (original)
+++ team/group/codec_bits/channels/chan_iax2.c Mon Mar 31 17:29:28 2008
@@ -3164,6 +3164,7 @@
 	struct iax2_peer *peer;
 	int res = -1;
 	struct ast_codec_pref ourprefs;
+	struct ast_str *str = ast_str_alloca(BITSTRING_SIZE);
 
 	ast_clear_flag(cai, IAX_SENDANI | IAX_TRUNK);
 	cai->sockfd = defaultsockfd;
@@ -3205,8 +3206,8 @@
 	memcpy(&ourprefs, &peer->prefs, sizeof(ourprefs));
 	/* Move the calling channel's native codec to the top of the preference list */
 	if (c) {
-		ast_log(LOG_DEBUG, "prepending %x to prefs\n", c->nativeformats);
-		ast_codec_pref_prepend(&ourprefs, c->nativeformats, NULL, 1);
+		ast_log(LOG_DEBUG, "prepending %s to prefs\n", ast_codec2bitstring(c->nativeformats, &str));
+		ast_codec_pref_prepend(&ourprefs, c->nativeformats, 1);
 	}
 	ast_codec_pref_convert(&ourprefs, cai->prefs, sizeof(cai->prefs), 1);
 	ast_copy_string(cai->context, peer->context, sizeof(cai->context));

Modified: team/group/codec_bits/include/asterisk/translate.h
URL: http://svn.digium.com/view/asterisk/team/group/codec_bits/include/asterisk/translate.h?view=diff&rev=112119&r1=112118&r2=112119
==============================================================================
--- team/group/codec_bits/include/asterisk/translate.h (original)
+++ team/group/codec_bits/include/asterisk/translate.h Mon Mar 31 17:29:28 2008
@@ -196,12 +196,12 @@
 /*!
  * \brief Chooses the best translation path
  *
- * Given a list of sources, and a designed destination format, which should
+ * Given a list of sources, and a designated destination format, which should
  * I choose? 
  * \return Returns 0 on success, -1 if no path could be found.  
  * \note Modifies dests and srcs in place 
  */
-int ast_translator_best_choice(int *dsts, int *srcs);
+int ast_translator_best_choice(struct ast_extended_codec *dsts, struct ast_extended_codec *srcs);
 
 /*! 
  * \brief Builds a translator path




More information about the asterisk-commits mailing list