mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-18 17:41:53 +00:00
Remove some code we don't use
This commit is contained in:
parent
6fc68a4aa9
commit
3798c39177
src/mod/event_handlers/mod_erlang_event
@ -86,23 +86,6 @@ static switch_status_t socket_logger(const switch_log_node_t *node, switch_log_l
|
||||
}
|
||||
|
||||
|
||||
static void expire_listener(listener_t ** listener)
|
||||
{
|
||||
void *pop;
|
||||
|
||||
switch_thread_rwlock_unlock((*listener)->rwlock);
|
||||
switch_core_hash_destroy(&(*listener)->event_hash);
|
||||
switch_core_destroy_memory_pool(&(*listener)->pool);
|
||||
|
||||
while (switch_queue_trypop((*listener)->event_queue, &pop) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_event_t *pevent = (switch_event_t *) pop;
|
||||
switch_event_destroy(&pevent);
|
||||
}
|
||||
|
||||
*listener = NULL;
|
||||
}
|
||||
|
||||
|
||||
static void remove_binding(listener_t *listener, erlang_pid * pid)
|
||||
{
|
||||
struct erlang_binding *ptr, *lst = NULL;
|
||||
@ -211,13 +194,6 @@ static void event_handler(switch_event_t *event)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (switch_test_flag(l, LFLAG_STATEFUL) && l->timeout && switch_epoch_time_now(NULL) - l->last_flush > l->timeout) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Stateful Listener %u has expired\n", l->id);
|
||||
remove_listener(l);
|
||||
expire_listener(&l);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (l->event_list[SWITCH_EVENT_ALL]) {
|
||||
send = 1;
|
||||
} else if ((l->event_list[event->event_id])) {
|
||||
|
@ -134,8 +134,6 @@ struct listener {
|
||||
switch_hash_t *sessions;
|
||||
int lost_events;
|
||||
int lost_logs;
|
||||
time_t last_flush;
|
||||
uint32_t timeout;
|
||||
uint32_t id;
|
||||
char remote_ip[50];
|
||||
/*switch_port_t remote_port; */
|
||||
@ -166,6 +164,7 @@ struct globals_struct {
|
||||
switch_event_node_t *node;
|
||||
switch_mutex_t *ref_mutex;
|
||||
switch_mutex_t *fetch_reply_mutex;
|
||||
switch_mutex_t *listener_count_mutex;
|
||||
switch_hash_t *fetch_reply_hash;
|
||||
unsigned int reference0;
|
||||
unsigned int reference1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user