mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[NETSHELL] Fix "ghost" network activity when opening Network Status page (#4662)
Opening Network Status page creates a systematic "ghost" network activity, activating RX+TX activity icon both on property page and tray, while no Rx/Tx. This is due to pContext->dw[In|Out]Octets being initialized to 0 and compared to refreshed interface data. To circumvent this, copy refreshed interface data to the context on first update.
This commit is contained in:
parent
7dc58ccb0c
commit
b42ddce11a
1 changed files with 11 additions and 0 deletions
|
@ -130,6 +130,17 @@ UpdateLanStatus(HWND hwndDlg, LANSTATUSUI_CONTEXT * pContext)
|
|||
return;
|
||||
}
|
||||
|
||||
if (pContext->Status == (UINT)-1)
|
||||
{
|
||||
/*
|
||||
* On first execution, pContext->dw[In|Out]Octets will be zero while
|
||||
* the interface info is already refreshed with non-null data, so a
|
||||
* gap is normal and does not correspond to an effective TX or RX packet.
|
||||
*/
|
||||
pContext->dwInOctets = IfEntry.dwInOctets;
|
||||
pContext->dwOutOctets = IfEntry.dwOutOctets;
|
||||
}
|
||||
|
||||
hIcon = NULL;
|
||||
if (IfEntry.dwOperStatus == MIB_IF_OPER_STATUS_CONNECTED || IfEntry.dwOperStatus == MIB_IF_OPER_STATUS_OPERATIONAL)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue