}
}
-OCStackResult confirmCB(void * ctx)
+OCStackResult confirmCB_thread()
{
- OC_UNUSED(ctx);
for (;;)
{
int userConfirm;
}
if (1 == userConfirm)
{
+ SendUserConfirm(true);
break;
}
else if (0 == userConfirm)
{
- return OC_STACK_USER_DENIED_REQ;
+ SendUserConfirm(false);
+ break;
}
printf(" Entered Wrong Number. Please Enter Again\n");
}
return OC_STACK_OK;
}
+OCStackResult confirmCB(void * ctx)
+{
+ OC_UNUSED(ctx);
+ pthread_t threadId;
+ pthread_create (&threadId, NULL, &confirmCB_thread, NULL);
+ return OC_STACK_OK;
+}
+
void confirmNoCertCB(CACertificateVerificationStatus_t status)
{
if (CA_CERTIFICATE_VERIFY_SUCCESS_MUTUAL == status)
// Initialize Persistent Storage for SVR database
OCPersistentStorage ps = {server_fopen, fread, fwrite, fclose, unlink, NULL, NULL};
- SetUserConfirmCB(NULL, confirmCB);
+ SetAsyncUserConfirmCB(NULL, confirmCB);
SetInformOxmSelCB(informOxmSelCB);
CAsetCertificateVerificationCallback(confirmNoCertCB);