aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Handlers/Map/MapAddServerConnector.cs')
-rw-r--r--OpenSim/Server/Handlers/Map/MapAddServerConnector.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs
index 649a27e..38dfffc 100644
--- a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs
+++ b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs
@@ -118,9 +118,13 @@ namespace OpenSim.Server.Handlers.MapImage
118 httpResponse.StatusCode = (int)OSHttpStatusCode.ClientErrorBadRequest; 118 httpResponse.StatusCode = (int)OSHttpStatusCode.ClientErrorBadRequest;
119 return FailureResult("Bad request."); 119 return FailureResult("Bad request.");
120 } 120 }
121 uint x = 0, y = 0; 121 int x = 0, y = 0;
122 UInt32.TryParse(request["X"].ToString(), out x); 122// UUID scopeID = new UUID("07f8d88e-cd5e-4239-a0ed-843f75d09992");
123 UInt32.TryParse(request["Y"].ToString(), out y); 123 UUID scopeID = UUID.Zero;
124 Int32.TryParse(request["X"].ToString(), out x);
125 Int32.TryParse(request["Y"].ToString(), out y);
126 if (request.ContainsKey("SCOPE"))
127 UUID.TryParse(request["SCOPE"].ToString(), out scopeID);
124 128
125 m_log.DebugFormat("[MAP ADD SERVER CONNECTOR]: Received map data for region at {0}-{1}", x, y); 129 m_log.DebugFormat("[MAP ADD SERVER CONNECTOR]: Received map data for region at {0}-{1}", x, y);
126 130
@@ -132,7 +136,7 @@ namespace OpenSim.Server.Handlers.MapImage
132 if (m_GridService != null) 136 if (m_GridService != null)
133 { 137 {
134 System.Net.IPAddress ipAddr = GetCallerIP(httpRequest); 138 System.Net.IPAddress ipAddr = GetCallerIP(httpRequest);
135 GridRegion r = m_GridService.GetRegionByPosition(UUID.Zero, (int)Util.RegionToWorldLoc(x), (int)Util.RegionToWorldLoc(y)); 139 GridRegion r = m_GridService.GetRegionByPosition(UUID.Zero, (int)Util.RegionToWorldLoc((uint)x), (int)Util.RegionToWorldLoc((uint)y));
136 if (r != null) 140 if (r != null)
137 { 141 {
138 if (r.ExternalEndPoint.Address.ToString() != ipAddr.ToString()) 142 if (r.ExternalEndPoint.Address.ToString() != ipAddr.ToString())
@@ -153,7 +157,8 @@ namespace OpenSim.Server.Handlers.MapImage
153 byte[] data = Convert.FromBase64String(request["DATA"].ToString()); 157 byte[] data = Convert.FromBase64String(request["DATA"].ToString());
154 158
155 string reason = string.Empty; 159 string reason = string.Empty;
156 bool result = m_MapService.AddMapTile((int)x, (int)y, data, out reason); 160
161 bool result = m_MapService.AddMapTile((int)x, (int)y, data, scopeID, out reason);
157 162
158 if (result) 163 if (result)
159 return SuccessResult(); 164 return SuccessResult();