CVS: winex/dlls/iphlpapi iphlpapi.spec, 1.6, 1.7 iphlpapi_main.c, 1.10, 1.11

[email protected]
Newsgroups gmane.comp.emulators.winex.cvs
Message-ID <[email protected]>
Subject: winex/dlls/iphlpapi iphlpapi.spec,1.6,1.7 iphlpapi_main.c,1.10,1.11Update of /var/lib/cvsd/cvsroot/winex/dlls/iphlpapi
In directory agravaine:/tmp/cvs-serv30633/dlls/iphlpapi

Modified Files:
	iphlpapi.spec iphlpapi_main.c 
Log Message:

- res_init() *must* only be called once per-process on MacOS X; if it's called more than once, it closes fd 0 on you!


Index: iphlpapi.spec
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/dlls/iphlpapi/iphlpapi.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- iphlpapi.spec	30 Mar 2007 20:13:14 -0000	1.6
+++ iphlpapi.spec	27 Apr 2007 13:08:12 -0000	1.7
@@ -1,6 +1,7 @@
 name   iphlpapi
 type   win32
 file   iphlpapi.dll
+init   DllMain
 
 import advapi32.dll
 import kernel32.dll

Index: iphlpapi_main.c
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/dlls/iphlpapi/iphlpapi_main.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- iphlpapi_main.c	30 Mar 2007 20:13:26 -0000	1.10
+++ iphlpapi_main.c	27 Apr 2007 13:08:12 -0000	1.11
@@ -55,6 +55,7 @@
   switch (fdwReason) {
     case DLL_PROCESS_ATTACH:
       DisableThreadLibraryCalls( hinstDLL );
+      res_init();
       break;
 
     case DLL_PROCESS_DETACH:
@@ -1340,7 +1341,6 @@
   if (!pOutBufLen)
     return ERROR_INVALID_PARAMETER;
 
-  res_init();
   size = sizeof(FIXED_INFO) + (_res.nscount > 0 ? (_res.nscount  - 1) *
    sizeof(IP_ADDR_STRING) : 0);
   if (!pFixedInfo || *pOutBufLen < size) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.