mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-31 02:43:32 +00:00
fix /log
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10952 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
b899c073e0
commit
db6f99ba33
@ -121,8 +121,6 @@ static void *msg_thread_run(esl_thread_t *me, void *obj)
|
|||||||
|
|
||||||
static int process_command(esl_handle_t *handle, const char *cmd)
|
static int process_command(esl_handle_t *handle, const char *cmd)
|
||||||
{
|
{
|
||||||
char cmd_str[1024];
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!strcasecmp(cmd, "exit") ||
|
!strcasecmp(cmd, "exit") ||
|
||||||
!strcasecmp(cmd, "quit") ||
|
!strcasecmp(cmd, "quit") ||
|
||||||
@ -140,8 +138,7 @@ static int process_command(esl_handle_t *handle, const char *cmd)
|
|||||||
!strncasecmp(cmd, "filter", 6)
|
!strncasecmp(cmd, "filter", 6)
|
||||||
) {
|
) {
|
||||||
|
|
||||||
snprintf(cmd_str, sizeof(cmd_str), "%s\n\n", cmd);
|
esl_send_recv(handle, cmd);
|
||||||
esl_send_recv(handle, cmd_str);
|
|
||||||
|
|
||||||
printf("%s\n", handle->last_sr_reply);
|
printf("%s\n", handle->last_sr_reply);
|
||||||
|
|
||||||
|
@ -867,7 +867,7 @@ ESL_DECLARE(esl_status_t) esl_send(esl_handle_t *handle, const char *cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(*e == '\n' && *(e-1) == '\n')) {
|
if (!(*e == '\n' && *(e-1) == '\n')) {
|
||||||
if (send(handle->sock, "\n\n", 2, 0)) {
|
if (send(handle->sock, "\n\n", 2, 0) != 2) {
|
||||||
strerror_r(handle->errnum, handle->err, sizeof(handle->err));
|
strerror_r(handle->errnum, handle->err, sizeof(handle->err));
|
||||||
return ESL_FAIL;
|
return ESL_FAIL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user