- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitb67c9c1
committed
Fix poor errno handling in libpq's version of our custom OpenSSL BIO.
Thom Brown reported that SSL connections didn't seem to work on Windows in9.5. Asif Naeem figured out that the cause was my_sock_read() looking at"errno" when it needs to look at "SOCK_ERRNO". This mistake was introducedin commit680513a, which cloned thebackend's custom SSL BIO code into libpq, and didn't translate the errnohandling properly. Moreover, it introduced unnecessary errno save/restorelogic, which was particularly confusing because it was incomplete; and itfailed to check for all three of EINTR, EAGAIN, and EWOULDBLOCK inmy_sock_write. (That might not be necessary; but since we're copyingwell-tested backend code that does do that, it seems prudent to copy itfaithfully.)1 parentce58502 commitb67c9c1
1 file changed
+16
-8
lines changedLines changed: 16 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1598 | 1598 |
| |
1599 | 1599 |
| |
1600 | 1600 |
| |
1601 |
| - | |
1602 | 1601 |
| |
1603 | 1602 |
| |
1604 |
| - | |
1605 | 1603 |
| |
1606 | 1604 |
| |
1607 | 1605 |
| |
1608 |
| - | |
| 1606 | + | |
| 1607 | + | |
1609 | 1608 |
| |
1610 | 1609 |
| |
1611 | 1610 |
| |
| |||
1622 | 1621 |
| |
1623 | 1622 |
| |
1624 | 1623 |
| |
1625 |
| - | |
1626 | 1624 |
| |
1627 | 1625 |
| |
1628 | 1626 |
| |
1629 | 1627 |
| |
1630 | 1628 |
| |
1631 | 1629 |
| |
1632 | 1630 |
| |
1633 |
| - | |
1634 | 1631 |
| |
1635 | 1632 |
| |
1636 |
| - | |
1637 | 1633 |
| |
1638 | 1634 |
| |
1639 | 1635 |
| |
1640 |
| - | |
| 1636 | + | |
| 1637 | + | |
1641 | 1638 |
| |
1642 |
| - | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
1643 | 1651 |
| |
1644 | 1652 |
| |
1645 | 1653 |
| |
|
0 commit comments
Comments
(0)