Patch for 1000478 Cannot create DNS using odbcconf.exe utility in Windows

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--

Re: Patch for 1000478 Cannot create DNS using odbcconf.exe utility in Windows

am 14.12.2005 17:58:12 von Dave Page

=20

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org=20
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Ludek Finstrle
> Sent: 14 December 2005 00:29
> To: pgsql-odbc@postgresql.org
> Subject: [ODBC] Patch for 1000478 Cannot create DNS using=20
> odbcconf.exe utility in Windows
>=20
> Hello,
>=20
> I created patch to solve one line from bug tracer:
> 1000478 Cannot create DNS using odbcconf.exe utility in Windows
>=20
> It isn't bug fix. This is new feature (non standard via ODBC spec.).

Looks good to me - can you apply it to CVS please? :-)

Regards, Dave

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Re: Patch for 1000478 Cannot create DNS using odbcconf.exe utility in Windows

am 17.12.2005 23:56:20 von Ludek Finstrle

> > It isn't bug fix. This is new feature (non standard via ODBC spec.).
>
> Looks good to me - can you apply it to CVS please? :-)

Patch applied.

Luf

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly