summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-02-01 19:53:38 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-02-01 19:53:38 +0000
commit23bc964e1c45a7c614eb6d9dbfc4655e5bd9822e (patch)
treeb778c55c24af5f9feb9d4cc1b478197519d01974 /channels
parent797d633139a52a87736c04b71e31b1cb66e21e08 (diff)
Constify some more channel driver technology callback parameters.
Review: https://reviewboard.asterisk.org/r/1707/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_agent.c16
-rw-r--r--channels/chan_alsa.c8
-rw-r--r--channels/chan_bridge.c8
-rw-r--r--channels/chan_console.c10
-rw-r--r--channels/chan_dahdi.c18
-rw-r--r--channels/chan_gtalk.c10
-rw-r--r--channels/chan_h323.c13
-rw-r--r--channels/chan_iax2.c16
-rw-r--r--channels/chan_jingle.c10
-rw-r--r--channels/chan_local.c12
-rw-r--r--channels/chan_mgcp.c13
-rw-r--r--channels/chan_misdn.c6
-rw-r--r--channels/chan_multicast_rtp.c8
-rw-r--r--channels/chan_nbs.c10
-rw-r--r--channels/chan_oss.c10
-rw-r--r--channels/chan_phone.c12
-rw-r--r--channels/chan_sip.c14
-rw-r--r--channels/chan_skinny.c13
-rw-r--r--channels/chan_unistim.c9
-rw-r--r--channels/chan_usbradio.c14
-rw-r--r--channels/chan_vpb.cc12
-rw-r--r--channels/sig_analog.c2
-rw-r--r--channels/sig_analog.h2
-rw-r--r--channels/sig_pri.c2
-rw-r--r--channels/sig_pri.h2
-rw-r--r--channels/sig_ss7.c2
-rw-r--r--channels/sig_ss7.h2
27 files changed, 124 insertions, 130 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 3a9689511..733341fb9 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -330,11 +330,11 @@ static AST_LIST_HEAD_STATIC(agents, agent_pvt); /*!< Holds the list of agents (l
} 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 @@ static int agent_digit_end(struct ast_channel *ast, char digit, unsigned int dur
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 @@ static int check_beep(struct agent_pvt *newlyavailable, int needlock)
}
/*! \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 @@ static int agentmonitoroutgoing_exec(struct ast_channel *chan, const char *data)
}
/*! \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;
diff --git a/channels/chan_alsa.c b/channels/chan_alsa.c
index 4f06ba481..62d8e5227 100644
--- a/channels/chan_alsa.c
+++ b/channels/chan_alsa.c
@@ -135,13 +135,13 @@ static int autoanswer = 1;
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 void grab_owner(void)
}
}
-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 @@ static struct ast_channel *alsa_new(struct chan_alsa_pvt *p, int state, const ch
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];
diff --git a/channels/chan_bridge.c b/channels/chan_bridge.c
index dd37af608..c57f117a9 100644
--- a/channels/chan_bridge.c
+++ b/channels/chan_bridge.c
@@ -51,8 +51,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#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 @@ static int bridge_write(struct ast_channel *ast, struct ast_frame *f)
}
/*! \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 @@ static int bridge_hangup(struct ast_channel *ast)
}
/*! \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;
diff --git a/channels/chan_console.c b/channels/chan_console.c
index 68e34026f..9d2b17d44 100644
--- a/channels/chan_console.c
+++ b/channels/chan_console.c
@@ -186,14 +186,14 @@ static struct ast_jb_conf global_jbconf;
/*! 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 @@ static struct ast_channel *console_new(struct console_pvt *pvt, const char *ext,
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 @@ static struct ast_frame *console_read(struct ast_channel *chan)
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;
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 2380149ff..6cfa81d61 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -1505,11 +1505,11 @@ static struct dahdi_chan_conf dahdi_chan_conf_default(void)
}
-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_setoption(struct ast_channel *chan, int option, void *data, int
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 @@ static int dahdi_callwait(struct ast_channel *ast)
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 @@ static struct dahdi_pvt *determine_starting_point(const char *data, struct dahdi
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 @@ static struct ast_channel *dahdi_request(const char *type, struct ast_format_cap
#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 @@ static struct ast_channel *dahdi_request(const char *type, struct ast_format_cap
}
#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 @@ next:
* \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;
diff --git a/channels/chan_gtalk.c b/channels/chan_gtalk.c
index d9464d1a6..9c1034f11 100644
--- a/channels/chan_gtalk.c
+++ b/channels/chan_gtalk.c
@@ -175,12 +175,12 @@ static struct ast_format_cap *global_capability;
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 @@ static int gtalk_sendhtml(struct ast_channel *ast, int subclass, const char *dat
/*!\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 @@ static int gtalk_hangup(struct ast_channel *ast)
}
/*!\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 @@ static struct ast_channel *gtalk_request(const char *type, struct ast_format_cap
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;
}
}
diff --git a/channels/chan_h323.c b/channels/chan_h323.c
index ce4ce5741..9aaa85a20 100644
--- a/channels/chan_h323.c
+++ b/channels/chan_h323.c
@@ -242,10 +242,10 @@ static void delete_users(void);
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 @@ static int oh323_digit_end(struct ast_channel *c, char digit, unsigned int durat
* 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 @@ static int create_addr(struct oh323_pvt *pvt, char *opeer)
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))) {
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 9d442d5a0..7b9e4312f 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -1167,8 +1167,8 @@ static int maxnontrunkcall = 1;
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_final(struct chan_iax2_pvt *, char, int, unsigned int, c
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 void parse_dial_string(char *data, struct parsed_dial_string *pds)
}
}
-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 void free_context(struct iax2_context *con)
}
}
-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 @@ static struct ast_channel *iax2_request(const char *type, struct ast_format_cap
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 @@ static int acf_channel_read(struct ast_channel *chan, const char *funcname, char
}
/*! \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 @@ static int iax2_devicestate(void *data)
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;
}
diff --git a/channels/chan_jingle.c b/channels/chan_jingle.c
index af0bd6ad8..0278238d4 100644
--- a/channels/chan_jingle.c
+++ b/channels/chan_jingle.c
@@ -171,11 +171,11 @@ static struct ast_format_cap *global_capability;
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 @@ static int jingle_auto_congest(void *nothing)
/*! \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 @@ static int jingle_hangup(struct ast_channel *ast)
}
/*! \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 @@ static struct ast_channel *jingle_request(const char *type, struct ast_format_ca
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;
}
}
diff --git a/channels/chan_local.c b/channels/chan_local.c
index 4d9ba9d51..27caa3833 100644
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -92,10 +92,10 @@ static struct ast_jb_conf g_jb_conf = {
.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_indicate(struct ast_channel *ast, int condition, const void *da
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 @@ setoption_cleanup:
}
/*! \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 @@ static int local_sendhtml(struct ast_channel *ast, int subclass, const char *dat
/*! \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 @@ static struct ast_channel *local_new(struct local_pvt *p, int state, const char
}
/*! \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;
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index cdb4bf79f..3005ccb2d 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -441,8 +441,8 @@ static void dump_cmd_queues(struct mgcp_endpoint *p, struct mgcp_subchannel *sub
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_indicate(struct ast_channel *ast, int ind, const void *data, siz
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 @@ static int send_request(struct mgcp_endpoint *p, struct mgcp_subchannel *sub,
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 @@ static int mgcp_senddigit_end(struct ast_channel *ast, char digit, unsigned int
*
* \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 @@ static int restart_monitor(void)
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));
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index 579b3c2cf..db446a2c0 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -6484,7 +6484,7 @@ static void misdn_update_redirecting(struct ast_channel *ast, struct misdn_bchan
/*** 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 @@ static struct chan_list *chan_list_init(int orig)
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 @@ static struct ast_channel *misdn_request(const char *type, struct ast_format_cap
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
diff --git a/channels/chan_multicast_rtp.c b/channels/chan_multicast_rtp.c
index f1cabcef4..c635b1056 100644
--- a/channels/chan_multicast_rtp.c
+++ b/channels/chan_multicast_rtp.c
@@ -56,8 +56,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
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 @@ static int multicast_rtp_write(struct ast_channel *ast, struct ast_frame *f)
}
/*! \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 @@ static int multicast_rtp_hangup(struct ast_channel *ast)
}
/*! \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;
diff --git a/channels/chan_nbs.c b/channels/chan_nbs.c
index 95b41d4de..50a6397d3 100644
--- a/channels/chan_nbs.c
+++ b/channels/chan_nbs.c
@@ -67,8 +67,8 @@ struct nbs_pvt {
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);
+static struct ast_channel *nbs_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
+static int nbs_call(struct ast_channel *ast, const char *dest, int timeout);
static int nbs_hangup(struct ast_channel *ast);
static struct ast_frame *nbs_xread(struct ast_channel *ast);
static int nbs_xwrite(struct ast_channel *ast, struct ast_frame *frame);
@@ -83,7 +83,7 @@ static struct ast_channel_tech nbs_tech = {
.write = nbs_xwrite,
};
-static int nbs_call(struct ast_channel *ast, char *dest, int timeout)
+static int nbs_call(struct ast_channel *ast, const char *dest, int timeout)
{
struct nbs_pvt *p;
@@ -117,7 +117,7 @@ static void nbs_destroy(struct nbs_pvt *p)
ast_free(p);
}
-static struct nbs_pvt *nbs_alloc(void *data)
+static struct nbs_pvt *nbs_alloc(const char *data)
{
struct nbs_pvt *p;
int flags = 0;
@@ -251,7 +251,7 @@ static struct ast_channel *nbs_new(struct nbs_pvt *i, int state, const char *lin
}
-static struct ast_channel *nbs_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *nbs_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
{
struct nbs_pvt *p;
struct ast_channel *tmp = NULL;
diff --git a/channels/chan_oss.c b/channels/chan_oss.c
index bf044a420..7b75ac4ca 100644
--- a/channels/chan_oss.c
+++ b/channels/chan_oss.c
@@ -329,14 +329,14 @@ static struct chan_oss_pvt oss_default = {
static int setformat(struct chan_oss_pvt *o, int mode);
static struct ast_channel *oss_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor,
- void *data, int *cause);
+ const char *data, int *cause);
static int oss_digit_begin(struct ast_channel *c, char digit);
static int oss_digit_end(struct ast_channel *c, char digit, unsigned int duration);
static int oss_text(struct ast_channel *c, const char *text);
static int oss_hangup(struct ast_channel *c);
static int oss_answer(struct ast_channel *c);
static struct ast_frame *oss_read(struct ast_channel *chan);
-static int oss_call(struct ast_channel *c, char *dest, int timeout);
+static int oss_call(struct ast_channel *c, const char *dest, int timeout);
static int oss_write(struct ast_channel *chan, struct ast_frame *f);
static int oss_indicate(struct ast_channel *chan, int cond, const void *data, size_t datalen);
static int oss_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
@@ -590,7 +590,7 @@ static int oss_text(struct ast_channel *c, const char *text)
/*!
* \brief handler for incoming calls. Either autoanswer, or start ringing
*/
-static int oss_call(struct ast_channel *c, char *dest, int timeout)
+static int oss_call(struct ast_channel *c, const char *dest, int timeout)
{
struct chan_oss_pvt *o = c->tech_pvt;
struct ast_frame f = { AST_FRAME_CONTROL, };
@@ -834,7 +834,7 @@ static struct ast_channel *oss_new(struct chan_oss_pvt *o, char *ext, char *ctx,
return c;
}
-static struct ast_channel *oss_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *oss_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
{
struct ast_channel *c;
struct chan_oss_pvt *o;
@@ -849,7 +849,7 @@ static struct ast_channel *oss_request(const char *type, struct ast_format_cap *
AST_NONSTANDARD_APP_ARGS(args, parse, '/');
o = find_desc(args.name);
- ast_log(LOG_WARNING, "oss_request ty <%s> data 0x%p <%s>\n", type, data, (char *) data);
+ ast_log(LOG_WARNING, "oss_request ty <%s> data 0x%p <%s>\n", type, data, data);
if (o == NULL) {
ast_log(LOG_NOTICE, "Device %s not found\n", args.name);
/* XXX we could default to 'dsp' perhaps ? */
diff --git a/channels/chan_phone.c b/channels/chan_phone.c
index e8409941f..99dc01c5c 100644
--- a/channels/chan_phone.c
+++ b/channels/chan_phone.c
@@ -151,10 +151,10 @@ static struct phone_pvt {
static char cid_num[AST_MAX_EXTENSION];
static char cid_name[AST_MAX_EXTENSION];
-static struct ast_channel *phone_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
+static struct ast_channel *phone_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
static int phone_digit_begin(struct ast_channel *ast, char digit);
static int phone_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
-static int phone_call(struct ast_channel *ast, char *dest, int timeout);
+static int phone_call(struct ast_channel *ast, const char *dest, int timeout);
static int phone_hangup(struct ast_channel *ast);
static int phone_answer(struct ast_channel *ast);
static struct ast_frame *phone_read(struct ast_channel *ast);
@@ -284,7 +284,7 @@ static int phone_digit_end(struct ast_channel *ast, char digit, unsigned int dur
return 0;
}
-static int phone_call(struct ast_channel *ast, char *dest, int timeout)
+static int phone_call(struct ast_channel *ast, const char *dest, int timeout)
{
struct phone_pvt *p;
@@ -325,7 +325,7 @@ static int phone_call(struct ast_channel *ast, char *dest, int timeout)
return -1;
if (p->mode == MODE_FXS) {
- char *digit = strchr(dest, '/');
+ const char *digit = strchr(dest, '/');
if (digit)
{
digit++;
@@ -1231,11 +1231,11 @@ static struct phone_pvt *mkif(const char *iface, int mode, int txgain, int rxgai
return tmp;
}
-static struct ast_channel *phone_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *phone_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
{
struct phone_pvt *p;
struct ast_channel *tmp = NULL;
- char *name = data;
+ const char *name = data;
/* Search for an unowned channel */
if (ast_mutex_lock(&iflock)) {
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 698894f9f..7575e0d7c 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -1227,10 +1227,10 @@ static struct ast_config *notify_types = NULL; /*!< The list of manual NOTIFY
in coming releases. */
/*--- PBX interface functions */
-static struct ast_channel *sip_request_call(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
-static int sip_devicestate(void *data);
+static struct ast_channel *sip_request_call(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *dest, int *cause);
+static int sip_devicestate(const char *data);
static int sip_sendtext(struct ast_channel *ast, const char *text);
-static int sip_call(struct ast_channel *ast, char *dest, int timeout);
+static int sip_call(struct ast_channel *ast, const char *dest, int timeout);
static int sip_sendhtml(struct ast_channel *chan, int subclass, const char *data, int datalen);
static int sip_hangup(struct ast_channel *ast);
static int sip_answer(struct ast_channel *ast);
@@ -1373,7 +1373,6 @@ static int do_magic_pickup(struct ast_channel *channel, const char *extension, c
/*--- Device monitoring and Device/extension state/event handling */
static int cb_extensionstate(const char *context, const char *exten, enum ast_extension_states state, void *data);
-static int sip_devicestate(void *data);
static int sip_poke_noanswer(const void *data);
static int sip_poke_peer(struct sip_peer *peer, int force);
static void sip_poke_all_peers(void);
@@ -5568,7 +5567,7 @@ static int auto_congest(const void *arg)
/*! \brief Initiate SIP call from PBX
* used from the dial() application */
-static int sip_call(struct ast_channel *ast, char *dest, int timeout)
+static int sip_call(struct ast_channel *ast, const char *dest, int timeout)
{
int res;
struct sip_pvt *p = ast->tech_pvt; /* chan is locked, so the reference cannot go away */
@@ -27304,7 +27303,7 @@ static int sip_poke_peer(struct sip_peer *peer, int force)
!= AST_DEVICE_NOT_INUSE and != AST_DEVICE_UNKNOWN
*/
-static int sip_devicestate(void *data)
+static int sip_devicestate(const char *data)
{
char *host;
char *tmp;
@@ -27383,14 +27382,13 @@ static int sip_devicestate(void *data)
* or SIP/host!dnid
* \endverbatim
*/
-static struct ast_channel *sip_request_call(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *sip_request_call(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *dest, int *cause)
{
struct sip_pvt *p;
struct ast_channel *tmpc = NULL;
char *ext = NULL, *host;
char tmp[256];
char tmp2[256];
- char *dest = data;
char *dnid;
char *secret = NULL;
char *md5secret = NULL;
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index 5fa323620..274af25ce 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -1469,11 +1469,11 @@ struct skinnysession {
AST_LIST_ENTRY(skinnysession) list;
};
-static struct ast_channel *skinny_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
+static struct ast_channel *skinny_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *dest, int *cause);
static AST_LIST_HEAD_STATIC(sessions, skinnysession);
-static int skinny_devicestate(void *data);
-static int skinny_call(struct ast_channel *ast, char *dest, int timeout);
+static int skinny_devicestate(const char *data);
+static int skinny_call(struct ast_channel *ast, const char *dest, int timeout);
static int skinny_hangup(struct ast_channel *ast);
static int skinny_answer(struct ast_channel *ast);
static struct ast_frame *skinny_read(struct ast_channel *ast);
@@ -4362,7 +4362,7 @@ static int skinny_autoanswer_cb(const void *data)
return 0;
}
-static int skinny_call(struct ast_channel *ast, char *dest, int timeout)
+static int skinny_call(struct ast_channel *ast, const char *dest, int timeout)
{
int res = 0;
struct skinny_subchannel *sub = ast->tech_pvt;
@@ -7060,7 +7060,7 @@ static void *accept_thread(void *ignore)
return 0;
}
-static int skinny_devicestate(void *data)
+static int skinny_devicestate(const char *data)
{
struct skinny_line *l;
char *tmp;
@@ -7072,13 +7072,12 @@ static int skinny_devicestate(void *data)
return get_devicestate(l);
}
-static struct ast_channel *skinny_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *skinny_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *dest, int *cause)
{
struct skinny_line *l;
struct skinny_subline *subline = NULL;
struct ast_channel *tmpc = NULL;
char tmp[256];
- char *dest = data;
if (!(ast_format_cap_has_type(cap, AST_FORMAT_TYPE_AUDIO))) {
ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%s'\n", ast_getformatname_multiple(tmp, sizeof(tmp), cap));
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
index d303f078b..563d1f143 100644
--- a/channels/chan_unistim.c
+++ b/channels/chan_unistim.c
@@ -686,8 +686,8 @@ static int unload_module(void);
static int reload_config(void);
static void show_main_page(struct unistimsession *pte);
static struct ast_channel *unistim_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor,
- void *data, int *cause);
-static int unistim_call(struct ast_channel *ast, char *dest, int timeout);
+ const char *dest, int *cause);
+static int unistim_call(struct ast_channel *ast, const char *dest, int timeout);
static int unistim_hangup(struct ast_channel *ast);
static int unistim_answer(struct ast_channel *ast);
static struct ast_frame *unistim_read(struct ast_channel *ast);
@@ -3744,7 +3744,7 @@ static struct unistimsession *channel_to_session(struct ast_channel *ast)
/*--- unistim_call: Initiate UNISTIM call from PBX ---*/
/* used from the dial() application */
-static int unistim_call(struct ast_channel *ast, char *dest, int timeout)
+static int unistim_call(struct ast_channel *ast, const char *dest, int timeout)
{
int res = 0;
struct unistim_subchannel *sub;
@@ -4740,14 +4740,13 @@ static int restart_monitor(void)
/*--- unistim_request: PBX interface function ---*/
/* UNISTIM calls initiated by the PBX arrive here */
-static struct ast_channel *unistim_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data,
+static struct ast_channel *unistim_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *dest,
int *cause)
{
struct unistim_subchannel *sub;
struct ast_channel *tmpc = NULL;
char tmp[256];
char tmp2[256];
- char *dest = data;
if (!(ast_format_cap_has_joint(cap, global_cap))) {
ast_log(LOG_NOTICE,
diff --git a/channels/chan_usbradio.c b/channels/chan_usbradio.c
index 8afc3fd88..3edba81de 100644
--- a/channels/chan_usbradio.c
+++ b/channels/chan_usbradio.c
@@ -667,14 +667,14 @@ static int setformat(struct chan_usbradio_pvt *o, int mode);
static struct ast_channel *usbradio_request(const char *type, struct ast_format_cap *cap,
const struct ast_channel *requestor,
- void *data, int *cause);
+ const char *data, int *cause);
static int usbradio_digit_begin(struct ast_channel *c, char digit);
static int usbradio_digit_end(struct ast_channel *c, char digit, unsigned int duration);
static int usbradio_text(struct ast_channel *c, const char *text);
static int usbradio_hangup(struct ast_channel *c);
static int usbradio_answer(struct ast_channel *c);
static struct ast_frame *usbradio_read(struct ast_channel *chan);
-static int usbradio_call(struct ast_channel *c, char *dest, int timeout);
+static int usbradio_call(struct ast_channel *c, const char *dest, int timeout);
static int usbradio_write(struct ast_channel *chan, struct ast_frame *f);
static int usbradio_indicate(struct ast_channel *chan, int cond, const void *data, size_t datalen);
static int usbradio_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
@@ -1253,7 +1253,7 @@ static void *hidthread(void *arg)
/*
* returns a pointer to the descriptor with the given name
*/
-static struct chan_usbradio_pvt *find_desc(char *dev)
+static struct chan_usbradio_pvt *find_desc(const char *dev)
{
struct chan_usbradio_pvt *o = NULL;
@@ -1683,7 +1683,7 @@ static void ring(struct chan_usbradio_pvt *o, int x)
/*
* handler for incoming calls. Either autoanswer, or start ringing
*/
-static int usbradio_call(struct ast_channel *c, char *dest, int timeout)
+static int usbradio_call(struct ast_channel *c, const char *dest, int timeout)
{
struct chan_usbradio_pvt *o = c->tech_pvt;
@@ -2217,7 +2217,7 @@ static struct ast_channel *usbradio_new(struct chan_usbradio_pvt *o, char *ext,
}
/*
*/
-static struct ast_channel *usbradio_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *usbradio_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
{
struct ast_channel *c;
struct chan_usbradio_pvt *o = find_desc(data);
@@ -2226,10 +2226,10 @@ static struct ast_channel *usbradio_request(const char *type, struct ast_format_
if (0)
{
- ast_log(LOG_WARNING, "usbradio_request type <%s> data 0x%p <%s>\n", type, data, (char *) data);
+ ast_log(LOG_WARNING, "usbradio_request type <%s> data 0x%p <%s>\n", type, data, data);
}
if (o == NULL) {
- ast_log(LOG_NOTICE, "Device %s not found\n", (char *) data);
+ ast_log(LOG_NOTICE, "Device %s not found\n", data);
/* XXX we could default to 'dsp' perhaps ? */
return NULL;
}
diff --git a/channels/chan_vpb.cc b/channels/chan_vpb.cc
index 312730d78..cd9d4344b 100644
--- a/channels/chan_vpb.cc
+++ b/channels/chan_vpb.cc
@@ -331,10 +331,10 @@ static struct vpb_pvt {
static struct ast_channel *vpb_new(struct vpb_pvt *i, enum ast_channel_state state, const char *context, const char *linkedid);
static void *do_chanreads(void *pvt);
-static struct ast_channel *vpb_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
+static struct ast_channel *vpb_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
static int vpb_digit_begin(struct ast_channel *ast, char digit);
static int vpb_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
-static int vpb_call(struct ast_channel *ast, char *dest, int timeout);
+static int vpb_call(struct ast_channel *ast, const char *dest, int timeout);
static int vpb_hangup(struct ast_channel *ast);
static int vpb_answer(struct ast_channel *ast);
static struct ast_frame *vpb_read(struct ast_channel *ast);
@@ -1787,11 +1787,11 @@ static int vpb_digit_end(struct ast_channel *ast, char digit, unsigned int durat
}
/* Places a call out of a VPB channel */
-static int vpb_call(struct ast_channel *ast, char *dest, int timeout)
+static int vpb_call(struct ast_channel *ast, const char *dest, int timeout)
{
struct vpb_pvt *p = (struct vpb_pvt *)ast->tech_pvt;
int res = 0, i;
- char *s = strrchr(dest, '/');
+ const char *s = strrchr(dest, '/');
char dialstring[254] = "";
/*
@@ -2505,11 +2505,11 @@ static struct ast_channel *vpb_new(struct vpb_pvt *me, enum ast_channel_state st
return tmp;
}
-static struct ast_channel *vpb_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *vdata, int *cause)
+static struct ast_channel *vpb_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
{
struct vpb_pvt *p;
struct ast_channel *tmp = NULL;
- char *sepstr, *data = (char *)vdata, *name;
+ char *sepstr, *name;
const char *s;
int group = -1;
struct ast_format slin;
diff --git a/channels/sig_analog.c b/channels/sig_analog.c
index a3457b7a7..67ed6944c 100644
--- a/channels/sig_analog.c
+++ b/channels/sig_analog.c
@@ -1002,7 +1002,7 @@ static void analog_set_inthreeway(struct analog_pvt *p, enum analog_sub sub, int
}
}
-int analog_call(struct analog_pvt *p, struct ast_channel *ast, char *rdest, int timeout)
+int analog_call(struct analog_pvt *p, struct ast_channel *ast, const char *rdest, int timeout)
{
int res, idx, mysig;
char *c, *n, *l;
diff --git a/channels/sig_analog.h b/channels/sig_analog.h
index fd19b5352..9412f8ad3 100644
--- a/channels/sig_analog.h
+++ b/channels/sig_analog.h
@@ -351,7 +351,7 @@ void analog_delete(struct analog_pvt *doomed);
void analog_free(struct analog_pvt *p);
-int analog_call(struct analog_pvt *p, struct ast_channel *ast, char *rdest, int timeout);
+int analog_call(struct analog_pvt *p, struct ast_channel *ast, const char *rdest, int timeout);
int analog_hangup(struct analog_pvt *p, struct ast_channel *ast);
diff --git a/channels/sig_pri.c b/channels/sig_pri.c
index f9e658175..c9c96be55 100644
--- a/channels/sig_pri.c
+++ b/channels/sig_pri.c
@@ -7367,7 +7367,7 @@ AST_APP_OPTIONS(sig_pri_call_opts, BEGIN_OPTIONS
END_OPTIONS);
/*! \note Parsing must remain in sync with sig_pri_extract_called_num_subaddr(). */
-int sig_pri_call(struct sig_pri_chan *p, struct ast_channel *ast, char *rdest, int timeout, int layer1)
+int sig_pri_call(struct sig_pri_chan *p, struct ast_channel *ast, const char *rdest, int timeout, int layer1)
{
char dest[256]; /* must be same length as p->dialdest */
struct ast_party_subaddress dialed_subaddress; /* Called subaddress */
diff --git a/channels/sig_pri.h b/channels/sig_pri.h
index 6700a06fd..e10e4c7c3 100644
--- a/channels/sig_pri.h
+++ b/channels/sig_pri.h
@@ -589,7 +589,7 @@ struct sig_pri_span {
};
void sig_pri_extract_called_num_subaddr(struct sig_pri_chan *p, const char *rdest, char *called, size_t called_buff_size);
-int sig_pri_call(struct sig_pri_chan *p, struct ast_channel *ast, char *rdest, int timeout, int layer1);
+int sig_pri_call(struct sig_pri_chan *p, struct ast_channel *ast, const char *rdest, int timeout, int layer1);
int sig_pri_hangup(struct sig_pri_chan *p, struct ast_channel *ast);
diff --git a/channels/sig_ss7.c b/channels/sig_ss7.c
index a94188071..12cc2806c 100644
--- a/channels/sig_ss7.c
+++ b/channels/sig_ss7.c
@@ -1407,7 +1407,7 @@ static unsigned char cid_pres2ss7screen(int cid_pres)
* \retval 0 on success.
* \retval -1 on error.
*/
-int sig_ss7_call(struct sig_ss7_chan *p, struct ast_channel *ast, char *rdest)
+int sig_ss7_call(struct sig_ss7_chan *p, struct ast_channel *ast, const char *rdest)
{
char ss7_called_nai;
int called_nai_strip;
diff --git a/channels/sig_ss7.h b/channels/sig_ss7.h
index 14a998010..63ee5dee8 100644
--- a/channels/sig_ss7.h
+++ b/channels/sig_ss7.h
@@ -282,7 +282,7 @@ void sig_ss7_link_noalarm(struct sig_ss7_linkset *linkset, int which);
int sig_ss7_add_sigchan(struct sig_ss7_linkset *linkset, int which, int ss7type, int transport, int inalarm, int networkindicator, int pointcode, int adjpointcode);
int sig_ss7_available(struct sig_ss7_chan *p);
-int sig_ss7_call(struct sig_ss7_chan *p, struct ast_channel *ast, char *rdest);
+int sig_ss7_call(struct sig_ss7_chan *p, struct ast_channel *ast, const char *rdest);
int sig_ss7_hangup(struct sig_ss7_chan *p, struct ast_channel *ast);
int sig_ss7_answer(struct sig_ss7_chan *p, struct ast_channel *ast);
void sig_ss7_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, struct sig_ss7_chan *pchan);