[Freeswitch-trunk] [commit] r12623 - freeswitch/trunk/libs/esl/src
FreeSWITCH SVN
mrene at freeswitch.org
Mon Mar 16 11:35:31 PDT 2009
Author: mrene
Date: Mon Mar 16 13:35:31 2009
New Revision: 12623
Log:
ESL-8
Modified:
freeswitch/trunk/libs/esl/src/esl_oop.cpp
Modified: freeswitch/trunk/libs/esl/src/esl_oop.cpp
==============================================================================
--- freeswitch/trunk/libs/esl/src/esl_oop.cpp (original)
+++ freeswitch/trunk/libs/esl/src/esl_oop.cpp Mon Mar 16 13:35:31 2009
@@ -65,11 +65,11 @@
len = strlen(cmd) + (arg ? strlen(arg) : 0) + 10;
- cmd_buf = (char *) malloc(len);
+ cmd_buf = (char *) malloc(len + 1);
assert(cmd_buf);
snprintf(cmd_buf, len, "api %s %s", cmd, arg ? arg : "");
- *(cmd_buf + (len + 1)) = '\0';
+ *(cmd_buf + (len)) = '\0';
if (esl_send_recv(&handle, cmd_buf) == ESL_SUCCESS) {
@@ -94,11 +94,11 @@
len = strlen(cmd) + (arg ? strlen(arg) : 0) + 10;
- cmd_buf = (char *) malloc(len);
+ cmd_buf = (char *) malloc(len + 1);
assert(cmd_buf);
snprintf(cmd_buf, len, "bgapi %s %s", cmd, arg ? arg : "");
- *(cmd_buf + (len + 1)) = '\0';
+ *(cmd_buf + (len)) = '\0';
if (esl_send_recv(&handle, cmd_buf) == ESL_SUCCESS) {
esl_event_t *event;
More information about the Freeswitch-trunk
mailing list