[asterisk-commits] rmudgett: trunk r353685 - in /trunk: addons/ apps/ channels/ include/asterisk...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 1 13:53:48 CST 2012


Author: rmudgett
Date: Wed Feb  1 13:53:38 2012
New Revision: 353685

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=353685
Log:
Constify some more channel driver technology callback parameters.

Review: https://reviewboard.asterisk.org/r/1707/

Modified:
    trunk/addons/chan_mobile.c
    trunk/addons/chan_ooh323.c
    trunk/apps/app_confbridge.c
    trunk/channels/chan_agent.c
    trunk/channels/chan_alsa.c
    trunk/channels/chan_bridge.c
    trunk/channels/chan_console.c
    trunk/channels/chan_dahdi.c
    trunk/channels/chan_gtalk.c
    trunk/channels/chan_h323.c
    trunk/channels/chan_iax2.c
    trunk/channels/chan_jingle.c
    trunk/channels/chan_local.c
    trunk/channels/chan_mgcp.c
    trunk/channels/chan_misdn.c
    trunk/channels/chan_multicast_rtp.c
    trunk/channels/chan_nbs.c
    trunk/channels/chan_oss.c
    trunk/channels/chan_phone.c
    trunk/channels/chan_sip.c
    trunk/channels/chan_skinny.c
    trunk/channels/chan_unistim.c
    trunk/channels/chan_usbradio.c
    trunk/channels/chan_vpb.cc
    trunk/channels/sig_analog.c
    trunk/channels/sig_analog.h
    trunk/channels/sig_pri.c
    trunk/channels/sig_pri.h
    trunk/channels/sig_ss7.c
    trunk/channels/sig_ss7.h
    trunk/include/asterisk/channel.h
    trunk/include/asterisk/pbx.h
    trunk/main/channel.c
    trunk/main/features.c
    trunk/main/manager.c
    trunk/main/pbx.c
    trunk/pbx/pbx_spool.c

Modified: trunk/addons/chan_mobile.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/chan_mobile.c?view=diff&rev=353685&r1=353684&r2=353685
==============================================================================
--- trunk/addons/chan_mobile.c (original)
+++ trunk/addons/chan_mobile.c Wed Feb  1 13:53:38 2012
@@ -198,15 +198,15 @@
 static struct ast_channel *mbl_new(int state, struct mbl_pvt *pvt, char *cid_num,
 		const struct ast_channel *requestor);
 static struct ast_channel *mbl_request(const char *type, struct ast_format_cap *cap,
-		const struct ast_channel *requestor, void *data, int *cause);
-static int mbl_call(struct ast_channel *ast, char *dest, int timeout);
+		const struct ast_channel *requestor, const char *data, int *cause);
+static int mbl_call(struct ast_channel *ast, const char *dest, int timeout);
 static int mbl_hangup(struct ast_channel *ast);
 static int mbl_answer(struct ast_channel *ast);
 static int mbl_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
 static struct ast_frame *mbl_read(struct ast_channel *ast);
 static int mbl_write(struct ast_channel *ast, struct ast_frame *frame);
 static int mbl_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
-static int mbl_devicestate(void *data);
+static int mbl_devicestate(const char *data);
 
 static void do_alignment_detection(struct mbl_pvt *pvt, char *buf, int buflen);
 
@@ -868,7 +868,7 @@
 }
 
 static struct ast_channel *mbl_request(const char *type, struct ast_format_cap *cap,
-		const struct ast_channel *requestor, void *data, int *cause)
+		const struct ast_channel *requestor, const char *data, int *cause)
 {
 
 	struct ast_channel *chn = NULL;
@@ -890,7 +890,7 @@
 		return NULL;
 	}
 
-	dest_dev = ast_strdupa((char *)data);
+	dest_dev = ast_strdupa(data);
 
 	dest_num = strchr(dest_dev, '/');
 	if (dest_num)
@@ -939,14 +939,13 @@
 
 }
 
