]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 1 May 2007 01:26:30 +0000 (01:26 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 1 May 2007 01:26:30 +0000 (01:26 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5051 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_console.h
src/mod/endpoints/mod_alsa/mod_alsa.c
src/mod/endpoints/mod_portaudio/mod_portaudio.c

index 0c81dc4577c72b2a8e5ba9875037ae957fd93ef1..156b9d83afde64f0380e1eab01fa238e7d185490 100644 (file)
@@ -43,7 +43,7 @@
 
 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;\
index 537a22b412c842d32408816883fc6496321b1e0d..87e0bf658eefddbed762f61bdd23c23dfdfa6043 100644 (file)
@@ -1526,6 +1526,12 @@ static switch_status_t pa_cmd(char *cmd, switch_core_session_t *isession, switch
        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"
@@ -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"
                "--------------------------------------------------------------------------------\n";
 
-       if (stream->event) {
+       if (http) {
 #if 0
                switch_event_header_t *hp;
                stream->write_function(stream, "<pre>");
@@ -1629,7 +1635,7 @@ static switch_status_t pa_cmd(char *cmd, switch_core_session_t *isession, switch
 
  done:
 
-       if (stream->event) {
+       if (http) {
 
                stream->write_function(stream,
                                                           "<br><br><table align=center><tr><td><center><form method=post>\n"
index 0c1e3d586b3d75767cdb27cfc1501905bbd9417c..0bf3e70d85d24a888ab01db7df2b2a9a2e679b00 100644 (file)
@@ -1722,6 +1722,7 @@ static switch_status_t pa_cmd(char *cmd, switch_core_session_t *isession, switch
        int lead = 1, devval = 0;
        char *wcmd = NULL, *action = NULL;
        char cmd_buf[1024] = "";
+       char *http = NULL;
 
        const char *usage_string = "USAGE:\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 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>");
@@ -1872,7 +1877,7 @@ static switch_status_t pa_cmd(char *cmd, switch_core_session_t *isession, switch
 
   done:
 
-       if (stream->event) {
+       if (http) {
 
                stream->write_function(stream,
                                                           "<br><br><table align=center><tr><td><center><form method=post>\n"