Browse Source

解决G客户FireTV:切了pid后devicecode变化了,会使用上一个pid的devicecode的dsn来抄写的Bug。

Jeff Wang 3 years ago
parent
commit
3d07fc9c64
1 changed files with 8 additions and 0 deletions
  1. 8 0
      FactoryTool_CShare/Views/OperationPanel.cs

+ 8 - 0
FactoryTool_CShare/Views/OperationPanel.cs

@@ -4810,6 +4810,14 @@ namespace MOKA_Factory_Tools
                             string psn = keyInfo._PSN.data = Encoding.ASCII.GetString(data_psn);
                             if (CommonMethod.GetFireTVDsn(midListNow.host, orderNow, Encoding.ASCII.GetString(data), SN, psn, out string dsn, out error_psn, errorDBNow))
                             {
+                                // 预防切了pid后,deviceCode变化了;
+                                if ( dsn.IndexOf(devicecode) == -1 )
+                                {
+                                    ErrMsg = string.Format("The device code [{0}] is not included in the DSN [{1}]!\r\n", devicecode, dsn);
+                                    Log.WriteErrorLog(ErrMsg);
+                                    goto end;
+                                }
+
                                 keyInfo.DSN.data = dsn;
                                 if (!CommonMethod.IsNumberAndWord(keyInfo.DSN.data))
                                 {