-static int mbl_call(struct ast_channel *ast, char *dest, int timeout)
-{
-
+static int mbl_call(struct ast_channel *ast, const char *dest, int timeout)
+{
 	struct mbl_pvt *pvt;
-	char *dest_dev = NULL;
+	char *dest_dev;
 	char *dest_num = NULL;
 
-	dest_dev = ast_strdupa((char *)dest);
+	dest_dev = ast_strdupa(dest);
 
 	pvt = ast->tech_pvt;
 
@@ -1179,14 +1178,14 @@
 
 }
 
-static int mbl_devicestate(void *data)
+static int mbl_devicestate(const char *data)
 {
 
 	char *device;
 	int res = AST_DEVICE_INVALID;
 	struct mbl_pvt *pvt;
 
-	device = ast_strdupa(S_OR((char *) data, ""));
+	device = ast_strdupa(S_OR(data, ""));
 
 	ast_debug(1, "Checking device state for device %s\n", device);
 

Modified: trunk/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/chan_ooh323.c?view=diff&rev=353685&r1=353684&r2=353685
==============================================================================
--- trunk/addons/chan_ooh323.c (original)
+++ trunk/addons/chan_ooh323.c Wed Feb  1 13:53:38 2012
@@ -71,10 +71,10 @@
 
 /* Channel Definition */
 static struct ast_channel *ooh323_request(const char *type, struct ast_format_cap *cap,
-			const struct ast_channel *requestor,  void *data, int *cause);
+			const struct ast_channel *requestor,  const char *data, int *cause);
 static int ooh323_digit_begin(struct ast_channel *ast, char digit);
 static int ooh323_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
-static int ooh323_call(struct ast_channel *ast, char *dest, int timeout);
+static int ooh323_call(struct ast_channel *ast, const char *dest, int timeout);
 static int ooh323_hangup(struct ast_channel *ast);
 static int ooh323_answer(struct ast_channel *ast);
 static struct ast_frame *ooh323_read(struct ast_channel *ast);
@@ -561,7 +561,7 @@
 	Possible data values - peername, exten/peername, exten at ip
  */
 static struct ast_channel *ooh323_request(const char *type, struct ast_format_cap *cap,
-		const struct ast_channel *requestor, void *data, int *cause)
+		const struct ast_channel *requestor, const char *data, int *cause)
 
 {
 	struct ast_channel *chan = NULL;
@@ -574,7 +574,7 @@
 	int port = 0;
 
 	if (gH323Debug)
-		ast_verb(0, "---   ooh323_request - data %s format %s\n", (char*)data,  
+		ast_verb(0, "---   ooh323_request - data %s format %s\n", data,
 										ast_getformatname_multiple(formats,FORMAT_STRING_SIZE,cap));
 
 	if (!(ast_format_cap_has_type(cap, AST_FORMAT_TYPE_AUDIO))) {
@@ -585,7 +585,7 @@
 	p = ooh323_alloc(0,0); /* Initial callRef is zero */
 
 	if (!p) {
-		ast_log(LOG_WARNING, "Unable to build pvt data for '%s'\n", (char*)data);
+		ast_log(LOG_WARNING, "Unable to build pvt data for '%s'\n", data);
 		return NULL;
 	}
 	ast_mutex_lock(&p->lock);
@@ -917,7 +917,7 @@
 }
 
 
-static int ooh323_call(struct ast_channel *ast, char *dest, int timeout)
+static int ooh323_call(struct ast_channel *ast, const char *dest, int timeout)
 {
 	struct ooh323_pvt *p = ast->tech_pvt;
 	char destination[256];

Modified: trunk/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_confbridge.c?view=diff&rev=353685&r1=353684&r2=353685
==============================================================================
--- trunk/apps/app_confbridge.c (original)
+++ trunk/apps/app_confbridge.c Wed Feb  1 13:53:38 2012
@@ -358,7 +358,7 @@
 {
 	return 0;
 }
-static struct ast_channel *rec_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
+static struct ast_channel *rec_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
 static struct ast_channel_tech record_tech = {
 	.type = "ConfBridgeRec",
 	.description = "Conference Bridge Recording Channel",
@@ -366,7 +366,7 @@
 	.read = rec_read,
 	.write = rec_write,
 };
-static struct ast_channel *rec_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *rec_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
 {
 	struct ast_channel *tmp;
 	struct ast_format fmt;

Modified: trunk/channels/chan_agent.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_agent.c?view=diff&rev=353685&r1=353684&r2=353685
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Wed Feb  1 13:53:38 2012
@@ -330,11 +330,11 @@
 } while(0)
 
 /*--- Forward declarations */
-static struct ast_channel *agent_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
-static int agent_devicestate(void *data);
+static struct ast_channel *agent_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
+static int agent_devicestate(const char *data);
 static int agent_digit_begin(struct ast_channel *ast, char digit);
 static int agent_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
-static int agent_call(struct ast_channel *ast, char *dest, int timeout);
+static int agent_call(struct ast_channel *ast, const char *dest, int timeout);
 static int agent_hangup(struct ast_channel *ast);
 static int agent_answer(struct ast_channel *ast);
 static struct ast_frame *agent_read(struct ast_channel *ast);
@@ -772,7 +772,7 @@
 	return 0;
 }
 
-static int agent_call(struct ast_channel *ast, char *dest, int timeout)
+static int agent_call(struct ast_channel *ast, const char *dest, int timeout)
 {
 	struct agent_pvt *p = ast->tech_pvt;
 	int res = -1;
@@ -1353,11 +1353,11 @@
 }
 
 /*! \brief Part of the Asterisk PBX interface */
-static struct ast_channel *agent_request(const char *type, struct ast_format_cap *cap, const struct ast_channel* requestor, void *data, int *cause)
+static struct ast_channel *agent_request(const char *type, struct ast_format_cap *cap, const struct ast_channel* requestor, const char *data, int *cause)
 {
 	struct agent_pvt *p;
 	struct ast_channel *chan = NULL;
-	char *s;
+	const char *s;
 	ast_group_t groupmatch;
 	int groupoff;
 	int waitforagent=0;
@@ -2240,10 +2240,10 @@
 }
 
 /*! \brief Part of PBX channel interface */
-static int agent_devicestate(void *data)
+static int agent_devicestate(const char *data)
 {
 	struct agent_pvt *p;
-	char *s;
+	const char *s;
 	ast_group_t groupmatch;
 	int groupoff;
 	int res = AST_DEVICE_INVALID;

Modified: trunk/channels/chan_alsa.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_alsa.c?view=diff&rev=353685&r1=353684&r2=353685
==============================================================================
--- trunk/channels/chan_alsa.c (original)
+++ trunk/channels/chan_alsa.c Wed Feb  1 13:53:38 2012
@@ -135,13 +135,13 @@
 static int mute = 0;
 static int noaudiocapture = 0;
 
-static struct ast_channel *alsa_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
+static struct ast_channel *alsa_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
 static int alsa_digit(struct ast_channel *c, char digit, unsigned int duration);
 static int alsa_text(struct ast_channel *c, const char *text);
 static int alsa_hangup(struct ast_channel *c);
 static int alsa_answer(struct ast_channel *c);
 static struct ast_frame *alsa_read(struct ast_channel *chan);
-static int alsa_call(struct ast_channel *c, char *dest, int timeout);
+static int alsa_call(struct ast_channel *c, const char *dest, int timeout);
 static int alsa_write(struct ast_channel *chan, struct ast_frame *f);
 static int alsa_indicate(struct ast_channel *chan, int cond, const void *data, size_t datalen);
 static int alsa_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
@@ -313,7 +313,7 @@
 	}
 }
 
-static int alsa_call(struct ast_channel *c, char *dest, int timeout)
+static int alsa_call(struct ast_channel *c, const char *dest, int timeout)
 {
 	struct ast_frame f = { AST_FRAME_CONTROL };
 
@@ -597,7 +597,7 @@
 	return tmp;
 }
 
-static struct ast_channel *alsa_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *alsa_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
 {
 	struct ast_format tmpfmt;
 	char buf[256];

Modified: trunk/channels/chan_bridge.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_bridge.c?view=diff&rev=353685&r1=353684&r2=353685
==============================================================================
--- trunk/channels/chan_bridge.c (original)
+++ trunk/channels/chan_bridge.c Wed Feb  1 13:53:38 2012
@@ -51,8 +51,8 @@
 #include "asterisk/bridging.h"
 #include "asterisk/astobj2.h"
 
-static struct ast_channel *bridge_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
-static int bridge_call(struct ast_channel *ast, char *dest, int timeout);
+static struct ast_channel *bridge_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
+static int bridge_call(struct ast_channel *ast, const char *dest, int timeout);
 static int bridge_hangup(struct ast_channel *ast);
 static struct ast_frame *bridge_read(struct ast_channel *ast);
 static int bridge_write(struct ast_channel *ast, struct ast_frame *f);
@@ -116,7 +116,7 @@
 }
 
 /*! \brief Called when the channel should actually be dialed */
-static int bridge_call(struct ast_channel *ast, char *dest, int timeout)
+static int bridge_call(struct ast_channel *ast, const char *dest, int timeout)
 {
 	struct bridge_pvt *p = ast->tech_pvt;
 
@@ -155,7 +155,7 @@
 }
 
 /*! \brief Called when we want to place a call somewhere, but not actually call it... yet */
-static struct ast_channel *bridge_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *bridge_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
 {
 	struct bridge_pvt *p = NULL;
 	struct ast_format slin;

Modified: trunk/channels/chan_console.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_console.c?view=diff&rev=353685&r1=353684&r2=353685
==============================================================================
--- trunk/channels/chan_console.c (original)
+++ trunk/channels/chan_console.c Wed Feb  1 13:53:38 2012
@@ -186,14 +186,14 @@
 
 /*! Channel Technology Callbacks @{ */
 static struct ast_channel *console_request(const char *type, struct ast_format_cap *cap,
-	const struct ast_channel *requestor, void *data, int *cause);
+	const struct ast_channel *requestor, const char *data, int *cause);
 static int console_digit_begin(struct ast_channel *c, char digit);
 static int console_digit_end(struct ast_channel *c, char digit, unsigned int duration);
 static int console_text(struct ast_channel *c, const char *text);
 static int console_hangup(struct ast_channel *c);
 static int console_answer(struct ast_channel *c);
 static struct ast_frame *console_read(struct ast_channel *chan);
-static int console_call(struct ast_channel *c, char *dest, int timeout);
+static int console_call(struct ast_channel *c, const char *dest, int timeout);
 static int console_write(struct ast_channel *chan, struct ast_frame *f);
 static int console_indicate(struct ast_channel *chan, int cond, 
 	const void *data, size_t datalen);
@@ -444,14 +444,14 @@
 	return chan;
 }
 
