if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED)
{
+ ESResult result = ESResult::ES_ERROR;
+
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
- "onProvisioningResponse : Provisioning is failed ");
+ "onProvisioningResponse : Provisioning is failed ");
+
+ if(eCode == OCStackResult::OC_STACK_COMM_ERROR)
+ {
+ OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
+ "can't receive any response from Enrollee by a timeout threshold.");
+ result = ESResult::ES_COMMUNICATION_ERROR;
+ }
+
std::shared_ptr< DevicePropProvisioningStatus > provStatus = std::make_shared<
- DevicePropProvisioningStatus >(ESResult::ES_ERROR);
+ DevicePropProvisioningStatus >(result);
m_devicePropProvStatusCb(provStatus);
return;
}
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
"onGetStatusResponse : onGetStatusResponse is failed ");
- if (eCode == OCStackResult::OC_STACK_UNAUTHORIZED_REQ)
+ if(eCode == OCStackResult::OC_STACK_COMM_ERROR)
{
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
- "Mediator is unauthorized from Enrollee.");
- result = ESResult::ES_UNAUTHORIZED_REQ;
+ "can't receive any response from Enrollee by a timeout threshold.");
+ result = ESResult::ES_COMMUNICATION_ERROR;
}
EnrolleeStatus enrolleeStatus(rep);
if (eCode > OCStackResult::OC_STACK_RESOURCE_CHANGED)
{
- ESResult result = ESResult::ES_ERROR;
+ ESResult result = ESResult::ES_ERROR;
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
"onGetConfigurationResponse : onGetConfigurationResponse is failed ");
- if (eCode == OCStackResult::OC_STACK_UNAUTHORIZED_REQ)
+ if(eCode == OCStackResult::OC_STACK_COMM_ERROR)
{
OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG,
- "Mediator is unauthorized from Enrollee.");
- result = ESResult::ES_UNAUTHORIZED_REQ;
+ "can't receive any response from Enrollee by a timeout threshold.");
+ result = ESResult::ES_COMMUNICATION_ERROR;
}
EnrolleeConf enrolleeConf(rep);
const OCRepresentation& rep, const int eCode) >(
std::bind(&EnrolleeResource::onGetStatusResponse, this,
std::placeholders::_1, std::placeholders::_2,
- std::placeholders::_3)));
+ std::placeholders::_3)), OC::QualityOfService::HighQos);
};
OCStackResult result = getStatus();
const OCRepresentation& rep, const int eCode) >(
std::bind(&EnrolleeResource::onGetConfigurationResponse, this,
std::placeholders::_1, std::placeholders::_2,
- std::placeholders::_3)));
+ std::placeholders::_3)), OC::QualityOfService::HighQos);
};
OCStackResult result = getConfigurationStatus();
const OCRepresentation& rep, const int eCode) >(
std::bind(&EnrolleeResource::onProvisioningResponse, this,
std::placeholders::_1, std::placeholders::_2,
- std::placeholders::_3)));
+ std::placeholders::_3)), OC::QualityOfService::HighQos);
}
}
}