Fixed the test while-loop to handle changed return value of Datagram::Wait
authorJoriPaananen <JoriPaananen@e16421f0-f15b-0410-abcd-98678b794739>
Wed, 21 Oct 2009 08:49:17 +0000 (08:49 +0000)
committerJoriPaananen <JoriPaananen@e16421f0-f15b-0410-abcd-98678b794739>
Wed, 21 Oct 2009 08:49:17 +0000 (08:49 +0000)
(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

index 0acded2..834ff18 100644 (file)
@@ -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