-static struct ast_channel *console_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *console_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
 {
 	struct ast_channel *chan = NULL;
 	struct console_pvt *pvt;
 	char buf[512];
 
 	if (!(pvt = find_pvt(data))) {
-		ast_log(LOG_ERROR, "Console device '%s' not found\n", (char *) data);
+		ast_log(LOG_ERROR, "Console device '%s' not found\n", data);
 		return NULL;
 	}
 
@@ -554,7 +554,7 @@
 	return &ast_null_frame;
 }
 
-static int console_call(struct ast_channel *c, char *dest, int timeout)
+static int console_call(struct ast_channel *c, const char *dest, int timeout)
 {
 	struct console_pvt *pvt = c->tech_pvt;
 	enum ast_control_frame_type ctrl;

Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=353685&r1=353684&r2=353685
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Wed Feb  1 13:53:38 2012
@@ -1505,11 +1505,11 @@
 }
 
 
-static struct ast_channel *dahdi_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
+static struct ast_channel *dahdi_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
 static int dahdi_digit_begin(struct ast_channel *ast, char digit);
 static int dahdi_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
 static int dahdi_sendtext(struct ast_channel *c, const char *text);
-static int dahdi_call(struct ast_channel *ast, char *rdest, int timeout);
+static int dahdi_call(struct ast_channel *ast, const char *rdest, int timeout);
 static int dahdi_hangup(struct ast_channel *ast);
 static int dahdi_answer(struct ast_channel *ast);
 static struct ast_frame *dahdi_read(struct ast_channel *ast);
