| 1667 | static BIO_METHOD *my_bio_methods; |
| 1668 | |
| 1669 | static int |
| 1670 | my_sock_read(BIO *h, char *buf, int size) |
| 1671 | { |
| 1672 | int res; |
| 1673 | |
| 1674 | res = pqsecure_raw_read((PGconn *) BIO_get_app_data(h), buf, size); |
| 1675 | BIO_clear_retry_flags(h); |
| 1676 | if (res < 0) |
| 1677 | { |
| 1678 | /* If we were interrupted, tell caller to retry */ |
| 1679 | switch (SOCK_ERRNO) |
| 1680 | { |
| 1681 | #ifdef EAGAIN |
| 1682 | case EAGAIN: |
| 1683 | #endif |
| 1684 | #if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN)) |
| 1685 | case EWOULDBLOCK: |
| 1686 | #endif |
| 1687 | case EINTR: |
| 1688 | BIO_set_retry_read(h); |
| 1689 | break; |
| 1690 | |
| 1691 | default: |
| 1692 | break; |
| 1693 | } |
| 1694 | } |
| 1695 | |
| 1696 | return res; |
| 1697 | } |
| 1698 | |
| 1699 | static int |
| 1700 | my_sock_write(BIO *h, const char *buf, int size) |
nothing calls this directly
no test coverage detected