Changeset: c47c2f306dfe for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/c47c2f306dfe
Modified Files:
        clients/mapilib/connect.c
        clients/odbc/driver/ODBCDbc.c
        clients/odbc/driver/SQLConnect.c
        clients/odbc/driver/SQLSetConnectAttr.c
Branch: odbc-tls
Log Message:

Minor tweaks


diffs (65 lines):

diff --git a/clients/mapilib/connect.c b/clients/mapilib/connect.c
--- a/clients/mapilib/connect.c
+++ b/clients/mapilib/connect.c
@@ -330,7 +330,7 @@ connect_socket_tcp_addr(Mapi mid, struct
                        port = -1;
                        addrtext = NULL;
                }
-               mapi_log_record(mid, "CONN", "Trying IP %s port %d", addrtext ? 
addrtext : "<UNKNOWN>", port);
+               mapi_log_record(mid, "CONN", "Trying IP %s port %d wih timeout 
%ld", addrtext ? addrtext : "<UNKNOWN>", port, timeout);
        }
 
 
diff --git a/clients/odbc/driver/ODBCDbc.c b/clients/odbc/driver/ODBCDbc.c
--- a/clients/odbc/driver/ODBCDbc.c
+++ b/clients/odbc/driver/ODBCDbc.c
@@ -39,7 +39,7 @@
 #define ODBC_DBC_MAGIC_NR  1365        /* for internal sanity check only */
 
 static const char*
-parm_localizer(const void *data, mparm parm)
+odbc_parm_localizer(const void *data, mparm parm)
 {
        (void)data;
        for (int i = 0; i < attr_setting_count; i++) {
@@ -75,7 +75,7 @@ newODBCDbc(ODBCEnv *env)
                return NULL;
        }
 
-       msettings_set_localizer(settings, parm_localizer, NULL);
+       msettings_set_localizer(settings, odbc_parm_localizer, NULL);
 
        *dbc = (ODBCDbc) {
                .Env = env,
diff --git a/clients/odbc/driver/SQLConnect.c b/clients/odbc/driver/SQLConnect.c
--- a/clients/odbc/driver/SQLConnect.c
+++ b/clients/odbc/driver/SQLConnect.c
@@ -203,7 +203,7 @@ buildConnectionString(const char *dsn, c
                if (!value)
                        goto end;
 
-               bool show_this = true;
+               bool show_this;  // intentionally uninitialized
                if (parm == MP_USER || parm == MP_PASSWORD) {
                        show_this = true;
                } else if (parm == MP_PORT && msetting_long(settings, MP_PORT) 
<= 0) {
diff --git a/clients/odbc/driver/SQLSetConnectAttr.c 
b/clients/odbc/driver/SQLSetConnectAttr.c
--- a/clients/odbc/driver/SQLSetConnectAttr.c
+++ b/clients/odbc/driver/SQLSetConnectAttr.c
@@ -41,7 +41,6 @@ MNDBSetConnectAttr(ODBCDbc *dbc,
                   SQLINTEGER StringLength)
 {
        (void) StringLength;    /* Stefan: unused!? */
-       long timeout;
 
        switch (Attribute) {
        case SQL_ATTR_AUTOCOMMIT:               /* SQLUINTEGER */
@@ -67,7 +66,7 @@ MNDBSetConnectAttr(ODBCDbc *dbc,
                addDbcError(dbc, "IM001", NULL, 0);
                return SQL_ERROR;
        case SQL_ATTR_CONNECTION_TIMEOUT:       /* SQLUINTEGER */
-               timeout = 1000 * (long)(uintptr_t) ValuePtr;
+               long timeout = 1000 * (long)(uintptr_t) ValuePtr;
                msetting_set_long(dbc->settings, MP_CONNECT_TIMEOUT, timeout);
                if (dbc->mid)
                        mapi_timeout(dbc->mid, timeout);
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to