mod_hash: fix build
This commit is contained in:
parent
74c40f5aa3
commit
a31222acba
|
@ -899,6 +899,7 @@ AC_CONFIG_FILES([Makefile
|
|||
src/mod/applications/mod_fax/Makefile
|
||||
src/mod/applications/mod_spandsp/Makefile
|
||||
src/mod/applications/mod_stress/Makefile
|
||||
src/mod/applications/mod_hash/Makefile
|
||||
src/mod/endpoints/mod_portaudio/Makefile
|
||||
src/mod/endpoints/mod_skinny/Makefile
|
||||
src/mod/endpoints/mod_skypopen/Makefile
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
LOCAL_CFLAGS=-I../../../../libs/esl/src/include
|
||||
LOCAL_LDFLAGS=-L../../../../libs/esl -lesl
|
||||
BASE=../../../..
|
||||
include $(BASE)/build/modmake.rules
|
|
@ -0,0 +1,13 @@
|
|||
include $(top_srcdir)/build/modmake.rulesam
|
||||
|
||||
MODNAME=mod_hash
|
||||
ESL_DIR=$(switch_srcdir)/libs/esl
|
||||
|
||||
mod_LTLIBRARIES = mod_hash.la
|
||||
mod_hash_la_SOURCES = mod_hash.c
|
||||
mod_hash_la_CFLAGS = $(AM_CFLAGS) -I$(ESL_DIR)/src/include
|
||||
mod_hash_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(ESL_DIR)/libesl.so
|
||||
mod_hash_la_LDFLAGS = -avoid-version -module -no-undefined -shared -L$(ESL_DIR) -lesl
|
||||
|
||||
$(ESL_DIR)/libesl.so:
|
||||
cd $(ESL_DIR) && $(MAKE) -j1
|
|
@ -744,16 +744,16 @@ static void *SWITCH_THREAD_FUNC limit_remote_thread(switch_thread_t *thread, voi
|
|||
while (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);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Connected to remote FreeSWITCH (%s) at %s:%d\n",
|
||||
remote->name, remote->host, remote->port);
|
||||
|
||||
remote->state = REMOTE_UP;
|
||||
}
|
||||
} else {
|
||||
if (esl_send_recv(&remote->handle, "api hash_dump limit") != ESL_SUCCESS) {
|
||||
esl_disconnect(&remote->handle);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Disconnected from remote FreeSWITCH at %s:%d\n",
|
||||
remote->host, remote->port);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Disconnected from remote FreeSWITCH (%s) at %s:%d\n",
|
||||
remote->name, remote->host, remote->port);
|
||||
memset(&remote->handle, 0, sizeof(remote->handle));
|
||||
remote->state = REMOTE_DOWN;
|
||||
/* Delete all remote tracking entries */
|
||||
|
@ -780,7 +780,8 @@ static void *SWITCH_THREAD_FUNC limit_remote_thread(switch_thread_t *thread, voi
|
|||
int argc = switch_split(p+2, '/', argv);
|
||||
|
||||
if (argc < 5) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Protocol error: missing argument in line: %s\n", p);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "[%s] Protocol error: missing argument in line: %s\n",
|
||||
remote->name, p);
|
||||
} else {
|
||||
limit_hash_item_t *item;
|
||||
switch_thread_rwlock_wrlock(remote->rwlock);
|
||||
|
|
Loading…
Reference in New Issue