Changeset: 4f9dc3d1505d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/4f9dc3d1505d
Modified Files:
        clients/mapilib/msettings.c
        clients/mapilib/msettings.h
Branch: odbc-tls
Log Message:

Add MP_CONNECT_TIMEOUT and MP_REPLY_TIMEOUT to msettings


diffs (77 lines):

diff --git a/clients/mapilib/msettings.c b/clients/mapilib/msettings.c
--- a/clients/mapilib/msettings.c
+++ b/clients/mapilib/msettings.c
@@ -86,6 +86,7 @@ by_name[] = {
        { .name="certhash", .parm=MP_CERTHASH },
        { .name="clientcert", .parm=MP_CLIENTCERT },
        { .name="clientkey", .parm=MP_CLIENTKEY },
+       { .name="connect_timeout", .parm=MP_CONNECT_TIMEOUT },
        { .name="database", .parm=MP_DATABASE },
        { .name="host", .parm=MP_HOST },
        { .name="language", .parm=MP_LANGUAGE },
@@ -93,6 +94,7 @@ by_name[] = {
        { .name="password", .parm=MP_PASSWORD },
        { .name="port", .parm=MP_PORT },
        { .name="replysize", .parm=MP_REPLYSIZE },
+       { .name="reply_timeout", .parm=MP_REPLY_TIMEOUT },
        { .name="fetchsize", .parm=MP_REPLYSIZE },
        { .name="schema", .parm=MP_SCHEMA },
        { .name="sock", .parm=MP_SOCK },
@@ -140,6 +142,7 @@ mparm_name(mparm parm)
                case MP_CERTHASH: return "certhash";
                case MP_CLIENTCERT: return "clientcert";
                case MP_CLIENTKEY: return "clientkey";
+               case MP_CONNECT_TIMEOUT: return "connect_timeout";
                case MP_DATABASE: return "database";
                case MP_HOST: return "host";
                case MP_LANGUAGE: return "language";
@@ -147,7 +150,8 @@ mparm_name(mparm parm)
                case MP_MAPTOLONGVARCHAR: return "map_to_long_varchar";
                case MP_PASSWORD: return "password";
                case MP_PORT: return "port";
-               case MP_REPLYSIZE: return "replysize";
+               case MP_REPLY_TIMEOUT: return "reply_timeout";  // underscore 
present means specific to this client library
+               case MP_REPLYSIZE: return "replysize";  // no underscore means 
mandatory for all client libraries
                case MP_SCHEMA: return "schema";
                case MP_SOCK: return "sock";
                case MP_SOCKDIR: return "sockdir";
@@ -194,6 +198,8 @@ struct msettings {
        long timezone;
        long replysize;
        long map_to_long_varchar;
+       long connect_timeout;
+       long reply_timeout;
        long dummy_end_long;
 
        // Must match EXACTLY the order of enum mparm
diff --git a/clients/mapilib/msettings.h b/clients/mapilib/msettings.h
--- a/clients/mapilib/msettings.h
+++ b/clients/mapilib/msettings.h
@@ -48,12 +48,18 @@ typedef enum mparm {
         // bool
         MP_TLS = MP__BOOL_START,
         MP_AUTOCOMMIT,
+       // Note: if you change anything about this enum whatsoever, make sure to
+       // make the corresponding change to struct msettings in msettings.c as 
well.
 
         // long
         MP_PORT = MP__LONG_START,
         MP_TIMEZONE,
         MP_REPLYSIZE,
        MP_MAPTOLONGVARCHAR,   // specific to ODBC
+       MP_CONNECT_TIMEOUT,
+       MP_REPLY_TIMEOUT,
+       // Note: if you change anything about this enum whatsoever, make sure to
+       // make the corresponding change to struct msettings in msettings.c as 
well.
 
         // string
         MP_SOCK = MP__STRING_START,
@@ -72,6 +78,8 @@ typedef enum mparm {
         MP_SCHEMA,             // TODO implement this
         MP_BINARY,
        MP_LOGFILE,
+       // Note: if you change anything about this enum whatsoever, make sure to
+       // make the corresponding change to struct msettings in msettings.c as 
well.
 
        // !! Make sure to keep them all below MP__MAX !!
 } mparm;
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to