From 2dbc6f85ca540bdce7e0f1648fbc9d9554beb2c1 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 2 Mar 2009 22:19:36 +0000 Subject: [PATCH] ESL-4 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12360 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/esl/src/esl_oop.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/esl/src/esl_oop.cpp b/libs/esl/src/esl_oop.cpp index f34125a210..c7895b38aa 100644 --- a/libs/esl/src/esl_oop.cpp +++ b/libs/esl/src/esl_oop.cpp @@ -69,7 +69,8 @@ ESLevent *ESLconnection::api(const char *cmd, const char *arg) assert(cmd_buf); snprintf(cmd_buf, len, "api %s %s", cmd, arg ? arg : ""); - *(cmd_buf + len) = '\0'; + *(cmd_buf + (len + 1)) = '\0'; + if (esl_send_recv(&handle, cmd_buf) == ESL_SUCCESS) { esl_event_t *event;