handle EINTER case on write
This commit is contained in:
parent
63638f34b8
commit
7961c2266d
|
@ -1577,7 +1577,8 @@ static switch_status_t t38_gateway_on_consume_media(switch_core_session_t *sessi
|
|||
if (!switch_test_flag(read_frame, SFF_CNG)) {
|
||||
|
||||
if (read_fd != FAX_INVALID_SOCKET) {
|
||||
write(read_fd, read_frame->data, read_frame->datalen);
|
||||
switch_ssize_t rv;
|
||||
do { rv = write(read_fd, read_frame->data, read_frame->datalen); } while (rv == -1 && errno == EINTR);
|
||||
}
|
||||
if (t38_gateway_rx(pvt->t38_gateway_state, (int16_t *) read_frame->data, read_frame->samples)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "fax_rx reported an error\n");
|
||||
|
@ -1600,7 +1601,8 @@ static switch_status_t t38_gateway_on_consume_media(switch_core_session_t *sessi
|
|||
}
|
||||
|
||||
if (write_fd != FAX_INVALID_SOCKET) {
|
||||
write(write_fd, write_frame.data, write_frame.datalen);
|
||||
switch_ssize_t rv;
|
||||
do { rv = write(write_fd, write_frame.data, write_frame.datalen); } while (rv == -1 && errno == EINTR);
|
||||
}
|
||||
|
||||
if (switch_core_session_write_frame(session, &write_frame, SWITCH_IO_FLAG_NONE, 0) != SWITCH_STATUS_SUCCESS) {
|
||||
|
|
Loading…
Reference in New Issue