mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 19:05:52 +00:00
[PING]
Backport a change from arping: on ctrl+c hit, display statistics svn path=/trunk/; revision=70267
This commit is contained in:
parent
2b39d4ecf5
commit
248a8191f1
1 changed files with 11 additions and 0 deletions
|
@ -352,6 +352,14 @@ static WORD Checksum(PUSHORT data, UINT size)
|
||||||
return (USHORT)(~sum);
|
return (USHORT)(~sum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static BOOL WINAPI StopLoop(DWORD dwCtrlType)
|
||||||
|
{
|
||||||
|
NeverStop = FALSE;
|
||||||
|
PingCount = 0;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Prepare to ping target */
|
/* Prepare to ping target */
|
||||||
static BOOL Setup(VOID)
|
static BOOL Setup(VOID)
|
||||||
{
|
{
|
||||||
|
@ -439,6 +447,9 @@ static BOOL Setup(VOID)
|
||||||
MaxRTT.QuadPart = 0;
|
MaxRTT.QuadPart = 0;
|
||||||
SumRTT.QuadPart = 0;
|
SumRTT.QuadPart = 0;
|
||||||
MinRTTSet = FALSE;
|
MinRTTSet = FALSE;
|
||||||
|
|
||||||
|
SetConsoleCtrlHandler(StopLoop, TRUE);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue