From 2b079a5a2687454fa77a9f4153ba88e14d05cd72 Mon Sep 17 00:00:00 2001 From: JoriPaananen Date: Wed, 21 Oct 2009 08:49:17 +0000 Subject: [PATCH] Fixed the test while-loop to handle changed return value of Datagram::Wait (0 on timeout). git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@461 e16421f0-f15b-0410-abcd-98678b794739 --- tests/ledbattest2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ledbattest2.cpp b/tests/ledbattest2.cpp index 0acded2..834ff18 100644 --- a/tests/ledbattest2.cpp +++ b/tests/ledbattest2.cpp @@ -65,7 +65,7 @@ TEST(Datagram,LedbatTest) { int sock2read; tint wait_time = 100*TINT_MSEC; - while (sock2read = Datagram::Wait(2,socks,wait_time)) { + while ((sock2read = Datagram::Wait(2,socks,wait_time)) != -1) { tint now = Datagram::Time(); if (sock2read==ack_sock) { Datagram data(ack_sock); // send an acknowledgement -- 2.20.1