Commit 3f10d21e authored by Bruce Momjian's avatar Bruce Momjian

Move more tcp keepalive macros to be consistent.

parent 45d9d90c
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.206 2010/03/13 15:35:46 momjian Exp $ * $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.207 2010/03/13 16:40:38 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1346,10 +1346,10 @@ pq_getkeepalivesidle(Port *port) ...@@ -1346,10 +1346,10 @@ pq_getkeepalivesidle(Port *port)
int int
pq_setkeepalivesidle(int idle, Port *port) pq_setkeepalivesidle(int idle, Port *port)
{ {
#ifdef TCP_KEEPIDLE
if (port == NULL || IS_AF_UNIX(port->laddr.addr.ss_family)) if (port == NULL || IS_AF_UNIX(port->laddr.addr.ss_family))
return STATUS_OK; return STATUS_OK;
#ifdef TCP_KEEPIDLE
if (idle == port->keepalives_idle) if (idle == port->keepalives_idle)
return STATUS_OK; return STATUS_OK;
...@@ -1490,10 +1490,10 @@ pq_getkeepalivescount(Port *port) ...@@ -1490,10 +1490,10 @@ pq_getkeepalivescount(Port *port)
int int
pq_setkeepalivescount(int count, Port *port) pq_setkeepalivescount(int count, Port *port)
{ {
#ifdef TCP_KEEPCNT
if (port == NULL || IS_AF_UNIX(port->laddr.addr.ss_family)) if (port == NULL || IS_AF_UNIX(port->laddr.addr.ss_family))
return STATUS_OK; return STATUS_OK;
#ifdef TCP_KEEPCNT
if (count == port->keepalives_count) if (count == port->keepalives_count)
return STATUS_OK; return STATUS_OK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment