freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] _tds_socket_init
- Date: Fri, 11 Jan 2008 08:37:11 +0100
>
> _tds_socket_init and _tds_socket_done are defined in
> tds/net.c and used
> nowhere.
>
Are used in a macro in include/tds_sysdep_private.h which is used in
tsql.c for instance.
> According to Microsoft's Win32 documentation, they should be called,
> because "WSAStartup ... *must* be the first Windows Sockets function
> called...." and WSACleanup must be the last one called.
>
> To support Win32 correctly, these functions should be added
> to some kind
> of tds_init() function that would be called by dbinit() and
> friends. It
> can't be called at connect time (unless we keep track with a
> global static
> or something), because a process may create more than one
> connection.
>
> Another option is to do the same work in the .dll when it
> initializes.
> That's actually much more desirable, ISTM, unless we support
> static Win32
> libraries.
>
Yes, see win32/initnet.c which contains the "main" for DLLs.
> If we're not going to bother using these functions, we should probably
> delete them.
>
freddy77
-
[freetds] _tds_socket_init,
James K. Lowden, 01/10/2008
-
Re: [freetds] _tds_socket_init,
ZIGLIO, Frediano, VF-IT, 01/11/2008
- Re: [freetds] _tds_socket_init, James K. Lowden, 01/11/2008
-
Re: [freetds] _tds_socket_init,
ZIGLIO, Frediano, VF-IT, 01/11/2008
Archive powered by MHonArc 2.6.24.