diff --git a/src/include/switch_module_interfaces.h b/src/include/switch_module_interfaces.h
index f4d303602c..264128446a 100644
--- a/src/include/switch_module_interfaces.h
+++ b/src/include/switch_module_interfaces.h
@@ -92,7 +92,7 @@ struct switch_stream_handle {
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;
diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c
index 4955ca55ed..4c8a36ec02 100644
--- a/src/mod/applications/mod_commands/mod_commands.c
+++ b/src/mod/applications/mod_commands/mod_commands.c
@@ -114,9 +114,9 @@ static switch_status_t _find_user(const char *cmd, switch_core_session_t *sessio
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 @@ SWITCH_STANDARD_API(xml_locate_function)
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_STANDARD_API(status_function)
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 @@ SWITCH_STANDARD_API(show_function)
}
}
- 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;
diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c
index c31058cd39..769e1e3f67 100644
--- a/src/mod/applications/mod_conference/mod_conference.c
+++ b/src/mod/applications/mod_conference/mod_conference.c
@@ -3663,8 +3663,8 @@ SWITCH_STANDARD_API(conf_api_main)
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) {
diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c
index 1c3adb5d83..cefbd8a716 100644
--- a/src/mod/applications/mod_voicemail/mod_voicemail.c
+++ b/src/mod/applications/mod_voicemail/mod_voicemail.c
@@ -2417,8 +2417,8 @@ static void do_del(vm_profile_t *profile, char *user, char *domain, char *file,
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 @@ SWITCH_STANDARD_API(voicemail_api_function)
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)) {
diff --git a/src/mod/endpoints/mod_alsa/mod_alsa.c b/src/mod/endpoints/mod_alsa/mod_alsa.c
index 4bc23e2a26..c6f72033da 100644
--- a/src/mod/endpoints/mod_alsa/mod_alsa.c
+++ b/src/mod/endpoints/mod_alsa/mod_alsa.c
@@ -1532,8 +1532,8 @@ SWITCH_STANDARD_API(pa_cmd)
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 @@ SWITCH_STANDARD_API(pa_cmd)
#if 0
switch_event_header_t *hp;
stream->write_function(stream, "
");
- 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, "
");
@@ -1561,8 +1561,8 @@ SWITCH_STANDARD_API(pa_cmd)
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) {
diff --git a/src/mod/endpoints/mod_portaudio/mod_portaudio.c b/src/mod/endpoints/mod_portaudio/mod_portaudio.c
index ece5e3ba35..d8031835e0 100644
--- a/src/mod/endpoints/mod_portaudio/mod_portaudio.c
+++ b/src/mod/endpoints/mod_portaudio/mod_portaudio.c
@@ -1542,15 +1542,15 @@ SWITCH_STANDARD_API(pa_cmd)
"pa outdev #|\n"
"pa ringdev #|\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) {
diff --git a/src/mod/formats/mod_shout/mod_shout.c b/src/mod/formats/mod_shout/mod_shout.c
index 3dea206d30..5b3374dbae 100644
--- a/src/mod/formats/mod_shout/mod_shout.c
+++ b/src/mod/formats/mod_shout/mod_shout.c
@@ -1032,7 +1032,7 @@ static int web_callback(void *pArg, int argc, char **argv, char **columnNames)
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 @@ void do_telecast(switch_stream_handle_t *stream)
}
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\nNot Found!
\n"
"", ref);
} else {
@@ -1140,7 +1140,7 @@ void do_telecast(switch_stream_handle_t *stream)
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 @@ void do_index(switch_stream_handle_t *stream)
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 @@ SWITCH_STANDARD_API(telecast_api_function)
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) {
diff --git a/src/mod/languages/mod_lua/mod_lua.cpp b/src/mod/languages/mod_lua/mod_lua.cpp
index ab5c4c9241..9569b935a2 100644
--- a/src/mod/languages/mod_lua/mod_lua.cpp
+++ b/src/mod/languages/mod_lua/mod_lua.cpp
@@ -346,12 +346,12 @@ SWITCH_STANDARD_API(lua_api_function) {
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\nError Executing Script
");
} else {
stream->write_function(stream, "-ERR encounterd\n");
diff --git a/src/mod/languages/mod_perl/mod_perl.c b/src/mod/languages/mod_perl/mod_perl.c
index fe09cab64e..a5696a79ef 100644
--- a/src/mod/languages/mod_perl/mod_perl.c
+++ b/src/mod/languages/mod_perl/mod_perl.c
@@ -266,8 +266,8 @@ static void *SWITCH_THREAD_FUNC perl_thread_run(switch_thread_t *thread, void *o
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);
diff --git a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
index e302125bd3..0b1b9b40c0 100644
--- a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
+++ b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
@@ -196,7 +196,7 @@ static JSBool request_add_header(JSContext *cx, JSObject *obj, uintN argc, jsval
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 @@ static JSBool request_get_header(JSContext * cx, JSObject * obj, uintN argc, jsv
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 @@ static JSBool request_dump_env(JSContext *cx, JSObject *obj, uintN argc, jsval *
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 @@ SWITCH_STANDARD_API(jsapi_function)
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) {
diff --git a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
index fb7deef552..978f3898d5 100644
--- a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
+++ b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
@@ -519,32 +519,32 @@ abyss_bool handler_hook(TSession * r)
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 @@ abyss_bool handler_hook(TSession * r)
}
}
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 @@ abyss_bool handler_hook(TSession * r)
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);
diff --git a/src/switch_loadable_module.c b/src/switch_loadable_module.c
index 1a2c2fbd61..aaee2010d9 100644
--- a/src/switch_loadable_module.c
+++ b/src/switch_loadable_module.c
@@ -1341,16 +1341,16 @@ SWITCH_DECLARE(switch_status_t) switch_api_execute(const char *cmd, const char *
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 @@ SWITCH_DECLARE(switch_status_t) switch_api_execute(const char *cmd, const char *
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);
}