]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Use CONNECTION_OK to determine whether startup phase is complete.
authorPeter Eisentraut <peter_e@gmx.net>
Fri, 6 Jul 2001 19:04:23 +0000 (19:04 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Fri, 6 Jul 2001 19:04:23 +0000 (19:04 +0000)
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/libpq-int.h

index 7fda1a81f5ecebe26f0e4b3c19c207d3a5da4447..e215eb87e936c2ae99dbac4b487ff13c8cc7317d 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.165 2001/07/06 17:58:53 petere Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.166 2001/07/06 19:04:23 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1409,7 +1409,6 @@ keep_going:                                               /* We will come back to here until there
                                if (areq == AUTH_REQ_OK)
                                {
                                        /* We are done with authentication exchange */
-                                       conn->startup_complete = TRUE;
                                        conn->status = CONNECTION_AUTH_OK;
 
                                        /*
@@ -1910,7 +1909,6 @@ makeEmptyPGconn(void)
                freePGconn(conn);
                conn = NULL;
        }
-       conn->startup_complete = FALSE;
        return conn;
 }
 
@@ -1976,7 +1974,7 @@ closePGconn(PGconn *conn)
 {
        /* Note that the protocol doesn't allow us to send Terminate
        messages during the startup phase. */
-       if (conn->sock >= 0 && conn->startup_complete)
+       if (conn->sock >= 0 && conn->status == CONNECTION_OK)
        {
 
                /*
index a33176e6dad1ac84629248177c1e1634f738370f..7d8848e3e9e9fea1e3f488c3e0991278985f0293 100644 (file)
@@ -12,7 +12,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: libpq-int.h,v 1.34 2001/07/06 17:58:53 petere Exp $
+ * $Id: libpq-int.h,v 1.35 2001/07/06 19:04:23 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -278,7 +278,6 @@ struct pg_conn
        PQExpBufferData workBuffer; /* expansible string */
 
        int                     client_encoding;/* encoding id */
-       int                     startup_complete;
 };
 
 /* String descriptions of the ExecStatusTypes.