mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
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
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user