-// NOTE: This is test method for CONPRO-1172
-static SendDirectErrorResponsetoPeer(CAData_t* cadata)
-{
- CARequestInfo_t *reqInfo = cadata->requestInfo;
-
- CAResponseInfo_t respInfo = { .result = CA_INTERNAL_SERVER_ERROR };
- respInfo.info.messageId = reqInfo->info.messageId;
- respInfo.info.numOptions = reqInfo->info.numOptions;
-
- if (respInfo.info.numOptions)
- {
- respInfo.info.options =
- (CAHeaderOption_t *)OICCalloc(respInfo.info.numOptions, sizeof(CAHeaderOption_t));
- memcpy (respInfo.info.options, reqInfo->info.options,
- sizeof(CAHeaderOption_t) * respInfo.info.numOptions);
-
- }
-
- respInfo.info.payload = NULL;
- respInfo.info.token = reqInfo->info.token;
- respInfo.info.tokenLength = reqInfo->info.tokenLength;
- respInfo.info.type = reqInfo->info.type;
- respInfo.info.resourceUri = OICStrdup (reqInfo->info.resourceUri);
- respInfo.info.acceptFormat = CA_FORMAT_UNDEFINED;
- respInfo.info.dataType = CA_RESPONSE_DATA;
-
- CAResult_t caResult = CASendResponse(cadata->remoteEndpoint, &respInfo);
- // resourceUri in the info field is cloned in the CA layer and
- // thus ownership is still here.
- OICFree (respInfo.info.resourceUri);
- OICFree (respInfo.info.options);
- if(CA_STATUS_OK != caResult)
- {
- OIC_LOG_V(ERROR, TAG, "CASendResponse error - %d", caResult);
- }
-}
-