git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10946 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-12-26 16:43:03 +00:00
parent 4eff9b1b32
commit e8249d73d5
1 changed files with 7 additions and 3 deletions

View File

@ -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);
}
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));
return ESL_FAIL;
}
@ -884,7 +884,11 @@ ESL_DECLARE(esl_status_t) esl_send_recv(esl_handle_t *handle, const char *cmd)
esl_status_t status;
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);
if (handle->last_sr_event) {