rept fix
This commit is contained in:
12
srcs/main.c
12
srcs/main.c
@ -285,6 +285,8 @@ int main(int argc, char** argv) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if (icmp_reply->code) {}
|
||||||
|
|
||||||
int old_checksum = icmp_reply->checksum;
|
int old_checksum = icmp_reply->checksum;
|
||||||
icmp_reply->checksum = 0;
|
icmp_reply->checksum = 0;
|
||||||
|
|
||||||
@ -310,11 +312,11 @@ int main(int argc, char** argv) {
|
|||||||
max = (((max) > (tmp)) ? (max) : (tmp));
|
max = (((max) > (tmp)) ? (max) : (tmp));
|
||||||
avg += tmp;
|
avg += tmp;
|
||||||
stddev += tmp * tmp;
|
stddev += tmp * tmp;
|
||||||
// if (icmp_reply->un.echo.sequence <= recvd) {
|
if (icmp_reply->un.echo.sequence < recvd) {
|
||||||
// rept++;
|
rept++;
|
||||||
// } else {
|
} else {
|
||||||
recvd++;
|
recvd++;
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
} else if (ret == 0) {
|
} else if (ret == 0) {
|
||||||
printf("No reply received within the timeout period\n");
|
printf("No reply received within the timeout period\n");
|
||||||
|
Reference in New Issue
Block a user