@@ -1521,7 +1521,7 @@
 static int dahdi_queryoption(struct ast_channel *chan, int option, void *data, int *datalen);
 static int dahdi_func_read(struct ast_channel *chan, const char *function, char *data, char *buf, size_t len);
 static int dahdi_func_write(struct ast_channel *chan, const char *function, char *data, const char *value);
-static int dahdi_devicestate(void *data);
+static int dahdi_devicestate(const char *data);
 static int dahdi_cc_callback(struct ast_channel *inbound, const char *dest, ast_cc_callback_fn callback);
 
 static struct ast_channel_tech dahdi_tech = {
@@ -5322,7 +5322,7 @@
 	return 0;
 }
 
-static int dahdi_call(struct ast_channel *ast, char *rdest, int timeout)
+static int dahdi_call(struct ast_channel *ast, const char *rdest, int timeout)
 {
 	struct dahdi_pvt *p = ast->tech_pvt;
 	int x, res, mysig;
@@ -13594,7 +13594,7 @@
 	return p;
 }
 
-static struct ast_channel *dahdi_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *dahdi_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
 {
 	int callwait = 0;
 	struct dahdi_pvt *p;
@@ -13666,7 +13666,7 @@
 #endif	/* defined(HAVE_PRI) || defined(HAVE_SS7) */
 				break;
 			default:
-				ast_log(LOG_WARNING, "Unknown option '%c' in '%s'\n", start.opt, (char *)data);
+				ast_log(LOG_WARNING, "Unknown option '%c' in '%s'\n", start.opt, data);
 				break;
 			}
 
@@ -13716,7 +13716,7 @@
 				}
 #endif	/* defined(HAVE_PRI) */
 			} else {
-				snprintf(p->dialstring, sizeof(p->dialstring), "DAHDI/%s", (char *) data);
+				snprintf(p->dialstring, sizeof(p->dialstring), "DAHDI/%s", data);
 			}
 			break;
 		}
@@ -13764,10 +13764,10 @@
  * \retval device_state enum ast_device_state value.
  * \retval AST_DEVICE_UNKNOWN if we could not determine the device's state.
  */
