diff options
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/connect.c')
-rw-r--r-- | src/interfaces/ecpg/ecpglib/connect.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/interfaces/ecpg/ecpglib/connect.c b/src/interfaces/ecpg/ecpglib/connect.c index 433a5e29602..d187d32f708 100644 --- a/src/interfaces/ecpg/ecpglib/connect.c +++ b/src/interfaces/ecpg/ecpglib/connect.c @@ -1,4 +1,4 @@ -/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.11 2003/07/08 07:13:48 meskes Exp $ */ +/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.12 2003/07/15 12:38:38 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" @@ -68,7 +68,6 @@ ecpg_finish(struct connection * act) struct ECPGtype_information_cache *cache, *ptr; - ECPGlog("ecpg_finish: finishing %s.\n", act->name); PQfinish(act->connection); /* no need to lock connections_mutex - we're always called @@ -90,6 +89,8 @@ ecpg_finish(struct connection * act) if (actual_connection == act) actual_connection = all_connections; + ECPGlog("ecpg_finish: Connection %s closed.\n", act->name); + for (cache = act->cache_head; cache; ptr = cache, cache = cache->next, ECPGfree(ptr)); ECPGfree(act->name); ECPGfree(act); @@ -481,10 +482,9 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p if (PQstatus(this->connection) == CONNECTION_BAD) { - const char *errmsg = PQerrorMessage(this->connection); - char *db = realname ? realname : "<DEFAULT>"; + const char *errmsg = PQerrorMessage(this->connection); + char *db = realname ? realname : "<DEFAULT>"; - set_backend_err(errmsg, lineno); ecpg_finish(this); #ifdef USE_THREADS pthread_mutex_unlock(&connections_mutex); |