mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:54:13 +00:00
Fixed a few bugs in network interface handling (code & test).
This commit is contained in:
parent
412d37f6e6
commit
9b5cde85a2
3 changed files with 4 additions and 4 deletions
|
@ -352,7 +352,7 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen)
|
|||
toIPAddressString(getInterfaceMaskByIndex(table->indexes[ndx]),
|
||||
ptr->IpAddressList.IpMask.String);
|
||||
if (ndx < table->numIndexes + 1)
|
||||
ptr->Next = &pAdapterInfo[ndx + 1];
|
||||
ptr->Next = (ndx == table->numIndexes - 1) ? NULL : &pAdapterInfo[ndx + 1];
|
||||
}
|
||||
ret = NO_ERROR;
|
||||
}
|
||||
|
|
|
@ -162,7 +162,7 @@ static void run_wkstatransportenum_tests(void)
|
|||
ok(bufPtr != NULL, "got data back");
|
||||
ok(entriesRead > 0, "read at least one transport");
|
||||
ok(totalEntries > 0, "at least one transport");
|
||||
NetApiBufferFree(bufPtr);
|
||||
pNetApiBufferFree(bufPtr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -156,9 +156,9 @@ NetWkstaTransportEnum(LPCWSTR ServerName, DWORD level, LPBYTE* pbuf,
|
|||
|
||||
for (n_adapt = 0, ptr = info; ptr; ptr = ptr->Next)
|
||||
n_adapt++;
|
||||
size_needed = n_adapt * (sizeof(WKSTA_TRANSPORT_INFO_0)
|
||||
size_needed = n_adapt * sizeof(WKSTA_TRANSPORT_INFO_0)
|
||||
+ n_adapt * TRANSPORT_NAME_LEN * sizeof (WCHAR)
|
||||
+ n_adapt * 13 * sizeof (WCHAR));
|
||||
+ n_adapt * 13 * sizeof (WCHAR);
|
||||
if (prefmaxlen == MAX_PREFERRED_LENGTH)
|
||||
NetApiBufferAllocate( size_needed, (LPVOID *) pbuf);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue