diff options
author | Melanie Thielker | 2014-08-23 17:27:01 +0200 |
---|---|---|
committer | Melanie Thielker | 2014-08-23 17:27:01 +0200 |
commit | cbd7c7b9ecbe7bbe19d5c675322206bc8a977c5f (patch) | |
tree | 16b07a06b057f3ee29a4581e1810dbc5b34ad7cb /OpenSim/Server | |
parent | Merge branch 'ubitworkmaster' (diff) | |
download | opensim-SC-cbd7c7b9ecbe7bbe19d5c675322206bc8a977c5f.zip opensim-SC-cbd7c7b9ecbe7bbe19d5c675322206bc8a977c5f.tar.gz opensim-SC-cbd7c7b9ecbe7bbe19d5c675322206bc8a977c5f.tar.bz2 opensim-SC-cbd7c7b9ecbe7bbe19d5c675322206bc8a977c5f.tar.xz |
Change the map tile system to be multi-grid hosting compatible
Diffstat (limited to 'OpenSim/Server')
-rw-r--r-- | OpenSim/Server/Handlers/Map/MapAddServerConnector.cs | 5 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/Map/MapGetServerConnector.cs | 12 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/Map/MapRemoveServerConnector.cs | 5 |
3 files changed, 19 insertions, 3 deletions
diff --git a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs index d438fc7..7ee347c 100644 --- a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs +++ b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs | |||
@@ -117,8 +117,11 @@ namespace OpenSim.Server.Handlers.MapImage | |||
117 | return FailureResult("Bad request."); | 117 | return FailureResult("Bad request."); |
118 | } | 118 | } |
119 | int x = 0, y = 0; | 119 | int x = 0, y = 0; |
120 | UUID scopeID = new UUID("07f8d88e-cd5e-4239-a0ed-843f75d09992"); | ||
120 | Int32.TryParse(request["X"].ToString(), out x); | 121 | Int32.TryParse(request["X"].ToString(), out x); |
121 | Int32.TryParse(request["Y"].ToString(), out y); | 122 | Int32.TryParse(request["Y"].ToString(), out y); |
123 | if (request.ContainsKey("SCOPE")) | ||
124 | UUID.TryParse(request["SCOPE"].ToString(), out scopeID); | ||
122 | 125 | ||
123 | m_log.DebugFormat("[MAP ADD SERVER CONNECTOR]: Received map data for region at {0}-{1}", x, y); | 126 | m_log.DebugFormat("[MAP ADD SERVER CONNECTOR]: Received map data for region at {0}-{1}", x, y); |
124 | 127 | ||
@@ -151,7 +154,7 @@ namespace OpenSim.Server.Handlers.MapImage | |||
151 | byte[] data = Convert.FromBase64String(request["DATA"].ToString()); | 154 | byte[] data = Convert.FromBase64String(request["DATA"].ToString()); |
152 | 155 | ||
153 | string reason = string.Empty; | 156 | string reason = string.Empty; |
154 | bool result = m_MapService.AddMapTile(x, y, data, out reason); | 157 | bool result = m_MapService.AddMapTile(x, y, data, scopeID, out reason); |
155 | 158 | ||
156 | if (result) | 159 | if (result) |
157 | return SuccessResult(); | 160 | return SuccessResult(); |
diff --git a/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs b/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs index bd1ddbd..e2c8f35 100644 --- a/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs +++ b/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs | |||
@@ -38,6 +38,7 @@ using OpenSim.Server.Base; | |||
38 | using OpenSim.Services.Interfaces; | 38 | using OpenSim.Services.Interfaces; |
39 | using OpenSim.Framework.Servers.HttpServer; | 39 | using OpenSim.Framework.Servers.HttpServer; |
40 | using OpenSim.Server.Handlers.Base; | 40 | using OpenSim.Server.Handlers.Base; |
41 | using OpenMetaverse; | ||
41 | 42 | ||
42 | namespace OpenSim.Server.Handlers.MapImage | 43 | namespace OpenSim.Server.Handlers.MapImage |
43 | { | 44 | { |
@@ -93,7 +94,16 @@ namespace OpenSim.Server.Handlers.MapImage | |||
93 | 94 | ||
94 | byte[] result = new byte[0]; | 95 | byte[] result = new byte[0]; |
95 | string format = string.Empty; | 96 | string format = string.Empty; |
96 | result = m_MapService.GetMapTile(path.Trim('/'), out format); | 97 | |
98 | UUID scopeID = new UUID("07f8d88e-cd5e-4239-a0ed-843f75d09992"); | ||
99 | |||
100 | string[] bits = path.Trim('/').Split(new char[] {'/'}); | ||
101 | if (bits.Length > 1) | ||
102 | { | ||
103 | scopeID = new UUID(bits[0]); | ||
104 | path = bits[1]; | ||
105 | } | ||
106 | result = m_MapService.GetMapTile(path.Trim('/'), scopeID, out format); | ||
97 | if (result.Length > 0) | 107 | if (result.Length > 0) |
98 | { | 108 | { |
99 | httpResponse.StatusCode = (int)HttpStatusCode.OK; | 109 | httpResponse.StatusCode = (int)HttpStatusCode.OK; |
diff --git a/OpenSim/Server/Handlers/Map/MapRemoveServerConnector.cs b/OpenSim/Server/Handlers/Map/MapRemoveServerConnector.cs index 80e3535..8a31579 100644 --- a/OpenSim/Server/Handlers/Map/MapRemoveServerConnector.cs +++ b/OpenSim/Server/Handlers/Map/MapRemoveServerConnector.cs | |||
@@ -119,6 +119,9 @@ namespace OpenSim.Server.Handlers.MapImage | |||
119 | int x = 0, y = 0; | 119 | int x = 0, y = 0; |
120 | Int32.TryParse(request["X"].ToString(), out x); | 120 | Int32.TryParse(request["X"].ToString(), out x); |
121 | Int32.TryParse(request["Y"].ToString(), out y); | 121 | Int32.TryParse(request["Y"].ToString(), out y); |
122 | UUID scopeID = new UUID("07f8d88e-cd5e-4239-a0ed-843f75d09992"); | ||
123 | if (request.ContainsKey("SCOPE")) | ||
124 | UUID.TryParse(request["SCOPE"].ToString(), out scopeID); | ||
122 | 125 | ||
123 | m_log.DebugFormat("[MAP REMOVE SERVER CONNECTOR]: Received position data for region at {0}-{1}", x, y); | 126 | m_log.DebugFormat("[MAP REMOVE SERVER CONNECTOR]: Received position data for region at {0}-{1}", x, y); |
124 | 127 | ||
@@ -144,7 +147,7 @@ namespace OpenSim.Server.Handlers.MapImage | |||
144 | } | 147 | } |
145 | 148 | ||
146 | string reason = string.Empty; | 149 | string reason = string.Empty; |
147 | bool result = m_MapService.RemoveMapTile(x, y, out reason); | 150 | bool result = m_MapService.RemoveMapTile(x, y, scopeID, out reason); |
148 | 151 | ||
149 | if (result) | 152 | if (result) |
150 | return SuccessResult(); | 153 | return SuccessResult(); |