summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/lib/ecpglib.c
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1998-05-21 03:52:37 +0000
committerMarc G. Fournier <scrappy@hub.org>1998-05-21 03:52:37 +0000
commita45341979fa16d67536d35c4b1346544c028890d (patch)
treef351ccf78588c9142c2b057a1af5819c2e33fcc8 /src/interfaces/ecpg/lib/ecpglib.c
parent07140ee024d666ccead4959816ac749e9ca1a0a8 (diff)
From: Michael Meskes <meskes@topsystem.de>
+ Tue May 19 11:49:34 CEST 1998 + + - Tested (and fixed) 'set connection' + - Fixed string notation in C + - Set version to 2.3.2
Diffstat (limited to 'src/interfaces/ecpg/lib/ecpglib.c')
-rw-r--r--src/interfaces/ecpg/lib/ecpglib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/lib/ecpglib.c b/src/interfaces/ecpg/lib/ecpglib.c
index 445776ec828..504a0388ccd 100644
--- a/src/interfaces/ecpg/lib/ecpglib.c
+++ b/src/interfaces/ecpg/lib/ecpglib.c
@@ -804,8 +804,10 @@ bool
ECPGsetconn(int lineno, const char *connection_name)
{
struct connection *con = all_connections;
+
+ ECPGlog("ECPGsetconn: setting actual connection to %s\n", connection_name);
- for (; con && strcmp(connection_name, con->name) == 0; con=con->next);
+ for (; con && strcmp(connection_name, con->name) != 0; con=con->next);
if (con)
{
actual_connection = con;
@@ -883,7 +885,7 @@ ECPGdisconnect(int lineno, const char *connection_name)
}
else
{
- for (con = all_connections; con && strcmp(con->name, connection_name);con = con->next);
+ for (con = all_connections; con && strcmp(con->name, connection_name) != 0;con = con->next);
if (con == NULL)
{
ECPGlog("disconnect: not connected to connection %s\n", connection_name);