mirror of
https://github.com/solemnwarning/ipxwrapper
synced 2024-12-30 16:45:37 +01:00
Fixed a bug in NIC detection code
This commit is contained in:
parent
2d383dda97
commit
f6d1e9a9f7
@ -72,6 +72,10 @@ BOOL WINAPI DllMain(HINSTANCE me, DWORD why, LPVOID res) {
|
||||
IP_ADAPTER_INFO *ifptr = ifroot;
|
||||
ipx_nic *enic = NULL;
|
||||
|
||||
if(!ifptr) {
|
||||
debug("No NICs: %s", w32_error(WSAGetLastError()));
|
||||
}
|
||||
|
||||
while(ifptr) {
|
||||
ipx_nic *nnic = malloc(sizeof(ipx_nic));
|
||||
if(!nnic) {
|
||||
@ -217,7 +221,7 @@ IP_ADAPTER_INFO *get_nics(void) {
|
||||
ULONG bufsize = sizeof(IP_ADAPTER_INFO);
|
||||
|
||||
int rval = GetAdaptersInfo(&tbuf, &bufsize);
|
||||
if(rval != ERROR_SUCCESS) {
|
||||
if(rval != ERROR_SUCCESS && rval != ERROR_BUFFER_OVERFLOW) {
|
||||
WSASetLastError(rval);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user