Skip to content

Commit 1e9e5de

Browse files
committed
Use CONNECTION_OK to determine whether startup phase is complete.
1 parent 4fc5b32 commit 1e9e5de

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/interfaces/libpq/fe-connect.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.165 2001/07/06 17:58:53 petere Exp $
11+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.166 2001/07/06 19:04:23 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1409,7 +1409,6 @@ PQconnectPoll(PGconn *conn)
14091409
if (areq == AUTH_REQ_OK)
14101410
{
14111411
/* We are done with authentication exchange */
1412-
conn->startup_complete = TRUE;
14131412
conn->status = CONNECTION_AUTH_OK;
14141413

14151414
/*
@@ -1910,7 +1909,6 @@ makeEmptyPGconn(void)
19101909
freePGconn(conn);
19111910
conn = NULL;
19121911
}
1913-
conn->startup_complete = FALSE;
19141912
return conn;
19151913
}
19161914

@@ -1976,7 +1974,7 @@ closePGconn(PGconn *conn)
19761974
{
19771975
/* Note that the protocol doesn't allow us to send Terminate
19781976
messages during the startup phase. */
1979-
if (conn->sock >= 0 && conn->startup_complete)
1977+
if (conn->sock >= 0 && conn->status == CONNECTION_OK)
19801978
{
19811979

19821980
/*

src/interfaces/libpq/libpq-int.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $Id: libpq-int.h,v 1.34 2001/07/06 17:58:53 petere Exp $
15+
* $Id: libpq-int.h,v 1.35 2001/07/06 19:04:23 petere Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -278,7 +278,6 @@ struct pg_conn
278278
PQExpBufferData workBuffer; /* expansible string */
279279

280280
int client_encoding;/* encoding id */
281-
int startup_complete;
282281
};
283282

284283
/* String descriptions of the ExecStatusTypes.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy