pgsql: check socket creation errors against PGINVALID_SOCKET - Mailing list pgsql-committers

From Bruce Momjian
Subject pgsql: check socket creation errors against PGINVALID_SOCKET
Date
Msg-id E1WaR68-0007KC-Vj@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f716c3250adeed22f1ea1b1cb93e4782a202856a

Modified Files
--------------
src/backend/libpq/auth.c            |    6 +++---
src/backend/libpq/ip.c              |   10 +++++-----
src/backend/libpq/pqcomm.c          |    4 ++--
src/backend/port/win32/socket.c     |    2 +-
src/backend/postmaster/postmaster.c |    2 +-
src/interfaces/libpq/fe-connect.c   |   34 +++++++++++++++++++++++++++++-----
src/interfaces/libpq/libpq-int.h    |    1 +
7 files changed, 42 insertions(+), 17 deletions(-)


pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: check socket creation errors against PGINVALID_SOCKET
Next
From: Bruce Momjian
Date:
Subject: pgsql: check socket creation errors against PGINVALID_SOCKET