[asterisk-commits] seanbright: branch 1.8 r302412 - /branches/1.8/channels/chan_local.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 19 09:31:47 CST 2011


Author: seanbright
Date: Wed Jan 19 09:31:39 2011
New Revision: 302412

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=302412
Log:
Use appropriate type for requested format in chan_local.

We were passing and storing the requested format as an int instead of format_t
resulting in truncation.

(closes issue #18238)
Reported by: whizemen
Patches:
      0018238_speex16.patch uploaded by whizemen (license 1143)

Modified:
    branches/1.8/channels/chan_local.c

Modified: branches/1.8/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_local.c?view=diff&rev=302412&r1=302411&r2=302412
==============================================================================
--- branches/1.8/channels/chan_local.c (original)
+++ branches/1.8/channels/chan_local.c Wed Jan 19 09:31:39 2011
@@ -141,7 +141,7 @@
 	unsigned int flags;                     /*!< Private flags */
 	char context[AST_MAX_CONTEXT];		/*!< Context to call */
 	char exten[AST_MAX_EXTENSION];		/*!< Extension to call */
-	int reqformat;				/*!< Requested format */
+	format_t reqformat;				/*!< Requested format */
 	struct ast_jb_conf jb_conf;		/*!< jitterbuffer configuration for this local channel */
 	struct ast_channel *owner;		/*!< Master Channel - Bridging happens here */
 	struct ast_channel *chan;		/*!< Outbound channel - PBX is run here */
@@ -955,7 +955,7 @@
 }
 
 /*! \brief Create a call structure */
-static struct local_pvt *local_alloc(const char *data, int format)
+static struct local_pvt *local_alloc(const char *data, format_t format)
 {
 	struct local_pvt *tmp = NULL;
 	char *c = NULL, *opts = NULL;




More information about the asterisk-commits mailing list