From 64fe527c42f28aba7abac9ff83c16cb89fbef8f1 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 6 Mar 2019 13:11:16 +0100 Subject: [PATCH] Fix cicli redirect inutili --- MConnectSDK/MConnectClient.cs | 11 ++++------- TestClient/MainForm.cs | 6 ++---- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/MConnectSDK/MConnectClient.cs b/MConnectSDK/MConnectClient.cs index 347a8be..a9319ec 100644 --- a/MConnectSDK/MConnectClient.cs +++ b/MConnectSDK/MConnectClient.cs @@ -739,23 +739,20 @@ namespace MConnectSDK authData.outMessage += sb.ToString(); // verifico SE sia stato x autorizzato... - if (reqStatus.isAuth) + if (reqStatus.isAuth || authData.hasAuth) { sb.AppendLine(""); - sb.AppendLine("--------------------------------------------------"); sb.AppendLine("SUCCESS 200: AUTH RECEIVED!"); - sb.AppendLine("--------------------------------------------------"); authData.outMessage += sb.ToString(); } // verifico SE sia stato registrato... - if (reqStatus.isHmiEnrolled) + if (reqStatus.isHmiEnrolled || authData.isEnrolled) { sb.AppendLine(""); - sb.AppendLine("--------------------------------------------------"); - sb.AppendLine(string.Format("{0:HH.mm.ss.fff} | AUTH + ENROLL DONE", DateTime.Now)); - sb.AppendLine("--------------------------------------------------"); + sb.AppendLine(string.Format("{0:HH.mm.ss.fff} | ENROLL DONE", DateTime.Now)); authData.outMessage += sb.ToString(); + processRequest = false; } // verifico se richiesta cancellazione... CHIUDO! diff --git a/TestClient/MainForm.cs b/TestClient/MainForm.cs index 630b95f..7872113 100644 --- a/TestClient/MainForm.cs +++ b/TestClient/MainForm.cs @@ -161,11 +161,10 @@ namespace TestClient // graphics will be disposed at this line pictBox.Image = bitmap; StringBuilder sb = new StringBuilder(); - //sb.AppendLine("--------------------------------------------------"); sb.AppendLine("AUTH DONE!"); - if (reqStatus.isHmiEnrolled) + if (authData.isEnrolled || reqStatus.isHmiEnrolled) { - sb.AppendLine(""); + sb.AppendLine("------"); sb.AppendLine("ENROLLED!"); } lblRetData.Text = sb.ToString(); @@ -176,7 +175,6 @@ namespace TestClient if (authData.userCode != "") { StringBuilder sb = new StringBuilder(); - //sb.AppendLine("--------------------------------------------------"); sb.AppendLine("device_code:"); sb.AppendLine(authData.deviceCode.ToString()); sb.AppendLine("");