Commit 9eb8bb0e authored by Pavel Vainerman's avatar Pavel Vainerman
parent 50d1ac0b
...@@ -388,6 +388,8 @@ class IOController: ...@@ -388,6 +388,8 @@ class IOController:
DependsSlot dslot; /*!< undefined depends slot */ DependsSlot dslot; /*!< undefined depends slot */
DependsSlot bslot; /*!< block depends slot */ DependsSlot bslot; /*!< block depends slot */
int checkLockValuePause; int checkLockValuePause;
UniSetTypes::uniset_mutex loggingMutex; /*!< logging info mutex */
}; };
#endif #endif
...@@ -756,15 +756,18 @@ void IOController::logging( UniSetTypes::SensorMessage& sm ) ...@@ -756,15 +756,18 @@ void IOController::logging( UniSetTypes::SensorMessage& sm )
{ {
// struct timezone tz; // struct timezone tz;
// gettimeofday(&sm.tm,&tz); // gettimeofday(&sm.tm,&tz);
ObjectId dbID = conf->getDBServer(); ObjectId dbID = conf->getDBServer();
// DBServer- // DBServer-
if( dbID == UniSetTypes::DefaultObjectId ) if( dbID == UniSetTypes::DefaultObjectId )
return; return;
sm.consumer = dbID; sm.consumer = dbID;
TransportMessage tm(sm.transport_msg()); TransportMessage tm(sm.transport_msg());
ui.send(sm.consumer, tm); {
isPingDBServer = true; uniset_mutex_lock l(loggingMutex,300);
ui.send(sm.consumer, tm);
isPingDBServer = true;
}
} }
catch(...) catch(...)
{ {
...@@ -853,7 +856,7 @@ IOController_i::DSensorInfoSeq* IOController::getDigitalSensorsMap() ...@@ -853,7 +856,7 @@ IOController_i::DSensorInfoSeq* IOController::getDigitalSensorsMap()
res->length(dioList.size()); res->length(dioList.size());
// { // lock // { // lock
// uniset_mutex_lock lock(dioMutex, 500); // uniset_mutex_lock lock(dioMutex, 500);
int i=0; int i=0;
for( DIOStateList::iterator it= dioList.begin(); it!=dioList.end(); ++it) for( DIOStateList::iterator it= dioList.begin(); it!=dioList.end(); ++it)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment