This commit is contained in:
Mathieu Rene 2010-07-16 23:35:03 -04:00
parent 9f7e98e01f
commit 83891a11d4
1 changed files with 5 additions and 4 deletions

View File

@ -484,9 +484,9 @@ SWITCH_STANDARD_API(hash_dump_function)
if (!strcmp(cmd, "all")) {
mode = 3;
} else if (!strcmp(cmd, "limit")) {
mode = 2;
} else if (!strcmp(cmd, "db")) {
mode = 1;
} else if (!strcmp(cmd, "db")) {
mode = 2;
} else {
stream->write_function(stream, "Usage: "HASH_DUMP_SYNTAX"\n");
return SWITCH_STATUS_SUCCESS;
@ -608,13 +608,14 @@ static void *SWITCH_THREAD_FUNC limit_remote_thread(switch_thread_t *thread, voi
remote->host, remote->port);
}
} else {
if (esl_send_recv(&remote->handle, "api hash_dump limit") != SWITCH_STATUS_SUCCESS) {
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);
memset(&remote->handle, 0, sizeof(remote->handle));
remote->state = REMOTE_DOWN;
} else {
const char *data = remote->handle.last_sr_reply;
const char *data = esl_event_get_header(remote->handle.last_sr_event, "reply-text");
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "RECV: %s\n", data);
}
}