mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-13 14:54:17 +00:00
fix some contention issues under really high load...That doesn't mean you need to push it this hard and bug me about it =p
This commit is contained in:
1 parent
feb38cece2
commit
f60962ae87
7 files changed
+89
-78
No files matched your search
@@ -6498,6 +6498,9 @@ switch_bool_t sofia_glue_execute_sql_callback(sofia_profile_t *profile,
|
||||
|
||||
switch_cache_db_release_db_handle(&dbh);
|
||||
|
||||
|
||||
sofia_glue_fire_events(profile);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -7139,6 +7142,23 @@ char *sofia_glue_get_host(const char *str, switch_memory_pool_t *pool)
|
||||
return s;
|
||||
}
|
||||
|
||||
void sofia_glue_fire_events(sofia_profile_t *profile)
|
||||
{
|
||||
void *pop = NULL;
|
||||
|
||||
while (profile->event_queue && switch_queue_trypop(profile->event_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) {
|
||||
switch_event_t *event = (switch_event_t *) pop;
|
||||
switch_event_fire(&event);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void sofia_event_fire(sofia_profile_t *profile, switch_event_t **event)
|
||||
{
|
||||
switch_queue_push(profile->event_queue, *event);
|
||||
*event = NULL;
|
||||
}
|
||||
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
|
||||
Reference in new issue
Block a user