Revision: 6601
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6601&view=rev
Author:   thjc
Date:     2008-06-16 17:56:39 -0700 (Mon, 16 Jun 2008)

Log Message:
-----------
merged multiple small fixes from 2-1 (6541,6542,6543)

Modified Paths:
--------------
    code/player/trunk/libplayercore/device.cc
    code/player/trunk/server/drivers/laser/sicks3000.cc
    code/player/trunk/server/drivers/opaque/tcpstream.cc

Modified: code/player/trunk/libplayercore/device.cc
===================================================================
--- code/player/trunk/libplayercore/device.cc   2008-06-17 00:52:14 UTC (rev 
6600)
+++ code/player/trunk/libplayercore/device.cc   2008-06-17 00:56:39 UTC (rev 
6601)
@@ -287,11 +287,11 @@
   {
     resp_queue->Wait();
     // HACK: this loop should not be neccesary!
+    // pthread_cond_wait does not garuntee no false wake up, so maybe it is.
     while(!(msg = resp_queue->Pop()))
     {
-      pthread_testcancel();
       PLAYER_WARN("empty queue after waiting!");
-      resp_queue->Wait();
+      resp_queue->Wait(); // this is a cancelation point
     }
   }
   else

Modified: code/player/trunk/server/drivers/laser/sicks3000.cc
===================================================================
--- code/player/trunk/server/drivers/laser/sicks3000.cc 2008-06-17 00:52:14 UTC 
(rev 6600)
+++ code/player/trunk/server/drivers/laser/sicks3000.cc 2008-06-17 00:56:39 UTC 
(rev 6601)
@@ -211,7 +211,7 @@
 
////////////////////////////////////////////////////////////////////////////////
 // Constructor
 SickS3000::SickS3000(ConfigFile* cf, int section)
-    : Driver(cf, section, true, PLAYER_MSGQUEUE_DEFAULT_MAXLEN, 
PLAYER_LASER_CODE), mirror("mirror", 0, 0)
+    : Driver(cf, section, false, PLAYER_MSGQUEUE_DEFAULT_MAXLEN, 
PLAYER_LASER_CODE), mirror("mirror", 0, 0)
 {
 
   rx_count = 0;

Modified: code/player/trunk/server/drivers/opaque/tcpstream.cc
===================================================================
--- code/player/trunk/server/drivers/opaque/tcpstream.cc        2008-06-17 
00:52:14 UTC (rev 6600)
+++ code/player/trunk/server/drivers/opaque/tcpstream.cc        2008-06-17 
00:56:39 UTC (rev 6601)
@@ -296,12 +296,7 @@
   // The main loop; interact with the device here
   for(;;)
   {
-    Wait(1);
-
-    // Process incoming messages.  TCPStream::ProcessMessage() is
-    // called on each message.
-    ProcessMessages();
-
+    // we read/connect first otherwise we we wait when we have no data 
connection
     if (connected)
     {
       // Reads the data from the tcp server and then publishes it
@@ -312,6 +307,11 @@
       PLAYER_MSG0(2, "TCP reconnecting");
       OpenTerm();
     }
+
+    PLAYER_MSG1(2, "TCP Main loop running (%d)",device_addr.index);
+    Wait(1);
+    
+    ProcessMessages();
   }
 }
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to