replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / examples / simpleserver.cpp
index 898bca9..e610629 100644 (file)
@@ -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
     };