aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2016-11-20 03:51:38 +0000
committerUbitUmarov2016-11-20 03:51:38 +0000
commite2b580e56906f76e74abfdac5a11a1c1bbc31252 (patch)
tree86669bfd90c86f9637acaca45084fd4804f0caf7 /OpenSim
parentHG UserAgent, return serverURI (diff)
downloadopensim-SC_OLD-e2b580e56906f76e74abfdac5a11a1c1bbc31252.zip
opensim-SC_OLD-e2b580e56906f76e74abfdac5a11a1c1bbc31252.tar.gz
opensim-SC_OLD-e2b580e56906f76e74abfdac5a11a1c1bbc31252.tar.bz2
opensim-SC_OLD-e2b580e56906f76e74abfdac5a11a1c1bbc31252.tar.xz
HG LinkRegion sends region size also
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs6
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs8
-rw-r--r--OpenSim/Services/Interfaces/IHypergridServices.cs2
3 files changed, 13 insertions, 3 deletions
diff --git a/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs
index c7ac9be..cb15138 100644
--- a/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs
@@ -70,13 +70,17 @@ namespace OpenSim.Server.Handlers.Hypergrid
70 string imageURL = string.Empty; 70 string imageURL = string.Empty;
71 ulong regionHandle = 0; 71 ulong regionHandle = 0;
72 string reason = string.Empty; 72 string reason = string.Empty;
73 int sizeX = 256;
74 int sizeY = 256;
73 75
74 bool success = m_GatekeeperService.LinkRegion(name, out regionID, out regionHandle, out externalName, out imageURL, out reason); 76 bool success = m_GatekeeperService.LinkRegion(name, out regionID, out regionHandle, out externalName, out imageURL, out reason, out sizeX, out sizeY);
75 77
76 Hashtable hash = new Hashtable(); 78 Hashtable hash = new Hashtable();
77 hash["result"] = success.ToString(); 79 hash["result"] = success.ToString();
78 hash["uuid"] = regionID.ToString(); 80 hash["uuid"] = regionID.ToString();
79 hash["handle"] = regionHandle.ToString(); 81 hash["handle"] = regionHandle.ToString();
82 hash["size_x"] = sizeX;
83 hash["size_y"] = sizeY;
80 hash["region_image"] = imageURL; 84 hash["region_image"] = imageURL;
81 hash["external_name"] = externalName; 85 hash["external_name"] = externalName;
82 86
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 9643a8b..41e2b40 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -162,10 +162,12 @@ namespace OpenSim.Services.HypergridService
162 exceptions.Add(s.Trim()); 162 exceptions.Add(s.Trim());
163 } 163 }
164 164
165 public bool LinkRegion(string regionName, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason) 165 public bool LinkRegion(string regionName, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason, out int sizeX, out int sizeY)
166 { 166 {
167 regionID = UUID.Zero; 167 regionID = UUID.Zero;
168 regionHandle = 0; 168 regionHandle = 0;
169 sizeX = (int)Constants.RegionSize;
170 sizeY = (int)Constants.RegionSize;
169 externalName = m_ExternalName + ((regionName != string.Empty) ? " " + regionName : ""); 171 externalName = m_ExternalName + ((regionName != string.Empty) ? " " + regionName : "");
170 imageURL = string.Empty; 172 imageURL = string.Empty;
171 reason = string.Empty; 173 reason = string.Empty;
@@ -199,6 +201,8 @@ namespace OpenSim.Services.HypergridService
199 201
200 regionID = region.RegionID; 202 regionID = region.RegionID;
201 regionHandle = region.RegionHandle; 203 regionHandle = region.RegionHandle;
204 sizeX = region.RegionSizeX;
205 sizeY = region.RegionSizeY;
202 206
203 string regionimage = "regionImage" + regionID.ToString(); 207 string regionimage = "regionImage" + regionID.ToString();
204 regionimage = regionimage.Replace("-", ""); 208 regionimage = regionimage.Replace("-", "");
@@ -275,6 +279,7 @@ namespace OpenSim.Services.HypergridService
275 279
276 if (!am.Success) 280 if (!am.Success)
277 { 281 {
282 reason = "Login failed: client " + curViewer + " is not allowed";
278 m_log.InfoFormat("[GATEKEEPER SERVICE]: Login failed, reason: client {0} is not allowed", curViewer); 283 m_log.InfoFormat("[GATEKEEPER SERVICE]: Login failed, reason: client {0} is not allowed", curViewer);
279 return false; 284 return false;
280 } 285 }
@@ -287,6 +292,7 @@ namespace OpenSim.Services.HypergridService
287 292
288 if (dm.Success) 293 if (dm.Success)
289 { 294 {
295 reason = "Login failed: client " + curViewer + " is denied";
290 m_log.InfoFormat("[GATEKEEPER SERVICE]: Login failed, reason: client {0} is denied", curViewer); 296 m_log.InfoFormat("[GATEKEEPER SERVICE]: Login failed, reason: client {0} is denied", curViewer);
291 return false; 297 return false;
292 } 298 }
diff --git a/OpenSim/Services/Interfaces/IHypergridServices.cs b/OpenSim/Services/Interfaces/IHypergridServices.cs
index 5e012fb..1815e6c 100644
--- a/OpenSim/Services/Interfaces/IHypergridServices.cs
+++ b/OpenSim/Services/Interfaces/IHypergridServices.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Services.Interfaces
36{ 36{
37 public interface IGatekeeperService 37 public interface IGatekeeperService
38 { 38 {
39 bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason); 39 bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason, out int sizeX, out int sizeY);
40 40
41 /// <summary> 41 /// <summary>
42 /// Returns the region a Hypergrid visitor should enter. 42 /// Returns the region a Hypergrid visitor should enter.