OIC_LOG(INFO, TAG, "Calling into application address space");
OCClientResponse *response = NULL;
+ OCPayloadType type = PAYLOAD_TYPE_INVALID;
response = (OCClientResponse *)OICCalloc(1, sizeof(*response));
if (!response)
if(responseInfo->info.payload &&
responseInfo->info.payloadSize)
{
- OCPayloadType type = PAYLOAD_TYPE_INVALID;
// check the security resource
if (SRMIsSecurityResourceURI(cbNode->requestUri))
{
}
#endif
// set remoteID(device ID) into OCClientResponse callback parameter
- if (OC_REST_DISCOVER == cbNode->method)
+ if (OC_REST_DISCOVER == cbNode->method && PAYLOAD_TYPE_DISCOVERY == type)
{
OCDiscoveryPayload *payload = (OCDiscoveryPayload*) response->payload;
// Payload can be empty in case of error message.