aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-connect.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-08-27 16:21:51 +0000
committerBruce Momjian <bruce@momjian.us>2002-08-27 16:21:51 +0000
commita1c218cae433d234c82546f50408c86a94f63dbc (patch)
tree14bfc719e53dda0747753da6c2c2638bf3f3e7dd /src/interfaces/libpq/fe-connect.c
parentdbf261f588f52ec9fd707e04c223cdcf6c4deeb1 (diff)
downloadpostgresql-a1c218cae433d234c82546f50408c86a94f63dbc.tar.gz
postgresql-a1c218cae433d234c82546f50408c86a94f63dbc.zip
The attached patch implements the password packet length sanity check
(using an elog(LOG) ), as well as includes a few more comment fixes. Neil Conway
Diffstat (limited to 'src/interfaces/libpq/fe-connect.c')
-rw-r--r--src/interfaces/libpq/fe-connect.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 57123c5bd04..6ccc702c994 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.196 2002/08/27 15:02:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.197 2002/08/27 16:21:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1132,7 +1132,7 @@ connectDBComplete(PGconn *conn)
/*
* If connecting timeout is set, calculate remain time.
*/
- if (NULL != rp)
+ if (rp != NULL)
{
if (gettimeofday(&finish_time, NULL) == -1)
{
@@ -1152,8 +1152,8 @@ connectDBComplete(PGconn *conn)
remains.tv_sec -= finish_time.tv_sec - start_time.tv_sec;
}
}
- conn->status = CONNECTION_BAD;
- return 0;
+ conn->status = CONNECTION_BAD;
+ return 0;
}
/* ----------------
@@ -1162,7 +1162,8 @@ connectDBComplete(PGconn *conn)
* Poll an asynchronous connection.
*
* Returns a PostgresPollingStatusType.
- * Before calling this function, use select(2) to determine when data arrive.
+ * Before calling this function, use select(2) to determine when data
+ * has arrived..
*
* You must call PQfinish whether or not this fails.
*
@@ -1356,7 +1357,7 @@ keep_going: /* We will come back to here until there
{
if (pqGets(&conn->errorMessage, conn))
{
- /* We'll come back when there are more data */
+ /* We'll come back when there is more data */
return PGRES_POLLING_READING;
}
/* OK, we read the message; mark data consumed */