[Freeswitch-svn] [commit] r5051 - in freeswitch/trunk/src: include mod/endpoints/mod_alsa mod/endpoints/mod_portaudio

Freeswitch SVN anthm at freeswitch.org
Mon Apr 30 21:26:30 EDT 2007


Author: anthm
Date: Mon Apr 30 21:26:30 2007
New Revision: 5051

Modified:
   freeswitch/trunk/src/include/switch_console.h
   freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c
   freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c

Log:
update

Modified: freeswitch/trunk/src/include/switch_console.h
==============================================================================
--- freeswitch/trunk/src/include/switch_console.h	(original)
+++ freeswitch/trunk/src/include/switch_console.h	Mon Apr 30 21:26:30 2007
@@ -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;\

Modified: freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c	Mon Apr 30 21:26:30 2007
@@ -1526,6 +1526,12 @@
 	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 @@
 		"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 @@
 
  done:
 
-	if (stream->event) {
+	if (http) {
 
 		stream->write_function(stream,
 							   "<br><br><table align=center><tr><td><center><form method=post>\n"

Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c	Mon Apr 30 21:26:30 2007
@@ -1722,6 +1722,7 @@
 	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 @@
 		"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 @@
 
   done:
 
-	if (stream->event) {
+	if (http) {
 
 		stream->write_function(stream,
 							   "<br><br><table align=center><tr><td><center><form method=post>\n"



More information about the Freeswitch-svn mailing list