diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2007-01-05 22:43:18 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2007-01-05 22:43:18 +0000 |
commit | 87b9abc892ff976733026d90e637cb243bc8d358 (patch) | |
tree | 19f29aed9ad9813da3843062a7089d28de6108d4 /apps | |
parent | a9c3429b07b9db7be2df683660a745653bb05906 (diff) |
Merged revisions 49676 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r49676 | kpfleming | 2007-01-05 16:16:33 -0600 (Fri, 05 Jan 2007) | 2 lines
reduce stack consumption for AMI and AMI/HTTP requests by nearly 20K in most cases
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_meetme.c | 10 | ||||
-rw-r--r-- | apps/app_queue.c | 52 | ||||
-rw-r--r-- | apps/app_senddtmf.c | 6 |
3 files changed, 34 insertions, 34 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c index f719f8e74..f315b2cb3 100644 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -2773,12 +2773,12 @@ static int admin_exec(struct ast_channel *chan, void *data) { return 0; } -static int meetmemute(struct mansession *s, struct message *m, int mute) +static int meetmemute(struct mansession *s, const struct message *m, int mute) { struct ast_conference *conf; struct ast_conf_user *user; - char *confid = astman_get_header(m, "Meetme"); - char *userid = astman_get_header(m, "Usernum"); + const char *confid = astman_get_header(m, "Meetme"); + char *userid = ast_strdupa(astman_get_header(m, "Usernum")); int userno; if (ast_strlen_zero(confid)) { @@ -2834,12 +2834,12 @@ static int meetmemute(struct mansession *s, struct message *m, int mute) return 0; } -static int action_meetmemute(struct mansession *s, struct message *m) +static int action_meetmemute(struct mansession *s, const struct message *m) { return meetmemute(s, m, 1); } -static int action_meetmeunmute(struct mansession *s, struct message *m) +static int action_meetmeunmute(struct mansession *s, const struct message *m) { return meetmemute(s, m, 0); } diff --git a/apps/app_queue.c b/apps/app_queue.c index 280a0f3ca..da4ec749e 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -408,7 +408,7 @@ struct call_queue { static AST_LIST_HEAD_STATIC(queues, call_queue); -static int set_member_paused(char *queuename, char *interface, int paused); +static int set_member_paused(const char *queuename, const char *interface, int paused); static void set_queue_result(struct ast_channel *chan, enum queue_result res) { @@ -635,7 +635,7 @@ static int statechange_queue(const char *dev, int state, void *ign) return 0; } -static struct member *create_queue_member(char *interface, const char *membername, int penalty, int paused) +static struct member *create_queue_member(const char *interface, const char *membername, int penalty, int paused) { struct member *cur; @@ -711,7 +711,7 @@ static void clear_queue(struct call_queue *q) q->wrapuptime = 0; } -static int add_to_interfaces(char *interface) +static int add_to_interfaces(const char *interface) { struct member_interface *curint; @@ -738,7 +738,7 @@ static int add_to_interfaces(char *interface) return 0; } -static int interface_exists_global(char *interface) +static int interface_exists_global(const char *interface) { struct call_queue *q; struct member *mem; @@ -760,7 +760,7 @@ static int interface_exists_global(char *interface) return ret; } -static int remove_from_interfaces(char *interface) +static int remove_from_interfaces(const char *interface) { struct member_interface *curint; @@ -1133,7 +1133,7 @@ static struct call_queue *find_queue_by_name_rt(const char *queuename, struct as return q; } -static struct call_queue *load_realtime_queue(char *queuename) +static struct call_queue *load_realtime_queue(const char *queuename) { struct ast_variable *queue_vars; struct ast_config *member_config = NULL; @@ -2781,7 +2781,7 @@ static int wait_a_bit(struct queue_ent *qe) return ast_waitfordigit(qe->chan, retrywait); } -static struct member *interface_exists(struct call_queue *q, char *interface) +static struct member *interface_exists(struct call_queue *q, const char *interface) { struct member *mem; @@ -2836,7 +2836,7 @@ static void dump_queue_members(struct call_queue *pm_queue) ast_db_del(pm_family, pm_queue->name); } -static int remove_from_queue(char *queuename, char *interface) +static int remove_from_queue(const char *queuename, const char *interface) { struct call_queue *q; struct member *last_member, *look; @@ -2890,7 +2890,7 @@ static int remove_from_queue(char *queuename, char *interface) } -static int add_to_queue(char *queuename, char *interface, char *membername, int penalty, int paused, int dump) +static int add_to_queue(const char *queuename, const char *interface, const char *membername, int penalty, int paused, int dump) { struct call_queue *q; struct member *new_member; @@ -2941,7 +2941,7 @@ static int add_to_queue(char *queuename, char *interface, char *membername, int return res; } -static int set_member_paused(char *queuename, char *interface, int paused) +static int set_member_paused(const char *queuename, const char *interface, int paused) { int found = 0; struct call_queue *q; @@ -4162,7 +4162,7 @@ static char *complete_queue(const char *line, const char *word, int pos, int sta /*!\brief callback to display queues status in manager \addtogroup Group_AMI */ -static int manager_queues_show( struct mansession *s, struct message *m ) +static int manager_queues_show(struct mansession *s, const struct message *m) { char *a[] = { "queue", "show" }; @@ -4173,14 +4173,14 @@ static int manager_queues_show( struct mansession *s, struct message *m ) } /* Dump summary of queue info */ -static int manager_queues_summary(struct mansession *s, struct message *m) +static int manager_queues_summary(struct mansession *s, const struct message *m) { time_t now; int qmemcount = 0; int qmemavail = 0; int qchancount = 0; - char *id = astman_get_header(m, "ActionID"); - char *queuefilter = astman_get_header(m, "Queue"); + const char *id = astman_get_header(m, "ActionID"); + const char *queuefilter = astman_get_header(m, "Queue"); char idText[256] = ""; struct call_queue *q; struct queue_ent *qe; @@ -4231,13 +4231,13 @@ static int manager_queues_summary(struct mansession *s, struct message *m) } /* Dump queue status */ -static int manager_queues_status(struct mansession *s, struct message *m) +static int manager_queues_status(struct mansession *s, const struct message *m) { time_t now; int pos; - char *id = astman_get_header(m,"ActionID"); - char *queuefilter = astman_get_header(m,"Queue"); - char *memberfilter = astman_get_header(m,"Member"); + const char *id = astman_get_header(m,"ActionID"); + const char *queuefilter = astman_get_header(m,"Queue"); + const char *memberfilter = astman_get_header(m,"Member"); char idText[256] = ""; struct call_queue *q; struct queue_ent *qe; @@ -4322,9 +4322,9 @@ static int manager_queues_status(struct mansession *s, struct message *m) return RESULT_SUCCESS; } -static int manager_add_queue_member(struct mansession *s, struct message *m) +static int manager_add_queue_member(struct mansession *s, const struct message *m) { - char *queuename, *interface, *penalty_s, *paused_s, *membername; + const char *queuename, *interface, *penalty_s, *paused_s, *membername; int paused, penalty = 0; queuename = astman_get_header(m, "Queue"); @@ -4375,9 +4375,9 @@ static int manager_add_queue_member(struct mansession *s, struct message *m) return 0; } -static int manager_remove_queue_member(struct mansession *s, struct message *m) +static int manager_remove_queue_member(struct mansession *s, const struct message *m) { - char *queuename, *interface; + const char *queuename, *interface; queuename = astman_get_header(m, "Queue"); interface = astman_get_header(m, "Interface"); @@ -4406,9 +4406,9 @@ static int manager_remove_queue_member(struct mansession *s, struct message *m) return 0; } -static int manager_pause_queue_member(struct mansession *s, struct message *m) +static int manager_pause_queue_member(struct mansession *s, const struct message *m) { - char *queuename, *interface, *paused_s; + const char *queuename, *interface, *paused_s; int paused; interface = astman_get_header(m, "Interface"); @@ -4429,9 +4429,9 @@ static int manager_pause_queue_member(struct mansession *s, struct message *m) return 0; } -static int manager_queue_log_custom(struct mansession *s, struct message *m) +static int manager_queue_log_custom(struct mansession *s, const struct message *m) { - char *queuename, *event, *message, *interface, *uniqueid; + const char *queuename, *event, *message, *interface, *uniqueid; queuename = astman_get_header(m, "Queue"); uniqueid = astman_get_header(m, "UniqueId"); diff --git a/apps/app_senddtmf.c b/apps/app_senddtmf.c index 67cb2d5c1..96893e22e 100644 --- a/apps/app_senddtmf.c +++ b/apps/app_senddtmf.c @@ -94,10 +94,10 @@ static char mandescr_playdtmf[] = " Channel: Channel name to send digit to\n" " Digit: The dtmf digit to play\n"; -static int manager_play_dtmf(struct mansession *s, struct message *m) +static int manager_play_dtmf(struct mansession *s, const struct message *m) { - char *channel = astman_get_header(m, "Channel"); - char *digit = astman_get_header(m, "Digit"); + const char *channel = astman_get_header(m, "Channel"); + const char *digit = astman_get_header(m, "Digit"); struct ast_channel *chan = ast_get_channel_by_name_locked(channel); if (!chan) { |