[Freeswitch-svn] [commit] r8579 - in freeswitch/trunk/src: . include mod/applications/mod_commands mod/applications/mod_conference mod/applications/mod_voicemail mod/endpoints/mod_alsa mod/endpoints/mod_portaudio mod/formats/mod_shout mod/languages/mod_lua mod/languages/mod_perl mod/languages/mod_spidermonkey mod/xml_int/mod_xml_rpc

Freeswitch SVN anthm at freeswitch.org
Fri May 23 23:46:20 EDT 2008


Author: anthm
Date: Fri May 23 23:46:19 2008
New Revision: 8579

Modified:
   freeswitch/trunk/src/include/switch_module_interfaces.h
   freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
   freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
   freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
   freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c
   freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
   freeswitch/trunk/src/mod/formats/mod_shout/mod_shout.c
   freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.cpp
   freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c
   freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
   freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
   freeswitch/trunk/src/switch_loadable_module.c

Log:
name change

Modified: freeswitch/trunk/src/include/switch_module_interfaces.h
==============================================================================
--- freeswitch/trunk/src/include/switch_module_interfaces.h	(original)
+++ freeswitch/trunk/src/include/switch_module_interfaces.h	Fri May 23 23:46:19 2008
@@ -92,7 +92,7 @@
 	switch_size_t data_len;
 	switch_size_t alloc_len;
 	switch_size_t alloc_chunk;
-	switch_event_t *event;
+	switch_event_t *param_event;
 };
 
 struct switch_io_event_hooks;

Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c	Fri May 23 23:46:19 2008
@@ -114,9 +114,9 @@
 	char *host = NULL;
 	const char *err = NULL;
 
