aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-05 22:43:18 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-05 22:43:18 +0000
commitd8e7fcf209d7694d70ce0d46a8c60131ab7ba71f (patch)
tree19f29aed9ad9813da3843062a7089d28de6108d4 /res
parente37f8f077ac812a2007cae698e0a67785d473f17 (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: http://svn.digium.com/svn/asterisk/trunk@49678 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_features.c12
-rw-r--r--res/res_jabber.c15
-rw-r--r--res/res_monitor.c28
3 files changed, 27 insertions, 28 deletions
diff --git a/res/res_features.c b/res/res_features.c
index fa17f55d8..20ea18d36 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -1932,10 +1932,10 @@ static struct ast_cli_entry cli_features[] = {
};
/*! \brief Dump lot status */
-static int manager_parking_status( struct mansession *s, struct message *m )
+static int manager_parking_status( struct mansession *s, const struct message *m)
{
struct parkeduser *cur;
- char *id = astman_get_header(m,"ActionID");
+ const char *id = astman_get_header(m,"ActionID");
char idText[256] = "";
if (!ast_strlen_zero(id))
@@ -1979,11 +1979,11 @@ static char mandescr_park[] =
" *Channel2: Channel to announce park info to (and return to if timeout)\n"
" Timeout: Number of milliseconds to wait before callback.\n";
-static int manager_park(struct mansession *s, struct message *m)
+static int manager_park(struct mansession *s, const struct message *m)
{
- char *channel = astman_get_header(m, "Channel");
- char *channel2 = astman_get_header(m, "Channel2");
- char *timeout = astman_get_header(m, "Timeout");
+ const char *channel = astman_get_header(m, "Channel");
+ const char *channel2 = astman_get_header(m, "Channel2");
+ const char *timeout = astman_get_header(m, "Timeout");
char buf[BUFSIZ];
int to = 0;
int res = 0;
diff --git a/res/res_jabber.c b/res/res_jabber.c
index 75bf1fef2..b36a5adc1 100644
--- a/res/res_jabber.c
+++ b/res/res_jabber.c
@@ -55,7 +55,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define JABBER_CONFIG "jabber.conf"
/*-- Forward declarations */
-static int manager_jabber_send( struct mansession *s, struct message *m );
static int aji_highest_bit(int number);
static void aji_buddy_destroy(struct aji_buddy *obj);
static void aji_client_destroy(struct aji_client *obj);
@@ -1371,7 +1370,7 @@ static void aji_handle_subscribe(struct aji_client *client, ikspak *pak)
* \param aji_client struct , reciever, message.
* \return 1.
*/
-int ast_aji_send(struct aji_client *client, char *address, char *message)
+int ast_aji_send(struct aji_client *client, const char *address, const char *message)
{
int res = 0;
iks *message_packet = NULL;
@@ -2295,7 +2294,7 @@ static int aji_load_config(void)
* \param void.
* \return 1.
*/
-struct aji_client *ast_aji_get_client(char *name)
+struct aji_client *ast_aji_get_client(const char *name)
{
struct aji_client *client = NULL;
@@ -2318,13 +2317,13 @@ static char mandescr_jabber_send[] =
" Message: Message to be sent to the buddy\n";
/*! \brief Send a Jabber Message via call from the Manager */
-static int manager_jabber_send( struct mansession *s, struct message *m )
+static int manager_jabber_send(struct mansession *s, const struct message *m)
{
struct aji_client *client = NULL;
- char *id = astman_get_header(m,"ActionID");
- char *jabber = astman_get_header(m,"Jabber");
- char *screenname = astman_get_header(m,"ScreenName");
- char *message = astman_get_header(m,"Message");
+ const char *id = astman_get_header(m,"ActionID");
+ const char *jabber = astman_get_header(m,"Jabber");
+ const char *screenname = astman_get_header(m,"ScreenName");
+ const char *message = astman_get_header(m,"Message");
if (ast_strlen_zero(jabber)) {
astman_send_error(s, m, "No transport specified");
diff --git a/res/res_monitor.c b/res/res_monitor.c
index 515352e75..59ef1574b 100644
--- a/res/res_monitor.c
+++ b/res/res_monitor.c
@@ -477,13 +477,13 @@ static char start_monitor_action_help[] =
" the input and output channels together after the\n"
" recording is finished.\n";
-static int start_monitor_action(struct mansession *s, struct message *m)
+static int start_monitor_action(struct mansession *s, const struct message *m)
{
struct ast_channel *c = NULL;
- char *name = astman_get_header(m, "Channel");
- char *fname = astman_get_header(m, "File");
- char *format = astman_get_header(m, "Format");
- char *mix = astman_get_header(m, "Mix");
+ const char *name = astman_get_header(m, "Channel");
+ const char *fname = astman_get_header(m, "File");
+ const char *format = astman_get_header(m, "Format");
+ const char *mix = astman_get_header(m, "Mix");
char *d;
if (ast_strlen_zero(name)) {
@@ -530,10 +530,10 @@ static char stop_monitor_action_help[] =
" started 'Monitor' action. The only parameter is 'Channel', the name\n"
" of the channel monitored.\n";
-static int stop_monitor_action(struct mansession *s, struct message *m)
+static int stop_monitor_action(struct mansession *s, const struct message *m)
{
struct ast_channel *c = NULL;
- char *name = astman_get_header(m, "Channel");
+ const char *name = astman_get_header(m, "Channel");
int res;
if (ast_strlen_zero(name)) {
astman_send_error(s, m, "No channel specified");
@@ -562,11 +562,11 @@ static char change_monitor_action_help[] =
" File - Required. Is the new name of the file created in the\n"
" monitor spool directory.\n";
-static int change_monitor_action(struct mansession *s, struct message *m)
+static int change_monitor_action(struct mansession *s, const struct message *m)
{
struct ast_channel *c = NULL;
- char *name = astman_get_header(m, "Channel");
- char *fname = astman_get_header(m, "File");
+ const char *name = astman_get_header(m, "Channel");
+ const char *fname = astman_get_header(m, "File");
if (ast_strlen_zero(name)) {
astman_send_error(s, m, "No channel specified");
return 0;
@@ -602,10 +602,10 @@ enum MONITOR_PAUSING_ACTION
MONITOR_ACTION_UNPAUSE
};
-static int do_pause_or_unpause(struct mansession *s, struct message *m, int action)
+static int do_pause_or_unpause(struct mansession *s, const struct message *m, int action)
{
struct ast_channel *c = NULL;
- char *name = astman_get_header(m, "Channel");
+ const char *name = astman_get_header(m, "Channel");
if (ast_strlen_zero(name)) {
astman_send_error(s, m, "No channel specified");
@@ -634,7 +634,7 @@ static char pause_monitor_action_help[] =
" be used to control this:\n"
" Channel - Required. Used to specify the channel to record.\n";
-static int pause_monitor_action(struct mansession *s, struct message *m)
+static int pause_monitor_action(struct mansession *s, const struct message *m)
{
return do_pause_or_unpause(s, m, MONITOR_ACTION_PAUSE);
}
@@ -645,7 +645,7 @@ static char unpause_monitor_action_help[] =
" be used to control this:\n"
" Channel - Required. Used to specify the channel to record.\n";
-static int unpause_monitor_action(struct mansession *s, struct message *m)
+static int unpause_monitor_action(struct mansession *s, const struct message *m)
{
return do_pause_or_unpause(s, m, MONITOR_ACTION_UNPAUSE);
}