-static int dahdi_devicestate(void *data)
+static int dahdi_devicestate(const char *data)
 {
 #if defined(HAVE_PRI)
-	char *device;
+	const char *device;
 	unsigned span;
 	int res;
 

Modified: trunk/channels/chan_gtalk.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_gtalk.c?view=diff&rev=353685&r1=353684&r2=353685
==============================================================================
--- trunk/channels/chan_gtalk.c (original)
+++ trunk/channels/chan_gtalk.c Wed Feb  1 13:53:38 2012
@@ -175,12 +175,12 @@
 AST_MUTEX_DEFINE_STATIC(gtalklock); /*!< Protect the interface list (of gtalk_pvt's) */
 
 /* Forward declarations */
-static struct ast_channel *gtalk_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
+static struct ast_channel *gtalk_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
 /*static int gtalk_digit(struct ast_channel *ast, char digit, unsigned int duration);*/
 static int gtalk_sendtext(struct ast_channel *ast, const char *text);
 static int gtalk_digit_begin(struct ast_channel *ast, char digit);
 static int gtalk_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
-static int gtalk_call(struct ast_channel *ast, char *dest, int timeout);
+static int gtalk_call(struct ast_channel *ast, const char *dest, int timeout);
 static int gtalk_hangup(struct ast_channel *ast);
 static int gtalk_answer(struct ast_channel *ast);
 static int gtalk_action(struct gtalk *client, struct gtalk_pvt *p, const char *action);
@@ -1852,7 +1852,7 @@
 
 /*!\brief Initiate new call, part of PBX interface
  * dest is the dial string */
-static int gtalk_call(struct ast_channel *ast, char *dest, int timeout)
+static int gtalk_call(struct ast_channel *ast, const char *dest, int timeout)
 {
 	struct gtalk_pvt *p = ast->tech_pvt;
 
@@ -1897,7 +1897,7 @@
 }
 
 /*!\brief Part of PBX interface */
-static struct ast_channel *gtalk_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *gtalk_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
 {
 	struct gtalk_pvt *p = NULL;
 	struct gtalk *client = NULL;
@@ -1912,7 +1912,7 @@
 				to = strsep(&s, "/");
 			}
 			if (!to) {
-				ast_log(LOG_ERROR, "Bad arguments in Gtalk Dialstring: %s\n", (char*) data);
+				ast_log(LOG_ERROR, "Bad arguments in Gtalk Dialstring: %s\n", data);
 				return NULL;
 			}
 		}

Modified: trunk/channels/chan_h323.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_h323.c?view=diff&rev=353685&r1=353684&r2=353685
==============================================================================
--- trunk/channels/chan_h323.c (original)
+++ trunk/channels/chan_h323.c Wed Feb  1 13:53:38 2012
@@ -242,10 +242,10 @@
 static void delete_aliases(void);
 static void prune_peers(void);
 
-static struct ast_channel *oh323_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
+static struct ast_channel *oh323_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *dest, int *cause);
 static int oh323_digit_begin(struct ast_channel *c, char digit);
 static int oh323_digit_end(struct ast_channel *c, char digit, unsigned int duration);
-static int oh323_call(struct ast_channel *c, char *dest, int timeout);
+static int oh323_call(struct ast_channel *c, const char *dest, int timeout);
 static int oh323_hangup(struct ast_channel *c);
 static int oh323_answer(struct ast_channel *c);
 static struct ast_frame *oh323_read(struct ast_channel *c);
@@ -587,7 +587,7 @@
  * destination.
  * Returns -1 on error, 0 on success.
  */
-static int oh323_call(struct ast_channel *c, char *dest, int timeout)
+static int oh323_call(struct ast_channel *c, const char *dest, int timeout)
 {
 	int res = 0;
 	struct oh323_pvt *pvt = (struct oh323_pvt *)c->tech_pvt;
@@ -1787,21 +1787,20 @@
 		return 0;
 	}
 }
