Commit c200c3a6 authored by Parkhi's avatar Parkhi Committed by Uze Choi

Update all of easysetup log message's level

 - Public API's log level is changed "INFO"
 - Internal API's log level is changed "DEBUG"
 - All of infomation which is Easysetup data is changed "INFO_PRIVATE" log level

Change-Id: I0eb97517be4da52fb0b202eb7c6379e85045a77d
Signed-off-by: default avatarParkhi <h_w.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17291Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
Tested-by: default avatarUze Choi <uzchoi@samsung.com>
parent 32be85f9
......@@ -46,11 +46,11 @@ static ESDeviceProperty gESDeviceProperty;
void ESWiFiConfRsrcCallback(ESResult esResult, ESWiFiConfData *eventData)
{
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "ESWiFiConfRsrcCallback IN");
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESWiFiConfRsrcCallback IN");
if(esResult != ES_OK)
{
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "ESWiFiConfRsrcCallback Error Occured");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ESWiFiConfRsrcCallback Error Occured");
return;
}
......@@ -61,18 +61,18 @@ void ESWiFiConfRsrcCallback(ESResult esResult, ESWiFiConfData *eventData)
}
else
{
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "WiFiConfProvCb is NULL");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "WiFiConfProvCb is NULL");
return;
}
}
void ESCoapCloudConfRsrcCallback(ESResult esResult, ESCoapCloudConfData *eventData)
{
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "ESCoapCloudConfRsrcCallback IN");
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESCoapCloudConfRsrcCallback IN");
if(esResult != ES_OK)
{
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "ESCoapCloudConfRsrcCallback Error Occured");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ESCoapCloudConfRsrcCallback Error Occured");
return;
}
......@@ -82,18 +82,18 @@ void ESCoapCloudConfRsrcCallback(ESResult esResult, ESCoapCloudConfData *eventDa
}
else
{
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "CoapCloudConfProvCb is NULL");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "CoapCloudConfProvCb is NULL");
return;
}
}
void ESDevConfRsrcallback(ESResult esResult, ESDevConfData *eventData)
{
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "ESDevConfRsrcallback IN");
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESDevConfRsrcallback IN");
if(esResult != ES_OK)
{
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "ESDevConfRsrcallback Error Occured");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ESDevConfRsrcallback Error Occured");
return;
}
......@@ -103,7 +103,7 @@ void ESDevConfRsrcallback(ESResult esResult, ESDevConfData *eventData)
}
else
{
OIC_LOG_V(ERROR, ES_ENROLLEE_TAG, "DevConfProvCb is NULL");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "DevConfProvCb is NULL");
return;
}
}
......@@ -185,14 +185,14 @@ ESResult ESSetDeviceProperty(ESDeviceProperty *deviceProperty)
while((deviceProperty->WiFi).mode[modeIdx] != WiFi_EOF)
{
(gESDeviceProperty.WiFi).mode[modeIdx] = (deviceProperty->WiFi).mode[modeIdx];
OIC_LOG_V(INFO, ES_ENROLLEE_TAG, "WiFi Mode : %d", (gESDeviceProperty.WiFi).mode[modeIdx]);
OIC_LOG_V(INFO_PRIVATE, ES_ENROLLEE_TAG, "WiFi Mode : %d", (gESDeviceProperty.WiFi).mode[modeIdx]);
modeIdx ++;
}
(gESDeviceProperty.WiFi).freq = (deviceProperty->WiFi).freq;
OIC_LOG_V(INFO, ES_ENROLLEE_TAG, "WiFi Freq : %d", (gESDeviceProperty.WiFi).freq);
OIC_LOG_V(INFO_PRIVATE, ES_ENROLLEE_TAG, "WiFi Freq : %d", (gESDeviceProperty.WiFi).freq);
OICStrcpy((gESDeviceProperty.DevConf).deviceName, OIC_STRING_MAX_VALUE, (deviceProperty->DevConf).deviceName);
OIC_LOG_V(INFO, ES_ENROLLEE_TAG, "Device Name : %s", (gESDeviceProperty.DevConf).deviceName);
OIC_LOG_V(INFO_PRIVATE, ES_ENROLLEE_TAG, "Device Name : %s", (gESDeviceProperty.DevConf).deviceName);
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESSetDeviceProperty OUT");
return ES_OK;
......@@ -235,7 +235,7 @@ ESResult ESSetErrorCode(ESErrorCode esErrCode)
return ES_ERROR;
}
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "Set ESErrorCode succesfully : %d", esErrCode);
OIC_LOG_V(INFO, ES_ENROLLEE_TAG, "Set ESErrorCode succesfully : %d", esErrCode);
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESSetErrorCode OUT");
return ES_OK;
}
......@@ -259,6 +259,8 @@ ESResult ESTerminateEnrollee()
ESResult ESSetCallbackForUserdata(ESReadUserdataCb readCb, ESWriteUserdataCb writeCb)
{
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESSetCallbackForUserdata IN");
if(!readCb && !writeCb)
{
OIC_LOG(INFO, ES_ENROLLEE_TAG, "Both of callbacks for user data are null");
......
......@@ -46,7 +46,7 @@ namespace OIC
ESCloudResourceCb cb,
std::weak_ptr<CloudResource> this_ptr)
{
OIC_LOG_V(DEBUG, ES_CLOUD_RES_TAG, "onCloudProvResponseSafetyCb");
OIC_LOG(DEBUG, ES_CLOUD_RES_TAG, "onCloudProvResponseSafetyCb");
std::shared_ptr<CloudResource> Ptr = this_ptr.lock();
if(Ptr)
{
......@@ -57,7 +57,7 @@ namespace OIC
void CloudResource::provisionProperties(const CloudProp& cloudProp)
{
OIC_LOG (DEBUG, ES_CLOUD_RES_TAG, "provisionProperties IN");
OIC_LOG(DEBUG, ES_CLOUD_RES_TAG, "provisionProperties IN");
OCRepresentation provisioningRepresentation = cloudProp.toOCRepresentation();
......@@ -71,13 +71,13 @@ namespace OIC
m_ocResource->post(OC_RSRVD_ES_RES_TYPE_EASYSETUP, BATCH_INTERFACE,
provisioningRepresentation, QueryParamsMap(), cb, OC::QualityOfService::HighQos);
OIC_LOG (DEBUG, ES_CLOUD_RES_TAG, "provisionProperties OUT");
OIC_LOG(DEBUG, ES_CLOUD_RES_TAG, "provisionProperties OUT");
}
void CloudResource::onCloudProvResponse(const HeaderOptions& /*headerOptions*/,
const OCRepresentation& /*rep*/, const int eCode)
{
OIC_LOG_V (DEBUG, ES_CLOUD_RES_TAG, "onCloudProvResponse : eCode = %d",
OIC_LOG_V(DEBUG, ES_CLOUD_RES_TAG, "onCloudProvResponse : eCode = %d",
eCode);
if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED)
......@@ -88,7 +88,7 @@ namespace OIC
if(eCode == OCStackResult::OC_STACK_COMM_ERROR)
{
OIC_LOG_V (DEBUG, ES_CLOUD_RES_TAG,
OIC_LOG(DEBUG, ES_CLOUD_RES_TAG,
"can't receive any response from Enrollee by a timeout threshold.");
result = ESResult::ES_COMMUNICATION_ERROR;
}
......
......@@ -50,7 +50,7 @@ namespace OIC
std::shared_ptr<RemoteEnrollee> EasySetup::createRemoteEnrollee (std::shared_ptr< OC::OCResource > resource)
{
OIC_LOG(DEBUG, EASYSETUP_TAG, "createRemoteEnrollee IN");
OIC_LOG(INFO, EASYSETUP_TAG, "createRemoteEnrollee IN");
if(resource)
{
......@@ -66,11 +66,11 @@ namespace OIC
{
if(interface.compare(BATCH_INTERFACE) == 0)
{
OIC_LOG (DEBUG, EASYSETUP_TAG, "RemoteEnrollee object is succeessfully created");
OIC_LOG_V (DEBUG, EASYSETUP_TAG, "HOST: %s", resource->host().c_str());
OIC_LOG_V (DEBUG, EASYSETUP_TAG, "URI: %s", resource->uri().c_str());
OIC_LOG_V (DEBUG, EASYSETUP_TAG, "SID: %s", resource->sid().c_str());
OIC_LOG_V (DEBUG, EASYSETUP_TAG, "CONNECTIVITY: %d", resource->connectivityType());
OIC_LOG (INFO, EASYSETUP_TAG, "RemoteEnrollee object is succeessfully created");
OIC_LOG_V (INFO_PRIVATE, EASYSETUP_TAG, "HOST: %s", resource->host().c_str());
OIC_LOG_V (INFO_PRIVATE, EASYSETUP_TAG, "URI: %s", resource->uri().c_str());
OIC_LOG_V (INFO_PRIVATE, EASYSETUP_TAG, "SID: %s", resource->sid().c_str());
OIC_LOG_V (INFO_PRIVATE, EASYSETUP_TAG, "CONNECTIVITY: %d", resource->connectivityType());
return std::shared_ptr< RemoteEnrollee > (new RemoteEnrollee(resource));
}
}
......
......@@ -44,7 +44,7 @@ namespace OIC
ESEnrolleeResourceCb cb,
std::weak_ptr<EnrolleeResource> this_ptr)
{
OIC_LOG_V(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "onEnrolleeResourceSafetyCB");
OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "onEnrolleeResourceSafetyCB");
std::shared_ptr<EnrolleeResource> Ptr = this_ptr.lock();
if(Ptr)
{
......@@ -55,19 +55,19 @@ namespace OIC
void EnrolleeResource::onProvisioningResponse(const HeaderOptions& /*headerOptions*/,
const OCRepresentation& /*rep*/, const int eCode)
{
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "onProvisioningResponse : eCode = %d",
OIC_LOG_V(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "onProvisioningResponse : eCode = %d",
eCode);
if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED)
{
ESResult result = ESResult::ES_ERROR;
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
OIC_LOG(ERROR, ES_REMOTE_ENROLLEE_RES_TAG,
"onProvisioningResponse : Provisioning is failed ");
if(eCode == OCStackResult::OC_STACK_COMM_ERROR)
{
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
OIC_LOG(ERROR, ES_REMOTE_ENROLLEE_RES_TAG,
"can't receive any response from Enrollee by a timeout threshold.");
result = ESResult::ES_COMMUNICATION_ERROR;
}
......@@ -78,7 +78,7 @@ namespace OIC
return;
}
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
"onProvisioningResponse : Provisioning is success. ");
std::shared_ptr< DevicePropProvisioningStatus > provStatus = std::make_shared<
......@@ -89,19 +89,19 @@ namespace OIC
void EnrolleeResource::onGetStatusResponse(const HeaderOptions& /*headerOptions*/,
const OCRepresentation& rep, const int eCode)
{
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "onGetStatusResponse : eCode = %d",
OIC_LOG_V(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "onGetStatusResponse : eCode = %d",
eCode);
if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED)
{
ESResult result = ESResult::ES_ERROR;
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
OIC_LOG(ERROR, ES_REMOTE_ENROLLEE_RES_TAG,
"onGetStatusResponse : onGetStatusResponse is failed ");
if(eCode == OCStackResult::OC_STACK_COMM_ERROR)
{
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
OIC_LOG(ERROR, ES_REMOTE_ENROLLEE_RES_TAG,
"can't receive any response from Enrollee by a timeout threshold.");
result = ESResult::ES_COMMUNICATION_ERROR;
}
......@@ -125,19 +125,19 @@ namespace OIC
void EnrolleeResource::onGetConfigurationResponse(const HeaderOptions& /*headerOptions*/,
const OCRepresentation& rep, const int eCode)
{
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "onGetConfigurationResponse : eCode = %d",
OIC_LOG_V(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "onGetConfigurationResponse : eCode = %d",
eCode);
if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED)
{
ESResult result = ESResult::ES_ERROR;
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
OIC_LOG(ERROR, ES_REMOTE_ENROLLEE_RES_TAG,
"onGetConfigurationResponse : onGetConfigurationResponse is failed ");
if(eCode == OCStackResult::OC_STACK_COMM_ERROR)
{
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
OIC_LOG(ERROR, ES_REMOTE_ENROLLEE_RES_TAG,
"can't receive any response from Enrollee by a timeout threshold.");
result = ESResult::ES_COMMUNICATION_ERROR;
}
......@@ -177,7 +177,7 @@ namespace OIC
void EnrolleeResource::getStatus()
{
OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getStatus IN");
OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getStatus IN");
if (m_ocResource == nullptr)
{
......@@ -212,12 +212,12 @@ namespace OIC
return;
}
OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getStatus OUT");
OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getStatus OUT");
}
void EnrolleeResource::getConfiguration()
{
OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getConfiguration IN");
OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getConfiguration IN");
if (m_ocResource == nullptr)
{
......@@ -251,12 +251,12 @@ namespace OIC
return;
}
OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getConfiguration OUT");
OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "getConfiguration OUT");
}
void EnrolleeResource::provisionProperties(const DeviceProp& deviceProp)
{
OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "provisionProperties IN");
OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "provisionProperties IN");
if (m_ocResource == nullptr)
{
throw ESBadRequestException("Resource is not initialized");
......@@ -275,7 +275,7 @@ namespace OIC
m_ocResource->post(OC_RSRVD_ES_RES_TYPE_EASYSETUP, BATCH_INTERFACE,
provisioningRepresentation, QueryParamsMap(), cb, OC::QualityOfService::HighQos);
OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "provisionProperties OUT");
OIC_LOG(DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "provisionProperties OUT");
}
}
}
......@@ -71,7 +71,7 @@ namespace OIC
ESSecurityCb cb,
std::weak_ptr<EnrolleeSecurity> this_ptr)
{
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "onEnrolleeSecuritySafetyCB");
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "onEnrolleeSecuritySafetyCB");
std::shared_ptr<EnrolleeSecurity> Ptr = this_ptr.lock();
if(Ptr)
{
......@@ -185,18 +185,18 @@ namespace OIC
ownerID = {};
}
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Mediator ID %s", m_mediatorID.c_str());
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Enrollee's Owner ID %s", ownerID.c_str());
OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "Mediator ID %s", m_mediatorID.c_str());
OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "Enrollee's Owner ID %s", ownerID.c_str());
if(ownerID == m_mediatorID)
{
OIC_LOG(INFO, ENROLEE_SECURITY_TAG,
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG,
"The found device's first owner ID is matched with Mediator's ID");
ret = true;
}
else
{
OIC_LOG(INFO, ENROLEE_SECURITY_TAG,
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG,
"The found device's first owner ID is NOT matched with Mediator's ID");
}
......@@ -237,7 +237,7 @@ namespace OIC
if(subOwnerID == m_mediatorID)
{
OIC_LOG(INFO, ENROLEE_SECURITY_TAG,
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG,
"The found device's owner ID is matched with Mediator's ID as a second owner");
ret = true;
break;
......@@ -247,7 +247,7 @@ namespace OIC
if(!ret)
{
OIC_LOG(INFO, ENROLEE_SECURITY_TAG,
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG,
"The found device's sub owner ID is NOT matched with Mediator's ID");
}
......@@ -337,7 +337,9 @@ namespace OIC
if( OC_STACK_OK == result->at(i).res )
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "MultipleOwnershipTransferCb is succeeded");
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d for device %s", result->at(i).res, uuid.c_str());
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d", result->at(i).res);
OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "device uuid : %s", uuid.c_str());
OTMResult = true;
}
else
......@@ -556,7 +558,9 @@ namespace OIC
if( OC_STACK_OK == result->at(i).res )
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "OwnershipTransfer is succeeded");
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d for device %s", result->at(i).res, uuid.c_str());
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d", result->at(i).res);
OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "device uuid : %s", uuid.c_str());
OTMResult = true;
}
else
......@@ -622,7 +626,7 @@ namespace OIC
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "Secured resource is found.");
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "HOST: %s", m_securedResource->getDevAddr().c_str());
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "SID: %s", m_securedResource->getDeviceID().c_str());
OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "SID: %s", m_securedResource->getDeviceID().c_str());
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Owned status: %d", m_securedResource->getOwnedStatus());
OicSecOxm_t selectedOTMethod = OIC_OXM_COUNT;
......@@ -640,7 +644,7 @@ namespace OIC
char uuidString[UUID_STRING_SIZE] = {};
if(OCConvertUuidToString(m_securedResource->getDevPtr()->doxm->owner.id, uuidString))
{
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Owner ID: %s", uuidString);
OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "Owner ID: %s", uuidString);
}
else
{
......@@ -670,7 +674,7 @@ namespace OIC
else if(OIC_PRECONFIG_PIN == ownershipTransferData.getMOTMethod())
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "Selected MOT Method: OIC_PRECONFIG_PIN");
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Pre-configured PIN: %s",
OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "Pre-configured PIN: %s",
ownershipTransferData.getPreConfiguredPin().c_str());
}
#endif
......@@ -733,7 +737,7 @@ namespace OIC
char uuidString[UUID_STRING_SIZE] = {};
if(OCConvertUuidToString(mediatorDevId->id, uuidString))
{
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Mediator UUID : %s", uuidString);
OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "Mediator UUID : %s", uuidString);
OICFree(mediatorDevId);
return std::string(uuidString);
}
......@@ -930,7 +934,7 @@ namespace OIC
OCStackResult result = OC_STACK_ERROR;
ESResult res = ESResult::ES_ERROR;
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Transfering ownership for : %s ",
OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "Transfering ownership for : %s ",
m_securedResource->getDeviceID().c_str());
OC::ResultCallBack ownershipTransferCb =
......@@ -969,7 +973,7 @@ namespace OIC
OCStackResult result = OC_STACK_ERROR;
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Transfering sub-ownership for : %s ",
OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "Transfering sub-ownership for : %s ",
m_securedResource->getDeviceID().c_str());
if(OIC_PRECONFIG_PIN == MOTdata.getMOTMethod() &&
......@@ -1035,8 +1039,8 @@ namespace OIC
std::string uuid;
convertUUIDToString(result->at(i).deviceId.id, uuid);
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG,
"Result is = %d for device %s", result->at(i).res, uuid.c_str());
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d", result->at(i).res);
OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "device uuid : %s", uuid.c_str());
}
removeDeviceResult = true;
}
......@@ -1065,7 +1069,7 @@ namespace OIC
{
std::string uuid;
convertUUIDToString(pUuidList->dev.id, uuid);
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG,
OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG,
"m_ocResource->sid(): %s, cur DB UUID %s",
m_ocResource->sid().c_str(), uuid.c_str());
if(m_ocResource->sid() == uuid.c_str())
......@@ -1141,7 +1145,7 @@ namespace OIC
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "Secured resource is found.");
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "HOST: %s", ownedDevice->getDevAddr().c_str());
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "SID: %s", ownedDevice->getDeviceID().c_str());
OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "SID: %s", ownedDevice->getDeviceID().c_str());
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Owned status: %d", ownedDevice->getOwnedStatus());
if (ownedDevice->getOwnedStatus())
......@@ -1257,7 +1261,7 @@ namespace OIC
return res;
}
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Given cloudUuid: %s", cloudUuid.c_str());
OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "Given cloudUuid: %s", cloudUuid.c_str());
OicUuid_t uuid;
if(OC_STACK_OK != ConvertStrToUuid(cloudUuid.c_str(), &uuid))
......@@ -1309,13 +1313,13 @@ namespace OIC
OicSecAcl_t* acl = (OicSecAcl_t*) OICCalloc(1, sizeof(OicSecAcl_t));
if(!acl)
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
return NULL; // not need to 'goto' |ERROR| before allocating |acl|
}
OicSecAce_t* ace = (OicSecAce_t*) OICCalloc(1, sizeof(OicSecAce_t));
if(!ace)
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
return NULL; // not need to 'goto' |ERROR| before allocating |acl|
}
LL_APPEND(acl->aces, ace);
......@@ -1325,7 +1329,7 @@ namespace OIC
OicSecRsrc_t* rsrc = (OicSecRsrc_t*)OICCalloc(1, sizeof(OicSecRsrc_t));
if(!rsrc)
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
OCDeleteACLList(acl);
return NULL;
}
......@@ -1335,7 +1339,7 @@ namespace OIC
rsrc->href = (char*) OICCalloc(len, sizeof(char));
if(!rsrc->href)
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
FreeRsrc(rsrc);
OCDeleteACLList(acl);
return NULL;
......@@ -1347,7 +1351,7 @@ namespace OIC
rsrc->types = (char**)OICCalloc(arrLen, sizeof(char*));
if(!rsrc->types)
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
FreeRsrc(rsrc);
OCDeleteACLList(acl);
return NULL;
......@@ -1355,7 +1359,7 @@ namespace OIC
rsrc->types[0] = OICStrdup("rt"); // ignore
if(!rsrc->types[0])
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "createAcl: OICStrdup error return");
OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "createAcl: OICStrdup error return");
FreeRsrc(rsrc);
OCDeleteACLList(acl);
return NULL;
......@@ -1365,7 +1369,7 @@ namespace OIC
rsrc->interfaces = (char**)OICCalloc(arrLen, sizeof(char*));
if(!rsrc->interfaces)
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "createAcl: OICCalloc error return");
FreeRsrc(rsrc);
OCDeleteACLList(acl);
return NULL;
......@@ -1373,7 +1377,7 @@ namespace OIC
rsrc->interfaces[0] = OICStrdup("if"); // ignore
if(!rsrc->interfaces[0])
{
OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "createAcl: OICStrdup error return");
OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "createAcl: OICStrdup error return");
FreeRsrc(rsrc);
OCDeleteACLList(acl);
return NULL;
......@@ -1405,8 +1409,9 @@ namespace OIC
for (unsigned int i = 0; i < result->size(); i++)
{
convertUUIDToString(result->at(i).deviceId.id, devUuid);
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d for device %s",
result->at(i).res, devUuid.c_str());
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d", result->at(i).res);
OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "device uuid : %s", devUuid.c_str());
}
delete result;
aclResult = true;
......@@ -1431,8 +1436,9 @@ namespace OIC
for (unsigned int i = 0; i < result->size(); i++)
{
convertUUIDToString(result->at(i).deviceId.id, devUuid);
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d for device %s",
result->at(i).res, devUuid.c_str());
OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d", result->at(i).res);
OIC_LOG_V(INFO_PRIVATE, ENROLEE_SECURITY_TAG, "device uuid : %s", devUuid.c_str());
}
delete result;
certResult= true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment