OCPayload* payload = NULL;
char *interfaceQuery = NULL;
char *resourceTypeQuery = NULL;
- char *dataModelVersions = NULL;
OIC_LOG(INFO, TAG, "Entering HandleVirtualResource");
OICFree(resourceTypeQuery);
}
OCPayloadDestroy(payload);
- if (dataModelVersions)
- {
- OICFree(dataModelVersions);
- }
+
// To ignore the message, OC_STACK_CONTINUE is sent
return discoveryResult;
}
else
{
#ifdef RD_CLIENT
- // if request uri is '/oic/rd', update ins value of resource.
- char *targetUri = strstr(cbNode->requestUri, OC_RSRVD_RD_URI);
- if (targetUri)
+ if (cbNode->requestUri)
{
- OCUpdateResourceInsWithResponse(cbNode->requestUri, response);
+ // if request uri is '/oic/rd', update ins value of resource.
+ char *targetUri = strstr(cbNode->requestUri, OC_RSRVD_RD_URI);
+ if (targetUri)
+ {
+ OCUpdateResourceInsWithResponse(cbNode->requestUri, response);
+ }
}
#endif
// set remoteID(device ID) into OCClientResponse callback parameter
{
OCChildResource *temp = tempChildResource->next;
OICFree(tempChildResource);
- tempLastChildResource->next = temp;
- temp = NULL;
+ if (tempLastChildResource)
+ {
+ tempLastChildResource->next = temp;
+ temp = NULL;
+ }
}
OIC_LOG(INFO, TAG, "resource unbound");
headResource = temp->next;
}
// Deleting tail.
- else if (temp == tailResource)
+ else if (temp == tailResource && prev)
{
tailResource = prev;
tailResource->next = NULL;
}
- else
+ else if (prev)
{
prev->next = temp->next;
}