{
for (unsigned int i = 0; i < list.size(); i++)
{
- OC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Device %d ID %s ", i + 1,
+ OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Device %d ID %s ", i + 1,
list[i]->getDeviceID().c_str());
- OC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "From IP :%s", list[i]->getDevAddr().c_str());
+ OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "From IP :%s", list[i]->getDevAddr().c_str());
if (list[i]->getDevAddr() == host)
{
{
if (hasError)
{
- OC_LOG(ERROR, ENROLEE_SECURITY_TAG,"Error!!! in OwnershipTransfer");
+ OIC_LOG(ERROR, ENROLEE_SECURITY_TAG,"Error!!! in OwnershipTransfer");
std::shared_ptr< SecProvisioningResult > securityProvisioningStatus = nullptr;
std::string uuid;
}
else
{
- OC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "ownershipTransferCb : Received provisioning results: ");
+ OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "ownershipTransferCb : Received provisioning results: ");
for (unsigned int i = 0; i < result->size(); i++)
{
- OC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d for device",result->at(i).res);
+ OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Result is = %d for device",result->at(i).res);
std::string uuid;
convertUUIDToString(result->at(0).deviceId, uuid);
- OC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "UUID : %s",uuid.c_str());
+ OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "UUID : %s",uuid.c_str());
std::shared_ptr< SecProvisioningResult > securityProvisioningStatus = nullptr;
securityProvisioningStatus = std::make_shared< SecProvisioningResult >(uuid,
ES_OK);
pOwnedDevList);
if (result != OC_STACK_OK)
{
- OC_LOG(ERROR, ENROLEE_SECURITY_TAG, "Owned Discovery failed.");
+ OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "Owned Discovery failed.");
ownershipStatus = DEVICE_NOT_OWNED;
//Throw exception
throw ESPlatformException(result);
}
else if (pOwnedDevList.size())
{
- OC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Found owned devices. Count =%d",
+ OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Found owned devices. Count =%d",
pOwnedDevList.size());
std::shared_ptr< OC::OCSecureResource > ownedDevice =
findEnrollee(
}
else
{
- OC_LOG(ERROR, ENROLEE_SECURITY_TAG, "No owned devices found.");
+ OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "No owned devices found.");
ownershipStatus = DEVICE_NOT_OWNED;
}
result = OCSecure::discoverUnownedDevices(ES_SEC_DISCOVERY_TIMEOUT, pUnownedDevList);
if (result != OC_STACK_OK)
{
- OC_LOG(ERROR, ENROLEE_SECURITY_TAG, "UnOwned Discovery failed.");
+ OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "UnOwned Discovery failed.");
ownershipStatus = DEVICE_NOT_OWNED;
//Throw exception
throw ESPlatformException(result);
}
else if (pUnownedDevList.size())
{
- OC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Found Unowned devices. Count =%d",
+ OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Found Unowned devices. Count =%d",
pUnownedDevList.size());
m_unownedDevice =
CreateJustWorksOwnerTransferPayload;
OCSecure::setOwnerTransferCallbackData(OIC_JUST_WORKS, &justWorksCBData, NULL);
- OC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Transfering ownership for : %s ",
+ OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Transfering ownership for : %s ",
m_unownedDevice->getDeviceID().c_str());
OC::ResultCallBack ownershipTransferCb = std::bind(
if (m_unownedDevice->doOwnershipTransfer(ownershipTransferCb) != OC_STACK_OK)
{
- OC_LOG(ERROR, ENROLEE_SECURITY_TAG, "OwnershipTransferCallback is failed");
+ OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "OwnershipTransferCallback is failed");
ownershipStatus = DEVICE_NOT_OWNED;
//Throw exception
throw ESPlatformException(result);
}
else
{
- OC_LOG(ERROR, ENROLEE_SECURITY_TAG, "No unSecure devices found.");
+ OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, "No unSecure devices found.");
ownershipStatus = DEVICE_NOT_OWNED;
return ownershipStatus;