pgsql: check socket creation errors against PGINVALID_SOCKET

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: check socket creation errors against PGINVALID_SOCKET
Date: 2014-04-16 14:46:01
Message-ID: [email protected]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/966f015b60d90f6450cbadcbfa89e21408fe52f9

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2014-04-16 15:24:44 pgsql: doc: fix json_extract_path_text() typo by adding jsonb
Previous Message Bruce Momjian 2014-04-16 14:46:00 pgsql: check socket creation errors against PGINVALID_SOCKET