Fix bugs in things manager reported as defects
[platform/upstream/iotivity.git] / service / things-manager / sampleapp / linux / configuration / con-client.cpp
old mode 100644 (file)
new mode 100755 (executable)
index b59e983..6bc0e04
@@ -192,7 +192,9 @@ void onFoundCollectionResource(std::vector< std::shared_ptr< OCResource > > reso
         std::cout << "Exception: " << e.what() << std::endl;
     }
 
+    pthread_mutex_lock(&mutex_lock);
     isWaiting = 0;
+    pthread_mutex_unlock(&mutex_lock);
 }
 
 // Callback to found resources
@@ -240,7 +242,7 @@ void onFoundCandidateResource(std::vector< std::shared_ptr< OCResource > > resou
                             if (g_maintenanceResource == NULL)
                                 g_maintenanceResource = resource;
                         }
-                        else if (resource->uri() == "/factorySet")
+                        else if (resource->uri() == "/factoryset")
                         {
                             OCPlatform::bindResource(setCollectionHandle, foundResourceHandle);
                             if (g_setResource == NULL)
@@ -393,7 +395,7 @@ int main(int argc, char* argv[])
 
                 types.push_back("oic.wk.con");
                 types.push_back("oic.wk.mnt");
-                types.push_back("factorySet");
+                types.push_back("factoryset");
 
                 std::cout << "Finding Configuration Resource... " << std::endl;
                 std::cout << "Finding Maintenance Resource... " << std::endl;