diff options
author | Magnus Hagander <magnus@hagander.net> | 2007-07-23 17:52:06 +0000 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2007-07-23 17:52:06 +0000 |
commit | 29ac718f476bef2690a8af2923e9d931ce6fb2c9 (patch) | |
tree | fe1a9479a0c46ea51e346c77d206abc996d430ec /src/interfaces/libpq/fe-connect.c | |
parent | aa81c558ee5293fef96aa4049cd5a4d9da90954e (diff) | |
download | postgresql-29ac718f476bef2690a8af2923e9d931ce6fb2c9.tar.gz postgresql-29ac718f476bef2690a8af2923e9d931ce6fb2c9.zip |
Use PQExpBuffer for error message in fe-auth.c.
In passing, change functions that passedin both PGconn and
parts of it to just pass in the PGconn.
Diffstat (limited to 'src/interfaces/libpq/fe-connect.c')
-rw-r--r-- | src/interfaces/libpq/fe-connect.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index f3eafb1eeb4..6747f228172 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.350 2007/07/23 10:16:54 mha Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.351 2007/07/23 17:52:06 mha Exp $ * *------------------------------------------------------------------------- */ @@ -1723,12 +1723,7 @@ keep_going: /* We will come back to here until there is * avoid the Kerberos code doing a hostname look-up. */ - /* - * XXX fe-auth.c has not been fixed to support PQExpBuffers, - * so: - */ - if (pg_fe_sendauth(areq, conn, conn->pghost, conn->pgpass, - conn->errorMessage.data) != STATUS_OK) + if (pg_fe_sendauth(areq, conn) != STATUS_OK) { conn->errorMessage.len = strlen(conn->errorMessage.data); goto error_return; @@ -3074,7 +3069,6 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage) char *cp2; PQconninfoOption *options; PQconninfoOption *option; - char errortmp[PQERRORMSG_LENGTH]; /* Make a working copy of PQconninfoOptions */ options = malloc(sizeof(PQconninfoOptions)); @@ -3297,8 +3291,7 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage) */ if (strcmp(option->keyword, "user") == 0) { - option->val = pg_fe_getauthname(errortmp); - /* note any error message is thrown away */ + option->val = pg_fe_getauthname(errorMessage); continue; } } |