if (OC_STACK_OK != result)
{
- OIC_LOG(INFO, TAG, "Second DELETE call did not succeed");
+ OIC_LOG(INFO, TAG, "Second DELETE Request also failed");
+ }
+ else
+ {
+ OIC_LOG(INFO, TAG, "Second DELETE Request sent successfully; Waiting for Callback");
}
return NULL;
if (OC_STACK_OK != result)
{
// Error can happen if for example, network connectivity is down
- OIC_LOG(INFO, TAG, "First DELETE call did not succeed");
- }
- else
- {
+ OIC_LOG(INFO, TAG, "DELETE Request did not succeed; Will try again.");
//Create a thread to delete this resource again
pthread_t threadId;
pthread_create (&threadId, NULL, RequestDeleteDeathResourceTask, (void*)qos);
}
-
- OIC_LOG_V(INFO, TAG, "\n\nExit %s", __func__);
+ else
+ {
+ OIC_LOG(INFO, TAG, "DELETE Request sent successfully; Waiting for Callback");
+ }
return result;
}
if (result == OC_STACK_OK)
{
OIC_LOG (INFO, TAG, "\n\nDelete Resource operation succeeded.");
- ehResult = OC_EH_OK;
+ ehResult = OC_EH_RESOURCE_DELETED;
//Step 2: clear observers who wanted to observe this resource at the app level.
for (uint8_t i = 0; i < SAMPLE_MAX_NUM_OBSERVATIONS; i++)
else if (result == OC_STACK_NO_RESOURCE)
{
OIC_LOG(INFO, TAG, "\n\nThe resource doesn't exist or it might have been deleted.");
- ehResult = OC_EH_RESOURCE_DELETED;
+ ehResult = OC_EH_RESOURCE_NOT_FOUND;
}
else
{
OCSetRAInfo(&rainfo);
#endif
-
+
OIC_LOG(DEBUG, TAG, "OCServer is starting...");
OCPersistentStorage pstStr {
server_fopen,