1. Returning CA_MEMORY_ALLOC_FAILED instead of CA_STATUS_FAILED.
2. If request doesn't contain RequestURI/Proxy URI, then return OC_STACK_INVALID_URI.
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/545/commits/
a2e9bce4cc70b63f9a82cce82970167126794e9a
(cherry-picked from
ac207215d4c4550ad89c9b72ab81b859a83a0c2b)
Change-Id: Ib5f2b05dbc621ee8cc70ae9760a70b44a8c476f8
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
if (!cadata)
{
OIC_LOG(ERROR, TAG, "cadata memory allocation failed");
- return CA_STATUS_FAILED;
+ return CA_MEMORY_ALLOC_FAILED;
}
CAEndpoint_t* ep = CACloneEndpoint(endpoint);
{
OIC_LOG(ERROR, TAG, "endpoint clone failed");
OICFree(cadata);
- return CA_STATUS_FAILED;
+ return CA_MEMORY_ALLOC_FAILED;
}
cadata->remoteEndpoint = ep;
}
else if (!checkProxyUri(options, numOptions))
{
+ result = OC_STACK_INVALID_URI;
OIC_LOG(ERROR, TAG, "Request doesn't contain RequestURI/Proxy URI");
goto exit;
}