提交 e8249d73 authored 作者: Anthony Minessale's avatar Anthony Minessale

fix bug

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10946 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 4eff9b1b
...@@ -861,7 +861,7 @@ ESL_DECLARE(esl_status_t) esl_send(esl_handle_t *handle, const char *cmd) ...@@ -861,7 +861,7 @@ ESL_DECLARE(esl_status_t) esl_send(esl_handle_t *handle, const char *cmd)
esl_log(ESL_LOG_DEBUG, "SEND\n%s\n", cmd); esl_log(ESL_LOG_DEBUG, "SEND\n%s\n", cmd);
} }
if (send(handle->sock, cmd, strlen(cmd), 0)) { if (send(handle->sock, cmd, strlen(cmd), 0) != strlen(cmd)) {
strerror_r(handle->errnum, handle->err, sizeof(handle->err)); strerror_r(handle->errnum, handle->err, sizeof(handle->err));
return ESL_FAIL; return ESL_FAIL;
} }
...@@ -884,7 +884,11 @@ ESL_DECLARE(esl_status_t) esl_send_recv(esl_handle_t *handle, const char *cmd) ...@@ -884,7 +884,11 @@ ESL_DECLARE(esl_status_t) esl_send_recv(esl_handle_t *handle, const char *cmd)
esl_status_t status; esl_status_t status;
esl_mutex_lock(handle->mutex); esl_mutex_lock(handle->mutex);
esl_send(handle, cmd);
if ((status = esl_send(handle, cmd))) {
return status;
}
status = esl_recv_event(handle, &handle->last_sr_event); status = esl_recv_event(handle, &handle->last_sr_event);
if (handle->last_sr_event) { if (handle->last_sr_event) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论