From 0a8ec482a5ad10bf3cd7010c89630b42ecaca741 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期五, 05 二月 2021 10:19:31 +0800 Subject: [PATCH] Merge branch 'NewFilePath' into CJL --- HDL_ON/DAL/Server/HttpServerRequest.cs | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index dac0006..e3bed2f 100644 --- a/HDL_ON/DAL/Server/HttpServerRequest.cs +++ b/HDL_ON/DAL/Server/HttpServerRequest.cs @@ -604,6 +604,8 @@ /// </summary> public string GetGatewayInfo() { + if (DB_ResidenceData.Instance.HomeGateway == null) + return StateCode.NETWORK_ERROR; Dictionary<string, object> d = new Dictionary<string, object>(); d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); @@ -1810,7 +1812,7 @@ { Dictionary<string, object> d = new Dictionary<string, object>(); d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); - d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId);//DriverLayer.Control.Ins.GatewayId); + d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway == null ? "0" : DB_ResidenceData.Instance.HomeGateway.gatewayId);//DriverLayer.Control.Ins.GatewayId); d.Add("actions", actionObjs); var requestJson = HttpUtil.GetSignRequestJson(d); -- Gitblit v1.8.0