Imported Upstream version 0.9.2
[platform/upstream/iotivity.git] / service / protocol-plugin / sample-app / linux / mqtt / mqttclient.cpp
index 065b2d4..67abc20 100644 (file)
@@ -20,7 +20,7 @@
 
 /// @file mqttclient.cpp
 
-/// @brief Samplecode which controls MQTT-fan plugin using Protocol Plugin Manager. 
+/// @brief Samplecode which controls MQTT-fan plugin using Protocol Plugin Manager.
 
 #include <string>
 #include <cstdlib>
@@ -394,8 +394,8 @@ int main(int argc, char *argv[])
         // makes it so that all boolean values are printed as 'true/false' in this stream
         std::cout.setf(std::ios::boolalpha);
         // Find all resources
-        requestURI << OC_MULTICAST_DISCOVERY_URI << "?rt=core.fan";
-        OCPlatform::findResource("", requestURI.str(), OC_ALL, &foundResourceFan);
+        requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.fan";
+        OCPlatform::findResource("", requestURI.str(), CT_DEFAULT, &foundResourceFan);
         std::cout << "Finding Resource... " << std::endl;
         while (true)
         {