From 223b318d0070d06e7b64192dc93aa8103865d657 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期二, 16 三月 2021 11:42:57 +0800
Subject: [PATCH] 1.

---
 HDL_ON/DAL/DriverLayer/Control.cs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 0d84d74..1e17902 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -229,7 +229,7 @@
         public void SearchLoaclGateway()
         {
             //2021-01-15 : 浣忓畢娌℃湁缁戝畾缃戝叧鐨勬椂鍊欎笉鐢ㄦ悳绱紝骞朵笖涓嶈兘閾炬帴mqtt
-            if(DB_ResidenceData.Instance.HomeGateway == null)
+            if(DB_ResidenceData.Instance.HomeGateway == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.gatewayId))
             {
                 return;
             }
@@ -625,7 +625,7 @@
                     var device = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceModule>(bodyJObj.objects.ToString());
                     if (device.device_mac == DB_ResidenceData.Instance.residenceGatewayMAC)
                     {
-                        //MainPage.Log("鏈湴鎼滅储缃戝叧鎴愬姛");   
+                        MainPage.Log("鏈湴鎼滅储缃戝叧鎴愬姛");
                         Ins.IsSearchLocalGatewaySuccessful = true;
                         Ins.GatewayOnline_Local = true;
                         if (!string.IsNullOrEmpty(device.gatewayId))

--
Gitblit v1.8.0