[IOT-2357] Platform error messages 81/20381/3
authorIbrahim Esmat <iesmat@microsoft.com>
Thu, 25 May 2017 00:32:20 +0000 (17:32 -0700)
committerDan Mihai <Daniel.Mihai@microsoft.com>
Thu, 25 May 2017 23:26:58 +0000 (23:26 +0000)
Update expected WARNING/ERROR messages to be INFO when trying to
get the local application data path.

Change-Id: I434f12f0183261e38cc14d6b37a05618690e736d
Signed-off-by: Ibrahim Esmat <iesmat@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20381
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
resource/c_common/oic_platform/src/others/oic_otherplatforms.c
resource/c_common/oic_platform/src/windows/oic_winplatform.cpp

index bd2cbe2..07466ee 100644 (file)
@@ -25,7 +25,7 @@
 
 OICPlatformResult_t OICGetLocalAppDataPath(char* buffer, size_t* bufferLen)
 {
-    OIC_LOG(WARNING, TAG, "Unsupported platform.");
+    OIC_LOG(INFO, TAG, "OICGetLocalAppDataPath: Unsupported platform.");
     OC_UNUSED(buffer);
     OC_UNUSED(bufferLen);
     return OIC_PLATFORM_NOTIMPL;
@@ -33,7 +33,7 @@ OICPlatformResult_t OICGetLocalAppDataPath(char* buffer, size_t* bufferLen)
 
 OICPlatformResult_t OICGetTempAppDataPath(char* buffer, size_t* bufferLen)
 {
-    OIC_LOG(WARNING, TAG, "Unsupported platform.");
+    OIC_LOG(INFO, TAG, "OICGetTempAppDataPath: Unsupported platform.");
     OC_UNUSED(buffer);
     OC_UNUSED(bufferLen);
     return OIC_PLATFORM_NOTIMPL;
index b42b0d9..c785056 100644 (file)
@@ -201,7 +201,7 @@ static OICPlatformResult_t GetSysLocalAppDataPath(std::string &path, size_t &sys
     sysPathLen = path.length();
 #else // UWP_APP
     // Unsupported for win32 apps
-    OIC_LOG(WARNING, TAG, "Unsupported platform.");
+    OIC_LOG(INFO, TAG, "GetSysLocalAppDataPath: Unsupported platform.");
     OC_UNUSED(path);
     OC_UNUSED(sysPathLen);
     OC_UNUSED(getTempDir);
@@ -232,8 +232,11 @@ static OICPlatformResult_t GetLocalAppDataPath(std::string &path, bool getTempDi
         // Set path to the appropriate system local or temp application data path
         if (ret != OIC_PLATFORM_OK)
         {
-            OIC_LOG_V(ERROR, TAG, "Failed to GetSysLocalAppDataPath, ret: %"PRIuPTR,
-                static_cast<size_t>(ret));
+            if (ret != OIC_PLATFORM_NOTIMPL)
+            {
+                OIC_LOG_V(ERROR, TAG, "Failed to GetSysLocalAppDataPath, ret: %" PRIuPTR,
+                    static_cast<size_t>(ret));
+            }
             // On failure, path should be cleared in GetSysLocalAppDataPath
             return ret;
         }