Re: [BUGS] BUG #1545: LIBPQ Windows Version not calling WSACleanup for

2005-05-05 Thread Bruce Momjian
This has now been packpatched to 8.0.3 and 7.4.X and will be released in the next few days. --- Jason Erickson wrote: > > The following bug has been logged online: > > Bug reference: 1545 > Logged by: Jason E

Re: [BUGS] BUG #1545: LIBPQ Windows Version not calling WSACleanup for

2005-05-05 Thread Bruce Momjian
Tom Lane wrote: > "Magnus Hagander" <[EMAIL PROTECTED]> writes: > >> Actually ... why do we need a WSAStartup in makeEmptyPGconn? > >> If we have one in DLL attach, isn't that sufficient? > > > Not if you link libpq as a static lib... > > > I *think* that's why it was added. In the beginning it

Re: [BUGS] BUG #1545: LIBPQ Windows Version not calling WSACleanup for

2005-05-05 Thread Bruce Momjian
Magnus Hagander wrote: > >>> The only place WSACleanup is being called is libpqdll when > >the process > >>> detaches the DLL (if the libpq is not staticly linked in), > >which matches up > >>> with the WSAStartup when the process attaches to the DLL. > >>> > >>> The WSAStartup in the fe-connect

Re: [BUGS] BUG #1545: LIBPQ Windows Version not calling WSACleanup for

2005-05-05 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Jason Erickson wrote: > >> The only place WSACleanup is being called is libpqdll when the process > >> detaches the DLL (if the libpq is not staticly linked in), which matches up > >> with the WSAStartup when the process attaches to the DLL. > >> > >> T

Re: [BUGS] BUG #1545: LIBPQ Windows Version not calling WSACleanup for

2005-05-05 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: >> Actually ... why do we need a WSAStartup in makeEmptyPGconn? >> If we have one in DLL attach, isn't that sufficient? > Not if you link libpq as a static lib... > I *think* that's why it was added. In the beginning it was only in the > DLL attach

Re: [BUGS] BUG #1545: LIBPQ Windows Version not calling WSACleanup for

2005-05-05 Thread Magnus Hagander
>>> The only place WSACleanup is being called is libpqdll when >the process >>> detaches the DLL (if the libpq is not staticly linked in), >which matches up >>> with the WSAStartup when the process attaches to the DLL. >>> >>> The WSAStartup in the fe-connect.c->makeEmptyPGconn() does >not have

Re: [BUGS] BUG #1545: LIBPQ Windows Version not calling WSACleanup for

2005-05-05 Thread Tom Lane
Bruce Momjian writes: > Jason Erickson wrote: >> The only place WSACleanup is being called is libpqdll when the process >> detaches the DLL (if the libpq is not staticly linked in), which matches up >> with the WSAStartup when the process attaches to the DLL. >> >> The WSAStartup in the fe-connec

Re: [BUGS] BUG #1545: LIBPQ Windows Version not calling WSACleanup for

2005-05-05 Thread Tom Lane
Bruce Momjian writes: > I agree freePGconn() is the proper place. I will apply the following > patch to current CVS and to 8.0.X. 8.0.3 is being packaged now so I > will wait for 8.0.4. Go ahead and put it in --- I'll wait for your commit. regards, tom lane ---

Re: [BUGS] BUG #1545: LIBPQ Windows Version not calling WSACleanup for

2005-05-05 Thread Bruce Momjian
Jason Erickson wrote: > Taken from microsoft at: > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/win > sock/wsastartup_2.asp > --- > An application must call one WSACleanup call for every successful WSAStartup > call to