From 81120579232f9830d25a746e2a6c16cea04cd653 Mon Sep 17 00:00:00 2001 From: rahuel Date: Tue, 15 Feb 2005 12:43:05 +0000 Subject: [PATCH] Value of GatePorts --- src/GraphBase/DataFlowBase_DataPort.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/GraphBase/DataFlowBase_DataPort.cxx b/src/GraphBase/DataFlowBase_DataPort.cxx index 1f6d837..2415615 100644 --- a/src/GraphBase/DataFlowBase_DataPort.cxx +++ b/src/GraphBase/DataFlowBase_DataPort.cxx @@ -418,7 +418,6 @@ CORBA::Any const * GraphBase::DataPort::Value() const { bool GraphBase::DataPort::BoolValue() const { bool RetVal = false ; - long val ; pthread_mutex_t * aMutexWait = (pthread_mutex_t *) &_MutexWait ; // cdebug << pthread_self() << " BoolValue() --> pthread_mutex_lock " << aMutexWait << endl ; if ( pthread_mutex_lock( aMutexWait ) ) { @@ -428,6 +427,14 @@ bool GraphBase::DataPort::BoolValue() const { // cdebug << pthread_self() << " BoolValue() --> pthread_mutex_locked " << aMutexWait // << endl ; if ( (*_Value)->type()->kind() == CORBA::tk_long ) { + long val ; + **_Value >>= val ; + if ( val ) { + RetVal = true ; + } + } + else if ( (*_Value)->type()->kind() == CORBA::tk_boolean ) { + bool val ; **_Value >>= val ; if ( val ) { RetVal = true ; @@ -437,8 +444,7 @@ bool GraphBase::DataPort::BoolValue() const { perror( "unlock DataValue" ) ; exit( 0 ) ; } -// cdebug << pthread_self() << " BoolValue() --> pthread_mutex_unlocked " << aMutexWait -// << endl ; + cdebug << pthread_self() << " " << NodeName() << "( " << PortName() << " ) BoolValue " << RetVal << endl ; return RetVal ; } -- 2.39.2