| 1697 | } |
| 1698 | |
| 1699 | static int |
| 1700 | my_sock_write(BIO *h, const char *buf, int size) |
| 1701 | { |
| 1702 | int res; |
| 1703 | |
| 1704 | res = pqsecure_raw_write((PGconn *) BIO_get_app_data(h), buf, size); |
| 1705 | BIO_clear_retry_flags(h); |
| 1706 | if (res < 0) |
| 1707 | { |
| 1708 | /* If we were interrupted, tell caller to retry */ |
| 1709 | switch (SOCK_ERRNO) |
| 1710 | { |
| 1711 | #ifdef EAGAIN |
| 1712 | case EAGAIN: |
| 1713 | #endif |
| 1714 | #if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN)) |
| 1715 | case EWOULDBLOCK: |
| 1716 | #endif |
| 1717 | case EINTR: |
| 1718 | BIO_set_retry_write(h); |
| 1719 | break; |
| 1720 | |
| 1721 | default: |
| 1722 | break; |
| 1723 | } |
| 1724 | } |
| 1725 | |
| 1726 | return res; |
| 1727 | } |
| 1728 | |
| 1729 | static BIO_METHOD * |
| 1730 | my_BIO_s_socket(void) |
nothing calls this directly
no test coverage detected