From: Michael Jerris Date: Fri, 26 Dec 2008 18:11:31 +0000 (+0000) Subject: fix /log X-Git-Tag: v1.0.2~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db6f99ba336f7df1f4064ee132761a5190358739;p=thirdparty%2Ffreeswitch.git fix /log git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10952 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/libs/esl/fs_cli.c b/libs/esl/fs_cli.c index a4941a7e33..af73d19442 100644 --- a/libs/esl/fs_cli.c +++ b/libs/esl/fs_cli.c @@ -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) { - char cmd_str[1024]; - if ( !strcasecmp(cmd, "exit") || !strcasecmp(cmd, "quit") || @@ -140,8 +138,7 @@ static int process_command(esl_handle_t *handle, const char *cmd) !strncasecmp(cmd, "filter", 6) ) { - snprintf(cmd_str, sizeof(cmd_str), "%s\n\n", cmd); - esl_send_recv(handle, cmd_str); + esl_send_recv(handle, cmd); printf("%s\n", handle->last_sr_reply); diff --git a/libs/esl/src/esl.c b/libs/esl/src/esl.c index 19bb3d0701..1a0b2973a3 100644 --- a/libs/esl/src/esl.c +++ b/libs/esl/src/esl.c @@ -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 (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)); return ESL_FAIL; }