replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / examples / simpleserver.cpp
index 371bbf8..e610629 100644 (file)
@@ -67,7 +67,7 @@ std::string  systemTime = "2016-01-15T11.01";
 // Set of strings for each of device info fields
 std::string  deviceName = "IoTivity Simple Server";
 std::string  specVersion = "core.1.1.0";
-std::string  dataModelVersions = "res.1.1.0,sh.1.2.0";
+std::string  dataModelVersions = "res.1.1.0,sh.1.1.0";
 
 // OCPlatformInfo Contains all the platform info to be stored
 OCPlatformInfo platformInfo;
@@ -600,7 +600,7 @@ static FILE* client_open(const char* /*path*/, const char *mode)
 int main(int argc, char* argv[])
 {
     PrintUsage();
-    OCPersistentStorage ps {client_open, fread, fwrite, fclose, unlink };
+    OCPersistentStorage ps {client_open, fread, fwrite, fclose, unlink, NULL, NULL};
 
     if (argc == 1)
     {
@@ -640,8 +640,7 @@ int main(int argc, char* argv[])
     PlatformConfig cfg {
         OC::ServiceType::InProc,
         OC::ModeType::Server,
-        "0.0.0.0", // By setting to "0.0.0.0", it binds to all available interfaces
-        0,         // Uses randomly available port
+        (OCTransportAdapter)(OCTransportAdapter::OC_ADAPTER_IP|OCTransportAdapter::OC_ADAPTER_TCP),
         OC::QualityOfService::LowQos,
         &ps
     };