Move Closing QR viewer into response callbacks 49/317849/1
authorYonggoo Kang <ygace.kang@samsung.com>
Thu, 19 Sep 2024 09:42:42 +0000 (18:42 +0900)
committerYonggoo Kang <ygace.kang@samsung.com>
Thu, 19 Sep 2024 09:42:47 +0000 (18:42 +0900)
By this patch, the viewer will be closed at early and after returned any error.

Change-Id: I8f519155209f3546763b3fde68204de0617e103c

tests/manual/man_tests.cpp

index 4fb79a909d0cda0be1e1213c3f5987fa75a402a8..a1c105b7fd85dc74cdede5310d7867b20d68d1ed 100644 (file)
@@ -185,6 +185,7 @@ void MCCallback(const wauthn_pubkey_credential_attestation_s *pubkey_cred,
                 wauthn_error_e result,
                 void *data)
 {
+    CloseQR();
     auto *testContents = static_cast<TestContents *>(data);
     std::lock_guard<std::mutex> ulock(testContents->mutex);
     testContents->updateMCRet = result;
@@ -210,6 +211,7 @@ void GACallback(const wauthn_pubkey_credential_assertion_s *pubkey_cred,
                 wauthn_error_e result,
                 void *data)
 {
+    CloseQR();
     auto *testContents = static_cast<TestContents *>(data);
     std::lock_guard<std::mutex> ulock(testContents->mutex);
     testContents->updateGARet = result;
@@ -370,9 +372,6 @@ bool Test(struct TestContents &testContents)
         }
     }
 
-
-    CloseQR();
-
     std::cout << "START: Get Assertion" << std::endl;
     wauthn_pubkey_cred_request_options_s gaOptions;
     wauthn_ga_callbacks_s gaCallbacks;
@@ -468,8 +467,6 @@ bool Test(struct TestContents &testContents)
         }
     }
 
-    CloseQR();
-
     timeCount = 180;
     std::cout << "Waiting maximum 3 minutes for UpdateLinkedData CBs.." << std::endl;
     keepCheck = true;