From f2735c6585c3c38d70771a22ee9e3cabf5da7428 Mon Sep 17 00:00:00 2001 From: root <295172551@qq.com> Date: Sat, 14 Jun 2025 01:25:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9IMS=E5=92=8CCore?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E5=A4=8D=E5=88=B6=E5=88=B0?= =?UTF-8?q?MME=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CoreAgent.Domain/Models/System/AppSettings.cs | 5 +++++ .../Services/Network/CellularNetworkService.cs | 18 +++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/CoreAgent.Domain/Models/System/AppSettings.cs b/CoreAgent.Domain/Models/System/AppSettings.cs index a31bc5c..86c9c54 100644 --- a/CoreAgent.Domain/Models/System/AppSettings.cs +++ b/CoreAgent.Domain/Models/System/AppSettings.cs @@ -14,4 +14,9 @@ public class AppSettings /// RAN配置目录路径 /// public string RanConfigDirectory { get; set; } = "/root/enb/config/config_ran/"; + + /// + /// MME配置目录路径 + /// + public string MmeConfigDirectory { get; set; } = "/root/mme/config/"; } \ No newline at end of file diff --git a/CoreAgent.Infrastructure/Services/Network/CellularNetworkService.cs b/CoreAgent.Infrastructure/Services/Network/CellularNetworkService.cs index 5d4c4f6..cbc3211 100644 --- a/CoreAgent.Infrastructure/Services/Network/CellularNetworkService.cs +++ b/CoreAgent.Infrastructure/Services/Network/CellularNetworkService.cs @@ -263,7 +263,7 @@ public class CellularNetworkService : ICellularNetworkService { try { - // 确保临时目录和RAN配置目录存在 + // 确保临时目录和配置目录存在 if (!Directory.Exists(_appSettings.TempDirectory)) { Directory.CreateDirectory(_appSettings.TempDirectory); @@ -272,6 +272,10 @@ public class CellularNetworkService : ICellularNetworkService { Directory.CreateDirectory(_appSettings.RanConfigDirectory); } + if (!Directory.Exists(_appSettings.MmeConfigDirectory)) + { + Directory.CreateDirectory(_appSettings.MmeConfigDirectory); + } // 复制 RAG 配置文件 if (!string.IsNullOrEmpty(networkConfig.RagConfig)) @@ -304,11 +308,11 @@ public class CellularNetworkService : ICellularNetworkService var coreFileName = Path.GetFileName(config.CoreNetworkConfig); var coreTempPath = Path.Combine(_appSettings.TempDirectory, coreFileName); - var coreRanPath = Path.Combine(_appSettings.RanConfigDirectory, coreFileName); + var coreMmePath = Path.Combine(_appSettings.MmeConfigDirectory, coreFileName); File.Copy(config.CoreNetworkConfig, coreTempPath, true); - File.Copy(config.CoreNetworkConfig, coreRanPath, true); - config.CoreNetworkConfig = coreRanPath; + File.Copy(config.CoreNetworkConfig, coreMmePath, true); + config.CoreNetworkConfig = coreMmePath; } if (!string.IsNullOrEmpty(config.ImsConfig)) @@ -321,11 +325,11 @@ public class CellularNetworkService : ICellularNetworkService var imsFileName = Path.GetFileName(config.ImsConfig); var imsTempPath = Path.Combine(_appSettings.TempDirectory, imsFileName); - var imsRanPath = Path.Combine(_appSettings.RanConfigDirectory, imsFileName); + var imsMmePath = Path.Combine(_appSettings.MmeConfigDirectory, imsFileName); File.Copy(config.ImsConfig, imsTempPath, true); - File.Copy(config.ImsConfig, imsRanPath, true); - config.ImsConfig = imsRanPath; + File.Copy(config.ImsConfig, imsMmePath, true); + config.ImsConfig = imsMmePath; } }