printf("Received OC_STACK_OK from server\n");
if(clientResponse->payload)
{
- printf("Response ===================> %s\n", clientResponse->payload);
+ printf("Response ===================> %p\n", clientResponse->payload);
}
}
else if(OC_STACK_RESOURCE_CHANGED == clientResponse->result)
// for error checking, the return value saved and printed
g_doneCB = false;
-#ifdef _ENABLE_MULTIPLE_OWNER_
+#ifdef MULTIPLE_OWNER
OCProvisionDev_t* dev = NULL;
LL_FOREACH(g_motdev_list, dev)
{
if(OIC_PRECONFIG_PIN == dev->doxm->oxmSel)
{
//Pre-Configured PIN initialization
- const char* testPreconfPin = "12341234";
- if(OC_STACK_OK != OCAddPreconfigPIN(dev, testPreconfPin, strlen(testPreconfPin)))
+ const char* testPreconfigPin = "12341234";
+ if(OC_STACK_OK != OCAddPreconfigPin(dev, testPreconfigPin, strlen(testPreconfigPin)))
{
printf("\n\n\n*** %60s ***\n", "WARNNING : Failed to save the pre-configured PIN");
printf("*** %60s ***\n\n\n", "WARNNING : You can't use the pre-configured PIN OxM for MOT");
}
}
}
-#endif //_ENABLE_MULTIPLE_OWNER_
+#endif //MULTIPLE_OWNER
if(OC_STACK_OK != OCDoMultipleOwnershipTransfer(g_ctx, g_motdev_list, multipleOwnershipTransferCB))
{
}
}
+ if(!g_doneCB)
+ {
+ OCPDMCleanupForTimeout();
+ }
+
return 0;
}