diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/idevice.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/idevice.c b/src/idevice.c index 7b3625e..d3f28c2 100644 --- a/src/idevice.c +++ b/src/idevice.c | |||
| @@ -549,7 +549,20 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_send(idevice_connection_ | |||
| 549 | uint32_t sent = 0; | 549 | uint32_t sent = 0; |
| 550 | while (sent < len) { | 550 | while (sent < len) { |
| 551 | #ifdef HAVE_OPENSSL | 551 | #ifdef HAVE_OPENSSL |
| 552 | int c = socket_check_fd((int)(long)connection->data, FDM_WRITE, 100); | ||
| 553 | if (c < 0) { | ||
| 554 | break; | ||
| 555 | } else if (c == 0) { | ||
| 556 | continue; | ||
| 557 | } | ||
| 552 | int s = SSL_write(connection->ssl_data->session, (const void*)(data+sent), (int)(len-sent)); | 558 | int s = SSL_write(connection->ssl_data->session, (const void*)(data+sent), (int)(len-sent)); |
| 559 | if (s <= 0) { | ||
| 560 | int sslerr = SSL_get_error(connection->ssl_data->session, s); | ||
| 561 | if (sslerr == SSL_ERROR_WANT_WRITE) { | ||
| 562 | continue; | ||
| 563 | } | ||
| 564 | break; | ||
| 565 | } | ||
| 553 | #else | 566 | #else |
| 554 | ssize_t s = gnutls_record_send(connection->ssl_data->session, (void*)(data+sent), (size_t)(len-sent)); | 567 | ssize_t s = gnutls_record_send(connection->ssl_data->session, (void*)(data+sent), (size_t)(len-sent)); |
| 555 | #endif | 568 | #endif |