-static struct ast_channel *oh323_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *oh323_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *dest, int *cause)
 {
 	struct oh323_pvt *pvt;
 	struct ast_channel *tmpc = NULL;
-	char *dest = (char *)data;
 	char *ext, *host;
 	char *h323id = NULL;
 	char tmp[256], tmp1[256];
 
 	if (h323debug)
-		ast_debug(1, "type=%s, format=%s, data=%s.\n", type, ast_getformatname_multiple(tmp, sizeof(tmp), cap), (char *)data);
+		ast_debug(1, "type=%s, format=%s, data=%s.\n", type, ast_getformatname_multiple(tmp, sizeof(tmp), cap), dest);
 
 	pvt = oh323_alloc(0);
 	if (!pvt) {
-		ast_log(LOG_WARNING, "Unable to build pvt data for '%s'\n", (char *)data);
+		ast_log(LOG_WARNING, "Unable to build pvt data for '%s'\n", dest);
 		return NULL;
 	}
 	if (!(ast_format_cap_has_type(cap, AST_FORMAT_TYPE_AUDIO))) {

Modified: trunk/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=353685&r1=353684&r2=353685
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Wed Feb  1 13:53:38 2012
@@ -1167,8 +1167,8 @@
 static enum ast_bridge_result iax2_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags, struct ast_frame **fo, struct ast_channel **rc, int timeoutms);
 static int expire_registry(const void *data);
 static int iax2_answer(struct ast_channel *c);
-static int iax2_call(struct ast_channel *c, char *dest, int timeout);
-static int iax2_devicestate(void *data);
+static int iax2_call(struct ast_channel *c, const char *dest, int timeout);
+static int iax2_devicestate(const char *data);
 static int iax2_digit_begin(struct ast_channel *c, char digit);
 static int iax2_digit_end(struct ast_channel *c, char digit, unsigned int duration);
 static int iax2_do_register(struct iax2_registry *reg);
@@ -1193,7 +1193,7 @@
 static int send_command_immediate(struct chan_iax2_pvt *, char, int, unsigned int, const unsigned char *, int, int);
 static int send_command_locked(unsigned short callno, char, int, unsigned int, const unsigned char *, int, int);
 static int send_command_transfer(struct chan_iax2_pvt *, char, int, unsigned int, const unsigned char *, int);
-static struct ast_channel *iax2_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
+static struct ast_channel *iax2_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
 static struct ast_frame *iax2_read(struct ast_channel *c);
 static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, struct ast_variable *alt, int temponly);
 static struct iax2_user *build_user(const char *name, struct ast_variable *v, struct ast_variable *alt, int temponly);
@@ -5074,7 +5074,7 @@
 	}
 }
 
-static int iax2_call(struct ast_channel *c, char *dest, int timeout)
+static int iax2_call(struct ast_channel *c, const char *dest, int timeout)
 {
 	struct sockaddr_in sin;
 	char *l=NULL, *n=NULL, *tmpstr;
@@ -12168,7 +12168,7 @@
 	}
 }
 
-static struct ast_channel *iax2_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *iax2_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
 {
 	int callno;
 	int res;
@@ -12183,7 +12183,7 @@
 	parse_dial_string(tmpstr, &pds);
 
 	if (ast_strlen_zero(pds.peer)) {
-		ast_log(LOG_WARNING, "No peer provided in the IAX2 dial string '%s'\n", (char *) data);
+		ast_log(LOG_WARNING, "No peer provided in the IAX2 dial string '%s'\n", data);
 		return NULL;
 	}
 	memset(&cai, 0, sizeof(cai));
@@ -14055,7 +14055,7 @@
 }
 
 /*! \brief Part of the device state notification system ---*/
-static int iax2_devicestate(void *data)
+static int iax2_devicestate(const char *data)
 {
 	struct parsed_dial_string pds;
 	char *tmp = ast_strdupa(data);
@@ -14066,7 +14066,7 @@
 	parse_dial_string(tmp, &pds);
 
 	if (ast_strlen_zero(pds.peer)) {
-		ast_log(LOG_WARNING, "No peer provided in the IAX2 dial string '%s'\n", (char *) data);
+		ast_log(LOG_WARNING, "No peer provided in the IAX2 dial string '%s'\n", data);
 		return res;
 	}
 

Modified: trunk/channels/chan_jingle.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_jingle.c?view=diff&rev=353685&r1=353684&r2=353685
==============================================================================
--- trunk/channels/chan_jingle.c (original)
+++ trunk/channels/chan_jingle.c Wed Feb  1 13:53:38 2012
@@ -171,11 +171,11 @@
 AST_MUTEX_DEFINE_STATIC(jinglelock); /*!< Protect the interface list (of jingle_pvt's) */
 
 /* Forward declarations */
-static struct ast_channel *jingle_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
+static struct ast_channel *jingle_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
 static int jingle_sendtext(struct ast_channel *ast, const char *text);
 static int jingle_digit_begin(struct ast_channel *ast, char digit);
 static int jingle_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
-static int jingle_call(struct ast_channel *ast, char *dest, int timeout);
+static int jingle_call(struct ast_channel *ast, const char *dest, int timeout);
 static int jingle_hangup(struct ast_channel *ast);
 static int jingle_answer(struct ast_channel *ast);
 static int jingle_newcall(struct jingle *client, ikspak *pak);
@@ -1498,7 +1498,7 @@
 
 /*! \brief Initiate new call, part of PBX interface 
  * 	dest is the dial string */
-static int jingle_call(struct ast_channel *ast, char *dest, int timeout)
+static int jingle_call(struct ast_channel *ast, const char *dest, int timeout)
 {
 	struct jingle_pvt *p = ast->tech_pvt;
 
@@ -1542,7 +1542,7 @@
 }
 
 /*! \brief Part of PBX interface */
-static struct ast_channel *jingle_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *jingle_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
 {
 	struct jingle_pvt *p = NULL;
 	struct jingle *client = NULL;
@@ -1556,7 +1556,7 @@
 			if (sender && (sender[0] != '\0'))
 				to = strsep(&s, "/");
 			if (!to) {
-				ast_log(LOG_ERROR, "Bad arguments in Jingle Dialstring: %s\n", (char*) data);
+				ast_log(LOG_ERROR, "Bad arguments in Jingle Dialstring: %s\n", data);
 				return NULL;
 			}
 		}

Modified: trunk/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_local.c?view=diff&rev=353685&r1=353684&r2=353685
==============================================================================
--- trunk/channels/chan_local.c (original)
+++ trunk/channels/chan_local.c Wed Feb  1 13:53:38 2012
@@ -92,10 +92,10 @@
 	.target_extra = -1,
 };
 
