aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Handlers')
-rw-r--r--OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs3
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs4
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Map/MapAddServerConnector.cs10
4 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
index c63b409..16d9b7d 100644
--- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
@@ -48,6 +48,7 @@ namespace OpenSim.Server.Handlers.Grid
48 public class GridServerPostHandler : BaseStreamHandler 48 public class GridServerPostHandler : BaseStreamHandler
49 { 49 {
50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 private static string LogHeader = "[GRID HANDLER]";
51 52
52 private IGridService m_GridService; 53 private IGridService m_GridService;
53 54
@@ -281,8 +282,8 @@ namespace OpenSim.Server.Handlers.Grid
281 else 282 else
282 m_log.WarnFormat("[GRID HANDLER]: no Y in request to get region by position"); 283 m_log.WarnFormat("[GRID HANDLER]: no Y in request to get region by position");
283 284
285 // m_log.DebugFormat("{0} GetRegionByPosition: loc=<{1},{2}>", LogHeader, x, y);
284 GridRegion rinfo = m_GridService.GetRegionByPosition(scopeID, x, y); 286 GridRegion rinfo = m_GridService.GetRegionByPosition(scopeID, x, y);
285 //m_log.DebugFormat("[GRID HANDLER]: neighbours for region {0}: {1}", regionID, rinfos.Count);
286 287
287 Dictionary<string, object> result = new Dictionary<string, object>(); 288 Dictionary<string, object> result = new Dictionary<string, object>();
288 if (rinfo == null) 289 if (rinfo == null)
diff --git a/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs
index 5d03097..f25e6e0 100644
--- a/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -105,6 +105,8 @@ namespace OpenSim.Server.Handlers.Hypergrid
105 hash["uuid"] = regInfo.RegionID.ToString(); 105 hash["uuid"] = regInfo.RegionID.ToString();
106 hash["x"] = regInfo.RegionLocX.ToString(); 106 hash["x"] = regInfo.RegionLocX.ToString();
107 hash["y"] = regInfo.RegionLocY.ToString(); 107 hash["y"] = regInfo.RegionLocY.ToString();
108 hash["size_x"] = regInfo.RegionSizeX.ToString();
109 hash["size_y"] = regInfo.RegionSizeY.ToString();
108 hash["region_name"] = regInfo.RegionName; 110 hash["region_name"] = regInfo.RegionName;
109 hash["hostname"] = regInfo.ExternalHostName; 111 hash["hostname"] = regInfo.ExternalHostName;
110 hash["http_port"] = regInfo.HttpPort.ToString(); 112 hash["http_port"] = regInfo.HttpPort.ToString();
diff --git a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
index 7137836..15b5b31 100644
--- a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
@@ -132,6 +132,8 @@ namespace OpenSim.Server.Handlers.Hypergrid
132 hash["uuid"] = regInfo.RegionID.ToString(); 132 hash["uuid"] = regInfo.RegionID.ToString();
133 hash["x"] = regInfo.RegionLocX.ToString(); 133 hash["x"] = regInfo.RegionLocX.ToString();
134 hash["y"] = regInfo.RegionLocY.ToString(); 134 hash["y"] = regInfo.RegionLocY.ToString();
135 hash["size_x"] = regInfo.RegionSizeX.ToString();
136 hash["size_y"] = regInfo.RegionSizeY.ToString();
135 hash["region_name"] = regInfo.RegionName; 137 hash["region_name"] = regInfo.RegionName;
136 hash["hostname"] = regInfo.ExternalHostName; 138 hash["hostname"] = regInfo.ExternalHostName;
137 hash["http_port"] = regInfo.HttpPort.ToString(); 139 hash["http_port"] = regInfo.HttpPort.ToString();
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();