check socket creation errors against PGINVALID_SOCKET
Bruce Momjian <bruce@momjian.us>
check socket creation errors against PGINVALID_SOCKET Previously, in some places, socket creation errors were checked for negative values, which is not true for Windows because sockets are unsigned. This masked socket creation errors on Windows. Backpatch through 9.0. 8.4 doesn't have the infrastructure to fix this.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/libpq/auth.c | modified | +3 −3 |
| src/backend/libpq/ip.c | modified | +5 −5 |
| src/backend/libpq/pqcomm.c | modified | +2 −2 |
| src/backend/port/win32/socket.c | modified | +1 −1 |
| src/backend/postmaster/postmaster.c | modified | +1 −1 |
| src/interfaces/libpq/fe-connect.c | modified | +29 −5 |
| src/interfaces/libpq/libpq-int.h | modified | +1 −0 |