Patch for 1000478 Cannot create DNS using odbcconf.exe utility in Windows
am 14.12.2005 01:28:38 von Ludek Finstrle--2B/JsCI69OhZNC5r
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hello,
I created patch to solve one line from bug tracer:
1000478 Cannot create DNS using odbcconf.exe utility in Windows
It isn't bug fix. This is new feature (non standard via ODBC spec.).
Please review and comment
Luf
--2B/JsCI69OhZNC5r
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="psqlodbc-configdsn_delim.diff"
diff -c psqlodbc.orig\setup.c psqlodbc\setup.c
*** psqlodbc.orig\setup.c Sat Dec 10 08:39:31 2005
--- psqlodbc\setup.c Wed Dec 14 02:21:26 2005
***************
*** 345,351 ****
else if (*lpsz == '=')
break; /* Valid key found */
}
! /* Determine the key's index in the key table (-1 if not found) */
cbKey = lpsz - lpszStart;
if (cbKey < sizeof(aszKey))
{
--- 345,351 ----
else if (*lpsz == '=')
break; /* Valid key found */
}
! /* Determine the key */
cbKey = lpsz - lpszStart;
if (cbKey < sizeof(aszKey))
{
***************
*** 353,365 ****
aszKey[cbKey] = '\0';
}
! /* Locate end of key value */
lpszStart = ++lpsz;
! for (; *lpsz; lpsz++)
;
! /* lpsetupdlg->aAttr[iElement].fSupplied = TRUE; */
! _fmemcpy(value, lpszStart, MIN(lpsz - lpszStart + 1, MAXPGPATH));
mylog("aszKey='%s', value='%s'\n", aszKey, value);
--- 353,367 ----
aszKey[cbKey] = '\0';
}
! /* Locate end of key value - added support for delimiter ; */
lpszStart = ++lpsz;
! for (; *lpsz && *lpsz != ';'; lpsz++)
;
! /* Determine the value */
! cbKey = MIN(lpsz - lpszStart, MAXPGPATH);
! _fmemcpy(value, lpszStart, cbKey);
! value[cbKey] = '\0';
mylog("aszKey='%s', value='%s'\n", aszKey, value);
--2B/JsCI69OhZNC5r
Content-Type: text/plain
Content-Disposition: inline
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
--2B/JsCI69OhZNC5r--