SWITCH_BEGIN_EXTERN_C
#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); \
s.end = s.data;\
s.data_size = SWITCH_CMD_CHUNK_LEN;\
int lead = 1, devval = 0;
char *wcmd = NULL, *action = NULL;
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"
"--------------------------------------------------------------------------------\n"
"alsa flags [on|off] [ear] [mouth]\n"
"--------------------------------------------------------------------------------\n";
- if (stream->event) {
+ if (http) {
#if 0
switch_event_header_t *hp;
stream->write_function(stream, "<pre>");
done:
- if (stream->event) {
+ if (http) {
stream->write_function(stream,
"<br><br><table align=center><tr><td><center><form method=post>\n"
int lead = 1, devval = 0;
char *wcmd = NULL, *action = NULL;
char cmd_buf[1024] = "";
+ char *http = NULL;
const char *usage_string = "USAGE:\n"
"--------------------------------------------------------------------------------\n"
"pa outdev [#<num>|<partial name>\n"
"pa ringdev [#<num>|<partial name>\n" "--------------------------------------------------------------------------------\n";
-
if (stream->event) {
+ http = switch_event_get_header(stream->event, "http-host");
+ }
+
+
+ if (http) {
#if 0
switch_event_header_t *hp;
stream->write_function(stream, "<pre>");
done:
- if (stream->event) {
+ if (http) {
stream->write_function(stream,
"<br><br><table align=center><tr><td><center><form method=post>\n"