[openrtm-commit:03204] r953 - trunk/OpenRTM-aist-Python/OpenRTM_aist

openrtm @ openrtm.org openrtm @ openrtm.org
2018年 2月 28日 (水) 14:35:53 JST


Author: miyamoto
Date: 2018-02-28 14:35:53 +0900 (Wed, 28 Feb 2018)
New Revision: 953

Modified:
   trunk/OpenRTM-aist-Python/OpenRTM_aist/RingBuffer.py
Log:
[bugfix, ->trunk] bug fixed. refs #4470

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/RingBuffer.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/RingBuffer.py	2018-02-28 05:31:59 UTC (rev 952)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/RingBuffer.py	2018-02-28 05:35:53 UTC (rev 953)
@@ -257,6 +257,7 @@
   # 
   # ReturnCode advanceWptr(long int n = 1)
   def advanceWptr(self, n = 1, unlock_enable=True):
+    empty = False
     if unlock_enable and n > 0:
       self._empty_cond.acquire()
       empty = self.empty()
@@ -276,7 +277,7 @@
     self._fillcount += n
 
     if unlock_enable and n > 0:
-      if empty and n > 0:
+      if empty:
         self._empty_cond.notify()
       self._empty_cond.release()
     
@@ -516,6 +517,7 @@
   # 
   # DataType* rptr(long int n = 0)
   def advanceRptr(self, n = 1, unlock_enable=True):
+    full_ = False
     if unlock_enable and n > 0:
       self._full_cond.acquire()
       full_ = self.full()



More information about the openrtm-commit mailing list