// This is the multicast case
OCMulticastNode* mcNode = NULL;
- mcNode = GetMCPresenceNode(fullUri);
+ mcNode = GetMCPresenceNode((const unsigned char *)fullUri);
if(mcNode != NULL)
{
OCFree(fullUri);
OCFree(ipAddress);
OCFree(resourceTypeName);
+return result;
}
{
OC_LOG(INFO, TAG, PCF("Enter HandleCAResponses"));
- OCStackApplicationResult result = OC_STACK_DELETE_TRANSACTION;
-
if(NULL == endPoint)
{
OC_LOG(ERROR, TAG, PCF("endPoint is NULL"));
//This function will be called back by CA layer when a request is received
void HandleCARequests(const CARemoteEndpoint_t* endPoint, const CARequestInfo_t* requestInfo)
{
- CAInfo_t responseData;
- CAResponseInfo_t responseInfo;
- OCStackResult requestResult = OC_STACK_ERROR;
-
OC_LOG(INFO, TAG, PCF("Enter HandleCARequests"));
#if 1
char * newUri = (char *)endPoint->resourceUri;
unsigned char * query = NULL;
- unsigned char * resourceType = NULL;
getQueryFromUri(endPoint->resourceUri, &query, &newUri);
OC_LOG_V(INFO, TAG, PCF("**********URI without query ****: %s\n"), newUri);
OC_LOG_V(INFO, TAG, PCF("**********Query ****: %s\n"), query);
//copy query
if(query)
{
- memcpy (&(serverRequest.query), query, strlen(query));
+ memcpy (&(serverRequest.query), query, strlen((char*)query));
}
//copy request payload
if (requestInfo->info.payload)
sizeof(CAHeaderOption_t)*requestInfo->info.numOptions);
}
- requestResult = HandleStackRequests (&serverRequest);
+ if(HandleStackRequests (&serverRequest) != OC_STACK_OK)
+ {
+ OC_LOG(INFO, TAG, PCF("HandleStackRequests failed"));
+ }
#endif
OC_LOG(INFO, TAG, PCF("Exit HandleCARequests"));
caResult = CAGenerateToken(&caToken);
//TODO-CA Remove this temporary fix (for some reason same token is being generated)
- static count = 0;
+ static int count = 0;
count++;
caToken[0] += count;