aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server
diff options
context:
space:
mode:
authorRobert Adams2013-11-28 08:20:16 -0800
committerRobert Adams2013-11-28 08:20:16 -0800
commit7aa00632b90f9c24ff6b0fa0da385744a6573c32 (patch)
treebc63b12b893d3842932e4d0a3def8ed038288004 /OpenSim/Server
parentMerge branch 'master' into varregion (diff)
downloadopensim-SC_OLD-7aa00632b90f9c24ff6b0fa0da385744a6573c32.zip
opensim-SC_OLD-7aa00632b90f9c24ff6b0fa0da385744a6573c32.tar.gz
opensim-SC_OLD-7aa00632b90f9c24ff6b0fa0da385744a6573c32.tar.bz2
opensim-SC_OLD-7aa00632b90f9c24ff6b0fa0da385744a6573c32.tar.xz
varregion: many replacements of in-place arithmetic with calls to
the Util functions for converting world addresses to region addresses and converting region handles to locations.
Diffstat (limited to '')
-rw-r--r--OpenSim/Server/Handlers/Map/MapAddServerConnector.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs
index d438fc7..4d1729e 100644
--- a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs
+++ b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs
@@ -116,9 +116,9 @@ namespace OpenSim.Server.Handlers.MapImage
116 httpResponse.StatusCode = (int)OSHttpStatusCode.ClientErrorBadRequest; 116 httpResponse.StatusCode = (int)OSHttpStatusCode.ClientErrorBadRequest;
117 return FailureResult("Bad request."); 117 return FailureResult("Bad request.");
118 } 118 }
119 int x = 0, y = 0; 119 uint x = 0, y = 0;
120 Int32.TryParse(request["X"].ToString(), out x); 120 UInt32.TryParse(request["X"].ToString(), out x);
121 Int32.TryParse(request["Y"].ToString(), out y); 121 UInt32.TryParse(request["Y"].ToString(), out y);
122 122
123 m_log.DebugFormat("[MAP ADD SERVER CONNECTOR]: Received map data for region at {0}-{1}", x, y); 123 m_log.DebugFormat("[MAP ADD SERVER CONNECTOR]: Received map data for region at {0}-{1}", x, y);
124 124
@@ -130,7 +130,7 @@ namespace OpenSim.Server.Handlers.MapImage
130 if (m_GridService != null) 130 if (m_GridService != null)
131 { 131 {
132 System.Net.IPAddress ipAddr = GetCallerIP(httpRequest); 132 System.Net.IPAddress ipAddr = GetCallerIP(httpRequest);
133 GridRegion r = m_GridService.GetRegionByPosition(UUID.Zero, x * (int)Constants.RegionSize, y * (int)Constants.RegionSize); 133 GridRegion r = m_GridService.GetRegionByPosition(UUID.Zero, (int)Util.RegionToWorldLoc(x), (int)Util.RegionToWorldLoc(y));
134 if (r != null) 134 if (r != null)
135 { 135 {
136 if (r.ExternalEndPoint.Address.ToString() != ipAddr.ToString()) 136 if (r.ExternalEndPoint.Address.ToString() != ipAddr.ToString())
@@ -151,7 +151,7 @@ namespace OpenSim.Server.Handlers.MapImage
151 byte[] data = Convert.FromBase64String(request["DATA"].ToString()); 151 byte[] data = Convert.FromBase64String(request["DATA"].ToString());
152 152
153 string reason = string.Empty; 153 string reason = string.Empty;
154 bool result = m_MapService.AddMapTile(x, y, data, out reason); 154 bool result = m_MapService.AddMapTile((int)x, (int)y, data, out reason);
155 155
156 if (result) 156 if (result)
157 return SuccessResult(); 157 return SuccessResult();