-static struct ast_channel *local_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
+static struct ast_channel *local_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
 static int local_digit_begin(struct ast_channel *ast, char digit);
 static int local_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
-static int local_call(struct ast_channel *ast, char *dest, int timeout);
+static int local_call(struct ast_channel *ast, const char *dest, int timeout);
 static int local_hangup(struct ast_channel *ast);
 static int local_answer(struct ast_channel *ast);
 static struct ast_frame *local_read(struct ast_channel *ast);
@@ -104,7 +104,7 @@
 static int local_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
 static int local_sendhtml(struct ast_channel *ast, int subclass, const char *data, int datalen);
 static int local_sendtext(struct ast_channel *ast, const char *text);
-static int local_devicestate(void *data);
+static int local_devicestate(const char *data);
 static struct ast_channel *local_bridgedchannel(struct ast_channel *chan, struct ast_channel *bridge);
 static int local_queryoption(struct ast_channel *ast, int option, void *data, int *datalen);
 static int local_setoption(struct ast_channel *chan, int option, void *data, int datalen);
@@ -277,7 +277,7 @@
 }
 
 /*! \brief Adds devicestate to local channels */
-static int local_devicestate(void *data)
+static int local_devicestate(const char *data)
 {
 	char *exten = ast_strdupa(data);
 	char *context = NULL, *opts = NULL;
@@ -809,7 +809,7 @@
 
 /*! \brief Initiate new call, part of PBX interface
  *         dest is the dial string */
-static int local_call(struct ast_channel *ast, char *dest, int timeout)
+static int local_call(struct ast_channel *ast, const char *dest, int timeout)
 {
 	struct local_pvt *p = ast->tech_pvt;
 	int pvt_locked = 0;
@@ -1185,7 +1185,7 @@
 }
 
 /*! \brief Part of PBX interface */
-static struct ast_channel *local_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *local_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
 {
 	struct local_pvt *p = NULL;
 	struct ast_channel *chan = NULL;

Modified: trunk/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_mgcp.c?view=diff&rev=353685&r1=353684&r2=353685
==============================================================================
--- trunk/channels/chan_mgcp.c (original)
+++ trunk/channels/chan_mgcp.c Wed Feb  1 13:53:38 2012
@@ -441,8 +441,8 @@
 static char *mgcp_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
 static int reload_config(int reload);
 
-static struct ast_channel *mgcp_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
-static int mgcp_call(struct ast_channel *ast, char *dest, int timeout);
+static struct ast_channel *mgcp_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *dest, int *cause);
+static int mgcp_call(struct ast_channel *ast, const char *dest, int timeout);
 static int mgcp_hangup(struct ast_channel *ast);
 static int mgcp_answer(struct ast_channel *ast);
 static struct ast_frame *mgcp_read(struct ast_channel *ast);
@@ -451,7 +451,7 @@
 static int mgcp_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
 static int mgcp_senddigit_begin(struct ast_channel *ast, char digit);
 static int mgcp_senddigit_end(struct ast_channel *ast, char digit, unsigned int duration);
-static int mgcp_devicestate(void *data);
+static int mgcp_devicestate(const char *data);
 static void add_header_offhook(struct mgcp_subchannel *sub, struct mgcp_request *resp, char *tone);
 static int transmit_connect_with_sdp(struct mgcp_subchannel *sub, struct ast_rtp_instance *rtp);
 static struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v);
