summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/app_directory.c4
-rw-r--r--apps/app_minivm.c6
-rw-r--r--apps/app_playback.c2
-rw-r--r--apps/app_queue.c7
-rw-r--r--apps/app_voicemail.c6
5 files changed, 13 insertions, 12 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c
index 05460c409..010899d37 100644
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -277,8 +277,8 @@ static char *convert(const char *lastname)
* '1' for selected entry from directory
* '*' for skipped entry from directory
*/
-static int play_mailbox_owner(struct ast_channel *chan, char *context,
- char *dialcontext, char *ext, char *name, int readext,
+static int play_mailbox_owner(struct ast_channel *chan, const char *context,
+ const char *dialcontext, const char *ext, const char *name, int readext,
int fromappvm)
{
int res = 0;
diff --git a/apps/app_minivm.c b/apps/app_minivm.c
index 6e7a29bd2..1bca5a333 100644
--- a/apps/app_minivm.c
+++ b/apps/app_minivm.c
@@ -458,7 +458,7 @@ static double global_volgain; /*!< Volume gain for voicmemail via e-mail */
#define DEFAULT_CHARSET "ISO-8859-1"
/* Forward declarations */
-static char *message_template_parse_filebody(char *filename);
+static char *message_template_parse_filebody(const char *filename);
static char *message_template_parse_emailbody(const char *body);
static int create_vmaccount(char *name, struct ast_variable *var, int realtime);
static struct minivm_account *find_user_realtime(const char *domain, const char *username);
@@ -2182,7 +2182,7 @@ static void timezone_destroy_list(void)
}
/*! \brief Add time zone to memory list */
-static int timezone_add(char *zonename, char *config)
+static int timezone_add(const char *zonename, const char *config)
{
struct minivm_zone *newzone;
@@ -2220,7 +2220,7 @@ static int timezone_add(char *zonename, char *config)
}
/*! \brief Read message template from file */
-static char *message_template_parse_filebody(char *filename) {
+static char *message_template_parse_filebody(const char *filename) {
char buf[BUFSIZ * 6];
char readbuf[BUFSIZ];
char filenamebuf[BUFSIZ];
diff --git a/apps/app_playback.c b/apps/app_playback.c
index 5e88a1deb..ea091a9d1 100644
--- a/apps/app_playback.c
+++ b/apps/app_playback.c
@@ -325,7 +325,7 @@ static int say_datetime(struct ast_channel *chan, time_t t, const char *ints, co
/*
* remap the 'say' functions to use those in this file
*/
-static int say_init_mode(char *mode) {
+static int say_init_mode(const char *mode) {
if (!strcmp(mode, say_new)) {
if (say_cfg == NULL) {
ast_log(LOG_ERROR, "There is no say.conf file to use new mode\n");
diff --git a/apps/app_queue.c b/apps/app_queue.c
index f8798b065..42328541b 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1242,7 +1242,8 @@ static struct call_queue *find_queue_by_name_rt(const char *queuename, struct as
struct member *m;
struct ao2_iterator mem_iter;
char *interface = NULL;
- char *tmp, *tmp_name;
+ const char *tmp_name;
+ char *tmp;
char tmpbuf[64]; /* Must be longer than the longest queue param name. */
/* Static queues override realtime. */
@@ -1300,7 +1301,7 @@ static struct call_queue *find_queue_by_name_rt(const char *queuename, struct as
if ((tmp = strchr(v->name, '_'))) {
ast_copy_string(tmpbuf, v->name, sizeof(tmpbuf));
tmp_name = tmpbuf;
- tmp = tmp_name;
+ tmp = tmpbuf;
while ((tmp = strchr(tmp, '_')))
*tmp++ = '-';
} else
@@ -2664,7 +2665,7 @@ static void send_agent_complete(const struct queue_ent *qe, const char *queuenam
const struct ast_channel *peer, const struct member *member, time_t callstart,
char *vars, size_t vars_len, enum agent_complete_reason rsn)
{
- const char *reason;
+ const char *reason = NULL; /* silence dumb compilers */
if (!qe->parent->eventwhencalled)
return;
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 9b7787b3b..91b7409be 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1652,7 +1652,7 @@ static void copy_file(char *frompath, char *topath)
{
char frompath2[PATH_MAX], topath2[PATH_MAX];
struct ast_variable *tmp,*var = NULL;
- char *origmailbox = NULL, *context = NULL, *macrocontext = NULL, *exten = NULL, *priority = NULL, *callerchan = NULL, *callerid = NULL, *origdate = NULL, *origtime = NULL, *category = NULL, *duration = NULL;
+ const char *origmailbox = NULL, *context = NULL, *macrocontext = NULL, *exten = NULL, *priority = NULL, *callerchan = NULL, *callerid = NULL, *origdate = NULL, *origtime = NULL, *category = NULL, *duration = NULL;
ast_filecopy(frompath, topath, NULL);
snprintf(frompath2, sizeof(frompath2), "%s.txt", frompath);
snprintf(topath2, sizeof(topath2), "%s.txt", topath);
@@ -7400,7 +7400,7 @@ static int vm_exec(struct ast_channel *chan, void *data)
return res;
}
-static struct ast_vm_user *find_or_create(char *context, char *mbox)
+static struct ast_vm_user *find_or_create(const char *context, const char *mbox)
{
struct ast_vm_user *vmu;
@@ -7425,7 +7425,7 @@ static struct ast_vm_user *find_or_create(char *context, char *mbox)
return vmu;
}
-static int append_mailbox(char *context, char *mbox, char *data)
+static int append_mailbox(const char *context, const char *mbox, const char *data)
{
/* Assumes lock is already held */
char *tmp;