Skip to content

Commit c3fdf89

Browse files
author
Hiroshi Inoue
committed
Fix a bug about the handling of CX parameter of the connection string
reported by Sergey Smirnov.
1 parent 40c4416 commit c3fdf89

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/interfaces/odbc/connection.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ PGAPI_Connect(
112112
make_string(szDSN, cbDSN, ci->dsn);
113113

114114
/* get the values for the DSN from the registry */
115+
memcpy(&ci->drivers, &globals, sizeof(globals));
115116
getDSNinfo(ci, CONN_OVERWRITE);
116117
logs_on_off(1, ci->drivers.debug, ci->drivers.commlog);
117118
/* initialize pg_version from connInfo.protocol */

src/interfaces/odbc/dlg_specific.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,6 @@ getDSNinfo(ConnInfo *ci, char overwrite)
421421
* If a driver keyword was present, then dont use a DSN and return.
422422
* If DSN is null and no driver, then use the default datasource.
423423
*/
424-
memcpy(&ci->drivers, &globals, sizeof(globals));
425424
if (DSN[0] == '\0')
426425
{
427426
if (ci->driver[0] != '\0')

src/interfaces/odbc/psqlodbc.rc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ FONT 10, "Terminal"
6262
BEGIN
6363
RTEXT "&Data Source",IDC_DSNAMETEXT,5,11,50,12,NOT WS_GROUP
6464
EDITTEXT IDC_DSNAME,57,10,72,12,ES_AUTOHSCROLL | WS_GROUP
65-
RTEXT "Des&cription",IDC_DESCTEXT,134,11,39,12,NOT WS_GROUP
66-
EDITTEXT IDC_DESC,175,10,108,12,ES_AUTOHSCROLL
65+
RTEXT "Des&cription",IDC_DESCTEXT,129,10,45,12,NOT WS_GROUP
66+
EDITTEXT IDC_DESC,176,10,107,12,ES_AUTOHSCROLL
6767
RTEXT "Data&base",IDC_STATIC,16,26,38,12,NOT WS_GROUP
6868
EDITTEXT IDC_DATABASE,57,25,72,12,ES_AUTOHSCROLL
6969
RTEXT "&Server",IDC_STATIC,26,41,29,12,NOT WS_GROUP
@@ -171,7 +171,7 @@ BEGIN
171171
WS_TABSTOP,227,95,29,10
172172
GROUPBOX "Protocol",IDC_STATIC,5,115,277,25
173173
CONTROL "7.X,6.4+",DS_PG64,"Button",BS_AUTORADIOBUTTON |
174-
WS_GROUP,44,126,35,10
174+
WS_GROUP,44,126,49,10
175175
CONTROL "6.3",DS_PG63,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,
176176
117,126,26,10
177177
CONTROL "6.2",DS_PG62,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,

src/interfaces/odbc/setup.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#define INTFUNC __stdcall
2828

2929
extern HINSTANCE NEAR s_hModule; /* Saved module handle. */
30+
extern GLOBAL_VALUES globals;
3031

3132
/* Constants */
3233
#define MIN(x,y) ((x) < (y) ? (x) : (y))
@@ -217,6 +218,7 @@ ConfigDlgProc(HWND hdlg,
217218
*/
218219
/* override settings in ODBC.INI */
219220

221+
memcpy(&ci->drivers, &globals, sizeof(globals));
220222
/* Get the rest of the common attributes */
221223
getDSNinfo(ci, CONN_DONT_OVERWRITE);
222224

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy