[Freeswitch-svn] [commit] r4327 - in freeswitch/trunk/src: . include
Freeswitch SVN
brian at freeswitch.org
Mon Feb 19 16:06:28 EST 2007
Author: brian
Date: Mon Feb 19 16:06:27 2007
New Revision: 4327
Modified:
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/switch_core.c
freeswitch/trunk/src/switch_event.c
freeswitch/trunk/src/switch_ivr.c
Log:
making private events fire (please test)
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Mon Feb 19 16:06:27 2007
@@ -746,6 +746,7 @@
SWITCH_EVENT_CODEC - Codec Change
SWITCH_EVENT_BACKGROUND_JOB - Background Job
SWITCH_EVENT_DETECTED_SPEECH - Detected Speech
+ SWITCH_EVENT_PRIVATE_COMMAND - A private command event
SWITCH_EVENT_ALL - All events at once
</pre>
@@ -785,6 +786,7 @@
SWITCH_EVENT_CODEC,
SWITCH_EVENT_BACKGROUND_JOB,
SWITCH_EVENT_DETECTED_SPEECH,
+ SWITCH_EVENT_PRIVATE_COMMAND,
SWITCH_EVENT_ALL
} switch_event_types_t;
Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c (original)
+++ freeswitch/trunk/src/switch_core.c Mon Feb 19 16:06:27 2007
@@ -1909,6 +1909,7 @@
}
if (session->private_event_queue) {
+ (*event)->event_id = SWITCH_EVENT_PRIVATE_COMMAND;
if (switch_queue_trypush(session->private_event_queue, *event) == SWITCH_STATUS_SUCCESS) {
*event = NULL;
switch_core_session_kill_channel(session, SWITCH_SIG_BREAK);
Modified: freeswitch/trunk/src/switch_event.c
==============================================================================
--- freeswitch/trunk/src/switch_event.c (original)
+++ freeswitch/trunk/src/switch_event.c Mon Feb 19 16:06:27 2007
@@ -130,6 +130,7 @@
"CODEC",
"BACKGROUND_JOB",
"DETECTED_SPEECH",
+ "PRIVATE_COMMAND",
"ALL"
};
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Mon Feb 19 16:06:27 2007
@@ -98,6 +98,7 @@
unsigned long CMD_NOMEDIA = apr_hashfunc_default("nomedia", &hlen);
assert(channel != NULL);
+ assert(event != NULL);
if (switch_strlen_zero(cmd)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Command!\n");
@@ -170,7 +171,7 @@
if (switch_core_session_dequeue_private_event(session, &event) == SWITCH_STATUS_SUCCESS) {
switch_ivr_parse_event(session, event);
- switch_event_destroy(&event);
+ switch_event_fire(&event);
}
if (switch_channel_has_dtmf(channel)) {
More information about the Freeswitch-svn
mailing list