make callback stuff work on mod_perl

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8247 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-05-02 13:58:44 +00:00
parent be276e0cfe
commit 2b5f3563a2
7 changed files with 38 additions and 99 deletions
+10 -6
View File
@@ -154,8 +154,11 @@ SWITCH_DECLARE(bool) Event::fire(void)
}
if (event) {
switch_event_fire(&event);
return true;
switch_event_t *new_event;
if (switch_event_dup(&new_event, event) == SWITCH_STATUS_SUCCESS) {
switch_event_fire(&new_event);
return true;
}
}
return false;
}
@@ -416,10 +419,11 @@ SWITCH_DECLARE(void) CoreSession::setDTMFCallback(void *cbfunc, char *funcargs)
SWITCH_DECLARE(void) CoreSession::sendEvent(Event *sendME)
{
if (sendME->mine) {
switch_core_session_receive_event(session, &sendME->event);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "Not My event!\n");
if (sendME->event) {
switch_event_t *new_event;
if (switch_event_dup(&new_event, sendME->event) == SWITCH_STATUS_SUCCESS) {
switch_core_session_receive_event(session, &new_event);
}
}
}