提交 3798c391 authored 作者: Andrew Thompson's avatar Andrew Thompson

Remove some code we don't use

上级 6fc68a4a
......@@ -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;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论