From 9f7e98e01fd81b58b75a3ba581505b0150252f23 Mon Sep 17 00:00:00 2001 From: Mathieu Rene Date: Fri, 16 Jul 2010 23:06:27 -0400 Subject: [PATCH] add missing makefile --- src/mod/applications/mod_hash/Makefile | 4 ++++ src/mod/applications/mod_hash/mod_hash.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 src/mod/applications/mod_hash/Makefile diff --git a/src/mod/applications/mod_hash/Makefile b/src/mod/applications/mod_hash/Makefile new file mode 100644 index 0000000000..0ee5f7731f --- /dev/null +++ b/src/mod/applications/mod_hash/Makefile @@ -0,0 +1,4 @@ +LOCAL_CFLAGS=-I../../../../libs/esl/src/include +LOCAL_LDFLAGS=-L../../../../libs/esl -lesl +BASE=../../../.. +include $(BASE)/build/modmake.rules diff --git a/src/mod/applications/mod_hash/mod_hash.c b/src/mod/applications/mod_hash/mod_hash.c index 0be78670e7..0d86c4d591 100644 --- a/src/mod/applications/mod_hash/mod_hash.c +++ b/src/mod/applications/mod_hash/mod_hash.c @@ -597,14 +597,14 @@ static void *SWITCH_THREAD_FUNC limit_remote_thread(switch_thread_t *thread, voi { limit_remote_t *remote = (limit_remote_t*)obj; while (remote->state > REMOTE_OFF) { - if (remote->state == REMOTE_OFF) { + if (remote->state != REMOTE_UP) { if (esl_connect(&remote->handle, remote->host, remote->port, remote->username, remote->password) == ESL_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Connected to remote FreeSWITCH at %s:%d\n", remote->host, remote->port); remote->state = REMOTE_UP; } else { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't connect to remote FreeSWITCH at %s;%d\n", + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't connect to remote FreeSWITCH at %s:%d\n", remote->host, remote->port); } } else { @@ -661,6 +661,7 @@ static void do_config() switch_thread_create(&remote->thread, thd_attr, limit_remote_thread, remote, remote->pool); } } + switch_xml_free(xml); } }