Permalink
Browse files

fix initCond deadlock when dead nodes exist in zwave controller's memory

  • Loading branch information...
1 parent cdc52cf commit b08797c2db6fd858fd0d1dd9c59071b405bbed30 @ekarak ekarak committed Mar 29, 2013
View
@@ -301,6 +301,7 @@ void OnNotification
case Notification::Type_DriverReady:
{
g_homeId = _notification->GetHomeId();
+ initCond.notify_all();
break;
}
@@ -318,15 +319,21 @@ void OnNotification
//missing Type_NodeQueriesComplete, /**< All the initialisation queries on a node have been completed. */
/*< All awake nodes have been queried, so client application can expected complete data for these nodes. */
- case Notification::Type_AwakeNodesQueried:
-
+ case Notification::Type_AwakeNodesQueried:
/**< All nodes have been queried, so client application can expected complete data. */
case Notification::Type_AllNodesQueried:
{
initCond.notify_all();
break;
}
+ case Notification::Type_AllNodesQueriedSomeDead:
+ {
+ // TODO: mark dead nodes for deletion?
+ initCond.notify_all();
+ break;
+ }
+
default:
break;
}
@@ -435,8 +442,7 @@ int main(int argc, char *argv[]) {
return 3;
}
- // OpenZWave initialization
- //initMutex.lock();
+ // OpenZWave daemon initialization
try {
// Create the OpenZWave Manager.
// The first argument is the path to the config files (where the manufacturer_specific.xml file is located
Oops, something went wrong.

0 comments on commit b08797c

Please sign in to comment.