update patch
parent
ff180919e3
commit
bcf3006429
|
@ -1,18 +1,18 @@
|
||||||
From affb6e69909f26090497e8e3dae11544c269cd27 Mon Sep 17 00:00:00 2001
|
From 6f363359d89cf5835d2fc32bedbdd89faf1311d1 Mon Sep 17 00:00:00 2001
|
||||||
From: Christopher <git@clatza.dev>
|
From: Christopher <git@clatza.dev>
|
||||||
Date: Fri, 18 Mar 2022 12:52:23 +0100
|
Date: Fri, 18 Mar 2022 13:55:34 +0100
|
||||||
Subject: [PATCH] Add External Hostname == DYNDNSIP to call current external ip
|
Subject: [PATCH] Add External Hostname == DYNDNSIP to call current external ip
|
||||||
from aws services
|
from aws services
|
||||||
|
|
||||||
---
|
---
|
||||||
OpenSim/Framework/RegionInfo.cs | 20 ++++++++++++++++++++
|
OpenSim/Framework/RegionInfo.cs | 24 ++++++++++++++++++++++++
|
||||||
1 file changed, 20 insertions(+)
|
1 file changed, 24 insertions(+)
|
||||||
|
|
||||||
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
|
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
|
||||||
index 507c51852b..4282fe06c0 100755
|
index 507c51852b..f3bc127d54 100755
|
||||||
--- a/OpenSim/Framework/RegionInfo.cs
|
--- a/OpenSim/Framework/RegionInfo.cs
|
||||||
+++ b/OpenSim/Framework/RegionInfo.cs
|
+++ b/OpenSim/Framework/RegionInfo.cs
|
||||||
@@ -596,6 +596,26 @@ namespace OpenSim.Framework
|
@@ -596,6 +596,30 @@ namespace OpenSim.Framework
|
||||||
m_log.InfoFormat(
|
m_log.InfoFormat(
|
||||||
"[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}",
|
"[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}",
|
||||||
m_externalHostName, name);
|
m_externalHostName, name);
|
||||||
|
@ -24,17 +24,21 @@ index 507c51852b..4282fe06c0 100755
|
||||||
+ {
|
+ {
|
||||||
+ using (WebClient getIpClient = new WebClient())
|
+ using (WebClient getIpClient = new WebClient())
|
||||||
+ {
|
+ {
|
||||||
+ m_externalHostName = getIpClient.DownloadString("http://checkip.amazonaws.com/");
|
+ String externalip = getIpClient.DownloadString("http://checkip.amazonaws.com/");
|
||||||
+
|
+
|
||||||
+ m_log.InfoFormat(
|
+ if (externalip != null)
|
||||||
+ "[REGIONINFO]: Resolving DYNDNSIP to {0} for region {1}",
|
+ {
|
||||||
+ m_externalHostName, name);
|
+ m_externalHostName = externalip.Trim();
|
||||||
|
+ m_log.InfoFormat("[REGIONINFO]: Resolving DYNDNSIP to {0} for region {1}", m_externalHostName, name);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ m_log.ErrorFormat("[REGIONINFO]: Resolving DYNDNSIP failed for region {0}", name);
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ }catch(Exception error)
|
+ }catch(Exception error)
|
||||||
+ {
|
+ {
|
||||||
+ m_log.ErrorFormat(
|
+ m_log.ErrorFormat("[REGIONINFO]: Resolving DYNDNSIP failed for region {0}: {1}", name, error.Message);
|
||||||
+ "[REGIONINFO]: Resolving DYNDNSIP failed for region {0}: {1}",
|
|
||||||
+ name, error.Message);
|
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
else if (!m_resolveAddress)
|
else if (!m_resolveAddress)
|
||||||
|
|
Loading…
Reference in New Issue