Commits

Denilson Sá committed e3a98b6

prettyping.sh: Improving support for multiple responses with the same icmp_seq number.

If you run "prettyping.sh --pingbin oping registro.br 8.8.8.8" (note the two
hosts here), then there will be to responses with the same icmp_seq. In
general, using "oping" instead of "ping", you can ping multiple hosts at the
same time, and thus receive multiple responses with the same number.

Thus, it is better to write "last_seq = seq" than to write "last_seq++".

  • Participants
  • Parent commits 49f3e10

Comments (0)

Files changed (1)

 		print_newlines_if_needed()
 		print_received_response(rtt)
 
-		last_seq++
+		# In case of receiving multiple responses with the same seq number, it
+		# is better to use "last_seq = seq" than to increment last_seq.
+		last_seq = seq
+
 		received++
 		store(lastn_lost, 0)