fix logging incorrectly labeled ERROR 57/22857/2
authorNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Tue, 17 Oct 2017 05:06:25 +0000 (22:06 -0700)
committerNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Tue, 17 Oct 2017 20:30:38 +0000 (20:30 +0000)
Fix a few log messages that are incorrectly logged as ERROR type.

Change-Id: I417b148840fbc6c6df641b0101fdfc3233f8b511
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
resource/csdk/connectivity/src/caconnectivitymanager.c
resource/csdk/security/src/credresource.c
resource/csdk/security/src/pstatresource.c

index c02992e..3c974b3 100644 (file)
@@ -527,7 +527,7 @@ CAResult_t CASelectCipherSuite(const uint16_t cipher, CATransportAdapter_t adapt
 
 CAResult_t CAEnableAnonECDHCipherSuite(const bool enable)
 {
-    OIC_LOG(DEBUG, TAG, "CAEnableAnonECDHCipherSuite");
+    OIC_LOG_V(DEBUG, TAG, "IN %s", __func__);
     CAResult_t res = CA_STATUS_FAILED;
 #if defined(__WITH_DTLS__) || defined(__WITH_TLS__)
     // TLS_ECDH_ANON_WITH_AES_128_CBC_SHA256    0xFF00 replaces 0xC018
@@ -540,7 +540,7 @@ CAResult_t CAEnableAnonECDHCipherSuite(const bool enable)
     (void)(enable); // prevent unused-parameter compiler warning
     OIC_LOG(ERROR, TAG, "Method not supported");
 #endif
-    OIC_LOG_V(ERROR, TAG, "Out %s", __func__);
+    OIC_LOG_V(DEBUG, TAG, "Out %s", __func__);
     return res;
 }
 
index 07f4b81..d2d528b 100644 (file)
@@ -2139,7 +2139,7 @@ static OCEntityHandlerResult HandleNewCredential(OCEntityHandlerRequest *ehReque
 #if defined(__WITH_DTLS__) || defined(__WITH_TLS__)
     OicUuid_t emptyUuid = {.id={0}};
     const OicSecDoxm_t *doxm = GetDoxmResourceData();
-    if( NO_SECURITY_MODE != cred->credType 
+    if( NO_SECURITY_MODE != cred->credType
         && doxm
         && false == doxm->owned
         && memcmp(&(doxm->owner), &emptyUuid, sizeof(OicUuid_t)) != 0
@@ -2158,7 +2158,7 @@ static OCEntityHandlerResult HandleNewCredential(OCEntityHandlerRequest *ehReque
                         OIC_LOG(WARNING, TAG, "The credential with the same subject ID was detected!");
                     }
 
-                    OIC_LOG(ERROR, TAG, "OwnerPSK was generated successfully.");
+                    OIC_LOG(INFO, TAG, "OwnerPSK was generated successfully.");
                     if(OC_STACK_OK == AddCredential(cred))
                     {
                         ret = OC_EH_CHANGED;
@@ -2171,7 +2171,7 @@ static OCEntityHandlerResult HandleNewCredential(OCEntityHandlerRequest *ehReque
                 }
                 else
                 {
-                    OIC_LOG(ERROR, TAG, "Failed to verify receviced OwnerPKS.");
+                    OIC_LOG(ERROR, TAG, "Failed to verify receviced OwnerPSK.");
                     ret = OC_EH_ERROR;
                 }
 
index b6dbe6b..2472753 100644 (file)
@@ -821,7 +821,7 @@ static OCEntityHandlerResult HandlePstatPostRequest(OCEntityHandlerRequest *ehRe
             {
                 if(gPstat->sm[i] == pstat->om)
                 {
-                    OIC_LOG_V(ERROR, TAG, "%s: %d is a supported Operation Mode",
+                    OIC_LOG_V(DEBUG, TAG, "%s: %d is a supported Operation Mode",
                         __func__, (int) pstat->om);
                     supportedOm = true;
                 }