git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5051 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-05-01 01:26:30 +00:00
parent 85daee9324
commit e119e0dad4
3 changed files with 16 additions and 5 deletions

View File

@ -43,7 +43,7 @@
SWITCH_BEGIN_EXTERN_C SWITCH_BEGIN_EXTERN_C
#define SWITCH_CMD_CHUNK_LEN 1024 #define SWITCH_CMD_CHUNK_LEN 1024
#define SWITCH_STANDARD_STREAM(s) if ((s.data = malloc(SWITCH_CMD_CHUNK_LEN))) { \ #define SWITCH_STANDARD_STREAM(s) memset(&s, 0, sizeof(s)); if ((s.data = malloc(SWITCH_CMD_CHUNK_LEN))) { \
memset(s.data, 0, SWITCH_CMD_CHUNK_LEN); \ memset(s.data, 0, SWITCH_CMD_CHUNK_LEN); \
s.end = s.data;\ s.end = s.data;\
s.data_size = SWITCH_CMD_CHUNK_LEN;\ s.data_size = SWITCH_CMD_CHUNK_LEN;\

View File

@ -1526,6 +1526,12 @@ static switch_status_t pa_cmd(char *cmd, switch_core_session_t *isession, switch
int lead = 1, devval = 0; int lead = 1, devval = 0;
char *wcmd = NULL, *action = NULL; char *wcmd = NULL, *action = NULL;
char cmd_buf[1024] = ""; char cmd_buf[1024] = "";
char *http = NULL;
if (stream->event) {
http = switch_event_get_header(stream->event, "http-host");
}
const char *usage_string = "USAGE:\n" const char *usage_string = "USAGE:\n"
"--------------------------------------------------------------------------------\n" "--------------------------------------------------------------------------------\n"
@ -1540,7 +1546,7 @@ static switch_status_t pa_cmd(char *cmd, switch_core_session_t *isession, switch
"alsa flags [on|off] [ear] [mouth]\n" "alsa flags [on|off] [ear] [mouth]\n"
"--------------------------------------------------------------------------------\n"; "--------------------------------------------------------------------------------\n";
if (stream->event) { if (http) {
#if 0 #if 0
switch_event_header_t *hp; switch_event_header_t *hp;
stream->write_function(stream, "<pre>"); stream->write_function(stream, "<pre>");
@ -1629,7 +1635,7 @@ static switch_status_t pa_cmd(char *cmd, switch_core_session_t *isession, switch
done: done:
if (stream->event) { if (http) {
stream->write_function(stream, stream->write_function(stream,
"<br><br><table align=center><tr><td><center><form method=post>\n" "<br><br><table align=center><tr><td><center><form method=post>\n"

View File

@ -1722,6 +1722,7 @@ static switch_status_t pa_cmd(char *cmd, switch_core_session_t *isession, switch
int lead = 1, devval = 0; int lead = 1, devval = 0;
char *wcmd = NULL, *action = NULL; char *wcmd = NULL, *action = NULL;
char cmd_buf[1024] = ""; char cmd_buf[1024] = "";
char *http = NULL;
const char *usage_string = "USAGE:\n" const char *usage_string = "USAGE:\n"
"--------------------------------------------------------------------------------\n" "--------------------------------------------------------------------------------\n"
@ -1739,8 +1740,12 @@ static switch_status_t pa_cmd(char *cmd, switch_core_session_t *isession, switch
"pa outdev [#<num>|<partial name>\n" "pa outdev [#<num>|<partial name>\n"
"pa ringdev [#<num>|<partial name>\n" "--------------------------------------------------------------------------------\n"; "pa ringdev [#<num>|<partial name>\n" "--------------------------------------------------------------------------------\n";
if (stream->event) { if (stream->event) {
http = switch_event_get_header(stream->event, "http-host");
}
if (http) {
#if 0 #if 0
switch_event_header_t *hp; switch_event_header_t *hp;
stream->write_function(stream, "<pre>"); stream->write_function(stream, "<pre>");
@ -1872,7 +1877,7 @@ static switch_status_t pa_cmd(char *cmd, switch_core_session_t *isession, switch
done: done:
if (stream->event) { if (http) {
stream->write_function(stream, stream->write_function(stream,
"<br><br><table align=center><tr><td><center><form method=post>\n" "<br><br><table align=center><tr><td><center><form method=post>\n"