-	if (stream->event && (host = switch_event_get_header(stream->event, "http-host"))) {
+	if (stream->param_event && (host = switch_event_get_header(stream->param_event, "http-host"))) {
 		stream->write_function(stream,  "Content-Type: text/xml\r\n\r\n");
-		if ((path_info = switch_event_get_header(stream->event, "http-path-info"))) {
+		if ((path_info = switch_event_get_header(stream->param_event, "http-path-info"))) {
 			cmd = path_info;
 			delim = '/';
 		}
@@ -200,9 +200,9 @@
 	char *host = NULL;
 	const char *err = NULL;
 
-	if (stream->event && (host = switch_event_get_header(stream->event, "http-host"))) {
+	if (stream->param_event && (host = switch_event_get_header(stream->param_event, "http-host"))) {
 		stream->write_function(stream,  "Content-Type: text/xml\r\n\r\n");
-		if ((path_info = switch_event_get_header(stream->event, "http-path-info"))) {
+		if ((path_info = switch_event_get_header(stream->param_event, "http-path-info"))) {
 			cmd = path_info;
 			delim = '/';
 		}
@@ -522,8 +522,8 @@
 
 	switch_core_measure_time(switch_core_uptime(), &duration);
 
-	if (stream->event) {
-		http = switch_event_get_header(stream->event, "http-host");
+	if (stream->param_event) {
+		http = switch_event_get_header(stream->param_event, "http-host");
 	}
 
 	if (http || (cmd && strstr(cmd, "html"))) {
@@ -1943,8 +1943,8 @@
 		}
 	}
 
-	if (stream->event) {
-		holder.http = switch_event_get_header(stream->event, "http-host");
+	if (stream->param_event) {
+		holder.http = switch_event_get_header(stream->param_event, "http-host");
 	}
 
 	holder.print_title = 1;

Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c	Fri May 23 23:46:19 2008
@@ -3663,8 +3663,8 @@
 		return SWITCH_STATUS_FALSE;
 	}
 
-	if (stream->event) {
-		http = switch_event_get_header(stream->event, "http-host");
+	if (stream->param_event) {
+		http = switch_event_get_header(stream->param_event, "http-host");
 	}
 
 	if (http) {

Modified: freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c	Fri May 23 23:46:19 2008
@@ -2417,8 +2417,8 @@
 	struct holder holder;
 	char *ref = NULL;
 
-	if (stream->event) {
-		ref = switch_event_get_header(stream->event, "http-referer");
+	if (stream->param_event) {
+		ref = switch_event_get_header(stream->param_event, "http-referer");
 	}
 
 	sql = switch_mprintf("select * from voicemail_msgs where username='%s' and domain='%s' and file_path like '%%%s'", user, domain, file);
@@ -2766,13 +2766,13 @@
 		return SWITCH_STATUS_FALSE;
 	}
 
-	if (stream->event) {
-		host = switch_event_get_header(stream->event, "http-host");
-		port = switch_event_get_header(stream->event, "http-port");
-		uri = switch_event_get_header(stream->event, "http-uri");
-		user = switch_event_get_header(stream->event, "freeswitch-user");
-		domain = switch_event_get_header(stream->event, "freeswitch-domain");
-		path_info = switch_event_get_header(stream->event, "http-path-info");
+	if (stream->param_event) {
+		host = switch_event_get_header(stream->param_event, "http-host");
+		port = switch_event_get_header(stream->param_event, "http-port");
+		uri = switch_event_get_header(stream->param_event, "http-uri");
+		user = switch_event_get_header(stream->param_event, "freeswitch-user");
+		domain = switch_event_get_header(stream->param_event, "freeswitch-domain");
+		path_info = switch_event_get_header(stream->param_event, "http-path-info");
 	}
 
 	if (!switch_strlen_zero(cmd)) {

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	Fri May 23 23:46:19 2008
@@ -1532,8 +1532,8 @@
 	char cmd_buf[1024] = "";
 	char *http = NULL;
 
-	if (stream->event) {
-		http = switch_event_get_header(stream->event, "http-host");
+	if (stream->param_event) {
+		http = switch_event_get_header(stream->param_event, "http-host");
 	}
 
 	
@@ -1553,7 +1553,7 @@
 #if 0
 		switch_event_header_t *hp;
 		stream->write_function(stream, "<pre>");
-		for (hp = stream->event->headers; hp; hp = hp->next) {
+		for (hp = stream->param_event->headers; hp; hp = hp->next) {
 			stream->write_function(stream, "[%s]=[%s]\n", hp->name, hp->value);
 		}
 		stream->write_function(stream, "</pre>");
@@ -1561,8 +1561,8 @@
 
 		stream->write_function(stream, "Content-type: text/html\n\n");
 
-		wcmd = switch_str_nil(switch_event_get_header(stream->event, "wcmd"));
-		action = switch_event_get_header(stream->event, "action");
+		wcmd = switch_str_nil(switch_event_get_header(stream->param_event, "wcmd"));
+		action = switch_event_get_header(stream->param_event, "action");
 
 		if (action) {
 			if (strlen(action) == 1) {

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	Fri May 23 23:46:19 2008
@@ -1542,15 +1542,15 @@
 		"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 (stream->param_event) {
+		http = switch_event_get_header(stream->param_event, "http-host");
 	}
 
 	if (http) {
 		stream->write_function(stream, "Content-type: text/html\n\n");
 
-		wcmd = switch_str_nil(switch_event_get_header(stream->event, "wcmd"));
-		action = switch_event_get_header(stream->event, "action");
+		wcmd = switch_str_nil(switch_event_get_header(stream->param_event, "wcmd"));
+		action = switch_event_get_header(stream->param_event, "action");
 
 		if (action) {
 			if (strlen(action) == 1) {

Modified: freeswitch/trunk/src/mod/formats/mod_shout/mod_shout.c
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_shout/mod_shout.c	(original)
+++ freeswitch/trunk/src/mod/formats/mod_shout/mod_shout.c	Fri May 23 23:46:19 2008
@@ -1032,7 +1032,7 @@
 
 void do_telecast(switch_stream_handle_t *stream)
 {
-    char *path_info = switch_event_get_header(stream->event, "http-path-info");
+    char *path_info = switch_event_get_header(stream->param_event, "http-path-info");
     char *uuid = strdup(path_info + 4);
     switch_core_session_t *tsession;
     char *fname = "stream.mp3";
@@ -1042,7 +1042,7 @@
     }
 
     if (!(tsession = switch_core_session_locate(uuid))) {
-        char *ref = switch_event_get_header(stream->event, "http-referer");
+        char *ref = switch_event_get_header(stream->param_event, "http-referer");
         stream->write_function(stream,"Content-type: text/html\r\n\r\n<h2>Not Found!</h2>\n"
                                "<META http-equiv=\"refresh\" content=\"1;URL=%s\">",  ref);
     } else {
@@ -1140,7 +1140,7 @@
 
 void do_broadcast(switch_stream_handle_t *stream)
 {
-    char *path_info = switch_event_get_header(stream->event, "http-path-info");
+    char *path_info = switch_event_get_header(stream->param_event, "http-path-info");
     char *file;
     lame_global_flags *gfp = NULL;
     switch_file_handle_t fh = {0};
@@ -1254,9 +1254,9 @@
     struct holder holder;
     char *errmsg;
 
-    holder.host = switch_event_get_header(stream->event, "http-host");
-    holder.port = switch_event_get_header(stream->event, "http-port");
-    holder.uri = switch_event_get_header(stream->event, "http-uri");
+    holder.host = switch_event_get_header(stream->param_event, "http-host");
+    holder.port = switch_event_get_header(stream->param_event, "http-port");
+    holder.uri = switch_event_get_header(stream->param_event, "http-uri");
     holder.stream = stream;
     
     stream->write_function(stream, "Content-type: text/html\r\n\r\n");
@@ -1286,11 +1286,11 @@
 		return SWITCH_STATUS_FALSE;
 	}
 
-    if (stream->event) {
-        host = switch_event_get_header(stream->event, "http-host");
-        port = switch_event_get_header(stream->event, "http-port");
-        uri = switch_event_get_header(stream->event, "http-uri");
-        path_info = switch_event_get_header(stream->event, "http-path-info");
+    if (stream->param_event) {
+        host = switch_event_get_header(stream->param_event, "http-host");
+        port = switch_event_get_header(stream->param_event, "http-port");
+        uri = switch_event_get_header(stream->param_event, "http-uri");
+        path_info = switch_event_get_header(stream->param_event, "http-path-info");
     }
 
     if (!path_info) {

Modified: freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.cpp	(original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.cpp	Fri May 23 23:46:19 2008
@@ -346,12 +346,12 @@
 		switch_assert(mycmd);
 		mod_lua_conjure_stream(L, stream, "stream", 1);
 
-		if (stream->event) {
-			mod_lua_conjure_event(L, stream->event, "env", 1);
+		if (stream->param_event) {
+			mod_lua_conjure_event(L, stream->param_event, "env", 1);
 		}
 
 		if ((error = lua_parse_and_execute(L, mycmd))) {
-			if (switch_event_get_header(stream->event, "http-host")) {
+			if (switch_event_get_header(stream->param_event, "http-host")) {
 				stream->write_function(stream, "Content-Type: text/html\n\n<H2>Error Executing Script</H2>");
 			} else {
 				stream->write_function(stream, "-ERR encounterd\n");

Modified: freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c	Fri May 23 23:46:19 2008
@@ -266,8 +266,8 @@
 	if (cmd) {
 		if (stream) {
 			mod_perl_conjure_stream(my_perl, stream, "stream");
-			if (stream->event) {
-				mod_perl_conjure_event(my_perl, stream->event, "env");
+			if (stream->param_event) {
+				mod_perl_conjure_event(my_perl, stream->param_event, "env");
 			}
 		}
 		//Perl_safe_eval(my_perl, cmd);

Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	Fri May 23 23:46:19 2008
@@ -196,7 +196,7 @@
 	if (argc > 1) {
 		char *hname = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
 		char *hval = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
-		switch_event_add_header(ro->stream->event, SWITCH_STACK_BOTTOM, hname, "%s", hval);
+		switch_event_add_header(ro->stream->param_event, SWITCH_STACK_BOTTOM, hname, "%s", hval);
 		*rval = BOOLEAN_TO_JSVAL(JS_TRUE);
 		return JS_TRUE;
 	}
@@ -217,7 +217,7 @@
 
 	if (argc > 0) {
 		char *hname = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
-		char *val = switch_event_get_header(ro->stream->event, hname);
+		char *val = switch_event_get_header(ro->stream->param_event, hname);
 		*rval = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, val));
 		return JS_TRUE;
 	}
@@ -243,14 +243,14 @@
 	if (!strcasecmp(how, "xml")) {
 		switch_xml_t xml;
 		char *xmlstr;
-		if ((xml = switch_event_xmlize(ro->stream->event, SWITCH_VA_NONE))) {
+		if ((xml = switch_event_xmlize(ro->stream->param_event, SWITCH_VA_NONE))) {
             xmlstr = switch_xml_toxml(xml, SWITCH_FALSE);
 			*rval = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, xmlstr));
 			return JS_TRUE;
         } 
 	} else {
 		char *buf;
-		switch_event_serialize(ro->stream->event, &buf, SWITCH_TRUE);
+		switch_event_serialize(ro->stream->param_event, &buf, SWITCH_TRUE);
 		if (buf) {
 			*rval = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, buf));
 			free(buf);
@@ -3406,8 +3406,8 @@
 	struct request_obj ro = {0};
 	char *path_info = NULL;
 
-    if (stream->event) {
-		path_info = switch_event_get_header(stream->event, "http-path-info");
+    if (stream->param_event) {
+		path_info = switch_event_get_header(stream->param_event, "http-path-info");
 	}
 
 	if (switch_strlen_zero(cmd) && path_info) {

Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c	(original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c	Fri May 23 23:46:19 2008
@@ -519,32 +519,32 @@
 
  auth:
 
-	if (switch_event_create(&stream.event, SWITCH_EVENT_API) == SWITCH_STATUS_SUCCESS) {
+	if (switch_event_create(&stream.param_event, SWITCH_EVENT_API) == SWITCH_STATUS_SUCCESS) {
 		const char * const content_length = RequestHeaderValue(r, "content-length");
 			
 		if (fs_user)
-			switch_event_add_header(stream.event, SWITCH_STACK_BOTTOM, "FreeSWITCH-User", "%s", fs_user);
+			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "FreeSWITCH-User", "%s", fs_user);
 		if (fs_domain)
-			switch_event_add_header(stream.event, SWITCH_STACK_BOTTOM, "FreeSWITCH-Domain", "%s", fs_domain);
+			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "FreeSWITCH-Domain", "%s", fs_domain);
 		if (path_info)
-			switch_event_add_header(stream.event, SWITCH_STACK_BOTTOM, "HTTP-Path-Info", "%s", path_info);
-		switch_event_add_header(stream.event, SWITCH_STACK_BOTTOM, "HTTP-URI", "%s", r->requestInfo.uri);
+			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-Path-Info", "%s", path_info);
+		switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-URI", "%s", r->requestInfo.uri);
 		if (r->requestInfo.query)
-			switch_event_add_header(stream.event, SWITCH_STACK_BOTTOM, "HTTP-QUERY", "%s", r->requestInfo.query);
+			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-QUERY", "%s", r->requestInfo.query);
 		if (r->requestInfo.host)
-			switch_event_add_header(stream.event, SWITCH_STACK_BOTTOM, "HTTP-HOST", "%s", r->requestInfo.host);
+			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-HOST", "%s", r->requestInfo.host);
 		if (r->requestInfo.from)
-			switch_event_add_header(stream.event, SWITCH_STACK_BOTTOM, "HTTP-FROM", "%s", r->requestInfo.from);
+			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-FROM", "%s", r->requestInfo.from);
 		if (r->requestInfo.useragent)
-			switch_event_add_header(stream.event, SWITCH_STACK_BOTTOM, "HTTP-USER-AGENT", "%s", r->requestInfo.useragent);
+			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-USER-AGENT", "%s", r->requestInfo.useragent);
 		if (r->requestInfo.referer)
-			switch_event_add_header(stream.event, SWITCH_STACK_BOTTOM, "HTTP-REFERER", "%s", r->requestInfo.referer);
+			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-REFERER", "%s", r->requestInfo.referer);
 		if (r->requestInfo.requestline)
-			switch_event_add_header(stream.event, SWITCH_STACK_BOTTOM, "HTTP-REQUESTLINE", "%s", r->requestInfo.requestline);
+			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-REQUESTLINE", "%s", r->requestInfo.requestline);
 		if (r->requestInfo.user)
-			switch_event_add_header(stream.event, SWITCH_STACK_BOTTOM, "HTTP-USER", "%s", r->requestInfo.user);
+			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-USER", "%s", r->requestInfo.user);
 		if (r->requestInfo.port)
-			switch_event_add_header(stream.event, SWITCH_STACK_BOTTOM, "HTTP-PORT", "%u", r->requestInfo.port);
+			switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-PORT", "%u", r->requestInfo.port);
 		if (r->requestInfo.query || content_length) {
 			char *q, *qd;
 			char *next;
@@ -584,7 +584,7 @@
 				}
 			}
 			if (query) {
-				switch_event_add_header(stream.event, SWITCH_STACK_BOTTOM, "HTTP-QUERY", "%s", query);
+				switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, "HTTP-QUERY", "%s", query);
 
 				qd = strdup(query);
 				switch_assert(qd != NULL);
@@ -610,7 +610,7 @@
 					name = q;
 					if ((val = strchr(name, '='))) {
 						*val++ = '\0';
-						switch_event_add_header(stream.event, SWITCH_STACK_BOTTOM, name, "%s", val);
+						switch_event_add_header(stream.param_event, SWITCH_STACK_BOTTOM, name, "%s", val);
 					}
 					q = next;
 				} while (q != NULL);

Modified: freeswitch/trunk/src/switch_loadable_module.c
==============================================================================
--- freeswitch/trunk/src/switch_loadable_module.c	(original)
+++ freeswitch/trunk/src/switch_loadable_module.c	Fri May 23 23:46:19 2008
@@ -1341,16 +1341,16 @@
 	switch_assert(stream->data != NULL);
 	switch_assert(stream->write_function != NULL);
 
-	if (!stream->event) {
-		switch_event_create(&stream->event, SWITCH_EVENT_API);
+	if (!stream->param_event) {
+		switch_event_create(&stream->param_event, SWITCH_EVENT_API);
 	}
 
-	if (stream->event) {
+	if (stream->param_event) {
 		if (cmd) {
-			switch_event_add_header(stream->event, SWITCH_STACK_BOTTOM, "API-Command", "%s", cmd);
+			switch_event_add_header(stream->param_event, SWITCH_STACK_BOTTOM, "API-Command", "%s", cmd);
 		}
 		if (arg) {
-			switch_event_add_header(stream->event, SWITCH_STACK_BOTTOM, "API-Command-Argument", "%s", arg);
+			switch_event_add_header(stream->param_event, SWITCH_STACK_BOTTOM, "API-Command-Argument", "%s", arg);
 		}
 	}
 
@@ -1361,8 +1361,8 @@
 		stream->write_function(stream, "INVALID COMMAND!\n");
 	}
 
-	if (stream->event) {
-		switch_event_fire(&stream->event);
+	if (stream->param_event) {
+		switch_event_fire(&stream->param_event);
 	}
 
 



More information about the Freeswitch-svn mailing list