From: JoriPaananen Date: Wed, 21 Oct 2009 08:49:17 +0000 (+0000) Subject: Fixed the test while-loop to handle changed return value of Datagram::Wait X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=2b079a5a2687454fa77a9f4153ba88e14d05cd72;p=swift-upb.git 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 --- 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