@@ -832,7 +832,7 @@
 	return res;
 }
 
-static int mgcp_call(struct ast_channel *ast, char *dest, int timeout)
+static int mgcp_call(struct ast_channel *ast, const char *dest, int timeout)
 {
 	int res;
 	struct mgcp_endpoint *p;
@@ -1357,7 +1357,7 @@
  *
  *  \return device status result (from devicestate.h) AST_DEVICE_INVALID (not available) or AST_DEVICE_UNKNOWN (available but unknown state)
  */
-static int mgcp_devicestate(void *data)
+static int mgcp_devicestate(const char *data)
 {
 	struct mgcp_gateway  *g;
 	struct mgcp_endpoint *e = NULL;
@@ -3920,12 +3920,11 @@
 	return 0;
 }
 
-static struct ast_channel *mgcp_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *mgcp_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *dest, int *cause)
 {
 	struct mgcp_subchannel *sub;
 	struct ast_channel *tmpc = NULL;
 	char tmp[256];
-	char *dest = data;
 
 	if (!(ast_format_cap_has_joint(cap, global_capability))) {
 		ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%s'\n", ast_getformatname_multiple(tmp, sizeof(tmp), cap));

Modified: trunk/channels/chan_misdn.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_misdn.c?view=diff&rev=353685&r1=353684&r2=353685
==============================================================================
--- trunk/channels/chan_misdn.c (original)
+++ trunk/channels/chan_misdn.c Wed Feb  1 13:53:38 2012
@@ -6484,7 +6484,7 @@
 /*** AST Indications Start ***/
 /*****************************/
 
-static int misdn_call(struct ast_channel *ast, char *dest, int timeout)
+static int misdn_call(struct ast_channel *ast, const char *dest, int timeout)
 {
 	int port = 0;
 	int r;
@@ -7772,7 +7772,7 @@
 	return cl;
 }
 
-static struct ast_channel *misdn_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *misdn_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
 {
 	struct ast_channel *ast;
 	char group[BUFFERSIZE + 1] = "";
@@ -7797,7 +7797,7 @@
 		AST_APP_ARG(opts);	/* options token */
 	);
 
-	snprintf(dial_str, sizeof(dial_str), "%s/%s", misdn_type, (char *) data);
+	snprintf(dial_str, sizeof(dial_str), "%s/%s", misdn_type, data);
 
 	/*
 	 * data is ---v

Modified: trunk/channels/chan_multicast_rtp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_multicast_rtp.c?view=diff&rev=353685&r1=353684&r2=353685
==============================================================================
--- trunk/channels/chan_multicast_rtp.c (original)
+++ trunk/channels/chan_multicast_rtp.c Wed Feb  1 13:53:38 2012
@@ -56,8 +56,8 @@
 static const char tdesc[] = "Multicast RTP Paging Channel Driver";
 
 /* Forward declarations */
-static struct ast_channel *multicast_rtp_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
-static int multicast_rtp_call(struct ast_channel *ast, char *dest, int timeout);
+static struct ast_channel *multicast_rtp_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
+static int multicast_rtp_call(struct ast_channel *ast, const char *dest, int timeout);
 static int multicast_rtp_hangup(struct ast_channel *ast);
 static struct ast_frame *multicast_rtp_read(struct ast_channel *ast);
 static int multicast_rtp_write(struct ast_channel *ast, struct ast_frame *f);
@@ -88,7 +88,7 @@
 }
 
 /*! \brief Function called when we should actually call the destination */
-static int multicast_rtp_call(struct ast_channel *ast, char *dest, int timeout)
+static int multicast_rtp_call(struct ast_channel *ast, const char *dest, int timeout)
 {
 	struct ast_rtp_instance *instance = ast->tech_pvt;
 
@@ -110,7 +110,7 @@
 }
 
 /*! \brief Function called when we should prepare to call the destination */
-static struct ast_channel *multicast_rtp_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *multicast_rtp_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
 {
 	char *tmp = ast_strdupa(data), *multicast_type = tmp, *destination, *control;
 	struct ast_rtp_instance *instance;

Modified: trunk/channels/chan_nbs.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_nbs.c?view=diff&rev=353685&r1=353684&r2=353685
==============================================================================
--- trunk/channels/chan_nbs.c (original)
+++ trunk/channels/chan_nbs.c Wed Feb  1 13:53:38 2012
@@ -67,8 +67,8 @@
 	struct ast_module_user *u;		/*! for holding a reference to this module */
 };
 
-static struct ast_channel *nbs_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
-static int nbs_call(struct ast_channel *ast, char *dest, int timeout);

[... 950 lines stripped ...]



More information about the asterisk-commits mailing list