event cleanup from windows perspective

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@204 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2005-12-23 21:09:36 +00:00
parent 3643ad3037
commit f3d711ccae
13 changed files with 102 additions and 100 deletions
+1 -1
View File
@@ -271,7 +271,7 @@ static switch_status channel_on_transmit(switch_core_session *session)
snprintf(buf, sizeof(buf), "BRRRRING! BRRRRING! call %s\n", tech_pvt->call_id);
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, MY_EVENT_RINGING) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header(event, "event_info", buf);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_info", buf);
switch_event_fire(&event);
}
+7 -2
View File
@@ -62,9 +62,14 @@ static void event_handler (switch_event *event)
{
char buf[1024];
iks *msg;
int loops = 0;
if (!globals.session.authorized) {
return;
while (!globals.session.authorized) {
switch_yield(100000);
if (loops++ > 5) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Nothing to do with this Event!\n");
return;
}
}
switch(event->event_id) {