diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | 15 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/Map/MapAddServerConnector.cs | 4 |
2 files changed, 14 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs index 6d3ace9..322a9f8 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | |||
@@ -146,9 +146,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
146 | lock (m_scenes) | 146 | lock (m_scenes) |
147 | m_scenes[scene.RegionInfo.RegionID] = scene; | 147 | m_scenes[scene.RegionInfo.RegionID] = scene; |
148 | 148 | ||
149 | scene.EventManager.OnPrimsLoaded += new EventManager.PrimsLoaded(EventManager_OnPrimsLoaded); | 149 | scene.EventManager.OnLoginsEnabled += OnLoginsEnabled; |
150 | } | 150 | } |
151 | 151 | ||
152 | |||
152 | ///<summary> | 153 | ///<summary> |
153 | /// | 154 | /// |
154 | ///</summary> | 155 | ///</summary> |
@@ -163,9 +164,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
163 | 164 | ||
164 | #endregion ISharedRegionModule | 165 | #endregion ISharedRegionModule |
165 | 166 | ||
166 | void EventManager_OnPrimsLoaded(Scene s) | 167 | void OnLoginsEnabled(string regionName) |
167 | { | 168 | { |
168 | UploadMapTile(s); | 169 | Scene scene = null; |
170 | foreach (Scene s in m_scenes.Values) | ||
171 | if (s.RegionInfo.RegionName == regionName) | ||
172 | { | ||
173 | scene = s; | ||
174 | break; | ||
175 | } | ||
176 | if (scene != null) | ||
177 | UploadMapTile(scene); | ||
169 | } | 178 | } |
170 | 179 | ||
171 | 180 | ||
diff --git a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs index 8ba188d..4a61969 100644 --- a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs +++ b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs | |||
@@ -129,10 +129,10 @@ namespace OpenSim.Server.Handlers.MapImage | |||
129 | 129 | ||
130 | if (m_GridService != null) | 130 | if (m_GridService != null) |
131 | { | 131 | { |
132 | System.Net.IPAddress ipAddr = GetCallerIP(httpRequest); | ||
132 | GridRegion r = m_GridService.GetRegionByPosition(UUID.Zero, x * (int)Constants.RegionSize, y * (int)Constants.RegionSize); | 133 | GridRegion r = m_GridService.GetRegionByPosition(UUID.Zero, x * (int)Constants.RegionSize, y * (int)Constants.RegionSize); |
133 | if (r != null) | 134 | if (r != null) |
134 | { | 135 | { |
135 | System.Net.IPAddress ipAddr = GetCallerIP(httpRequest); | ||
136 | if (r.ExternalEndPoint.Address.ToString() != ipAddr.ToString()) | 136 | if (r.ExternalEndPoint.Address.ToString() != ipAddr.ToString()) |
137 | { | 137 | { |
138 | m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be trying to impersonate region in IP {1}", ipAddr, r.ExternalEndPoint.Address); | 138 | m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be trying to impersonate region in IP {1}", ipAddr, r.ExternalEndPoint.Address); |
@@ -143,7 +143,7 @@ namespace OpenSim.Server.Handlers.MapImage | |||
143 | else | 143 | else |
144 | { | 144 | { |
145 | m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be rogue. Region not found at coordinates {1}-{2}", | 145 | m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be rogue. Region not found at coordinates {1}-{2}", |
146 | httpRequest.RemoteIPEndPoint.Address, x, y); | 146 | ipAddr, x, y); |
147 | return FailureResult("Region not found at given coordinates"); | 147 | return FailureResult("Region not found at given coordinates"); |
148 | } | 148 | } |
149 | } | 149 | } |