diff options
Diffstat (limited to 'OpenSim/Services')
9 files changed, 61 insertions, 21 deletions
diff --git a/OpenSim/Services/Connectors/AgentPreferences/AgentPreferencesConnector.cs b/OpenSim/Services/Connectors/AgentPreferences/AgentPreferencesConnector.cs index 1dbc0c8..0e72c8b 100644 --- a/OpenSim/Services/Connectors/AgentPreferences/AgentPreferencesConnector.cs +++ b/OpenSim/Services/Connectors/AgentPreferences/AgentPreferencesConnector.cs | |||
@@ -62,7 +62,7 @@ namespace OpenSim.Services.Connectors | |||
62 | Initialise(source); | 62 | Initialise(source); |
63 | } | 63 | } |
64 | 64 | ||
65 | public virtual void Initialise(IConfigSource source) | 65 | public void Initialise(IConfigSource source) |
66 | { | 66 | { |
67 | IConfig gridConfig = source.Configs["AgentPreferencesService"]; | 67 | IConfig gridConfig = source.Configs["AgentPreferencesService"]; |
68 | if (gridConfig == null) | 68 | if (gridConfig == null) |
diff --git a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs index 45f4514..74cd703 100644 --- a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs +++ b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs | |||
@@ -158,7 +158,7 @@ namespace OpenSim.Services.Connectors.Friends | |||
158 | 158 | ||
159 | try | 159 | try |
160 | { | 160 | { |
161 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); | 161 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString, 15, null, false); |
162 | if (reply != string.Empty) | 162 | if (reply != string.Empty) |
163 | { | 163 | { |
164 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 164 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs index aad3bd2..eef492d 100644 --- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs | |||
@@ -73,13 +73,15 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
73 | return "foreignobject/"; | 73 | return "foreignobject/"; |
74 | } | 74 | } |
75 | 75 | ||
76 | public bool LinkRegion(GridRegion info, out UUID regionID, out ulong realHandle, out string externalName, out string imageURL, out string reason) | 76 | public bool LinkRegion(GridRegion info, out UUID regionID, out ulong realHandle, out string externalName, out string imageURL, out string reason, out int sizeX, out int sizeY) |
77 | { | 77 | { |
78 | regionID = UUID.Zero; | 78 | regionID = UUID.Zero; |
79 | imageURL = string.Empty; | 79 | imageURL = string.Empty; |
80 | realHandle = 0; | 80 | realHandle = 0; |
81 | externalName = string.Empty; | 81 | externalName = string.Empty; |
82 | reason = string.Empty; | 82 | reason = string.Empty; |
83 | sizeX = (int)Constants.RegionSize; | ||
84 | sizeY = (int)Constants.RegionSize; | ||
83 | 85 | ||
84 | Hashtable hash = new Hashtable(); | 86 | Hashtable hash = new Hashtable(); |
85 | hash["region_name"] = info.RegionName; | 87 | hash["region_name"] = info.RegionName; |
@@ -134,8 +136,15 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
134 | externalName = (string)hash["external_name"]; | 136 | externalName = (string)hash["external_name"]; |
135 | //m_log.Debug(">> HERE, externalName: " + externalName); | 137 | //m_log.Debug(">> HERE, externalName: " + externalName); |
136 | } | 138 | } |
139 | if (hash["size_x"] != null) | ||
140 | { | ||
141 | Int32.TryParse((string)hash["size_x"], out sizeX); | ||
142 | } | ||
143 | if (hash["size_y"] != null) | ||
144 | { | ||
145 | Int32.TryParse((string)hash["size_y"], out sizeY); | ||
146 | } | ||
137 | } | 147 | } |
138 | |||
139 | } | 148 | } |
140 | catch (Exception e) | 149 | catch (Exception e) |
141 | { | 150 | { |
diff --git a/OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs index 622d4e1..8b31fa2 100644 --- a/OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs | |||
@@ -277,7 +277,10 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
277 | { | 277 | { |
278 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 278 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
279 | uri, | 279 | uri, |
280 | ServerUtils.BuildQueryString(sendData), 15); | 280 | ServerUtils.BuildQueryString(sendData), |
281 | 15, | ||
282 | null, | ||
283 | false); | ||
281 | } | 284 | } |
282 | catch (Exception e) | 285 | catch (Exception e) |
283 | { | 286 | { |
diff --git a/OpenSim/Services/FSAssetService/FSAssetService.cs b/OpenSim/Services/FSAssetService/FSAssetService.cs index 9ec2d00..7f14462 100644 --- a/OpenSim/Services/FSAssetService/FSAssetService.cs +++ b/OpenSim/Services/FSAssetService/FSAssetService.cs | |||
@@ -77,6 +77,7 @@ namespace OpenSim.Services.FSAssetService | |||
77 | protected int m_missingAssetsFS = 0; | 77 | protected int m_missingAssetsFS = 0; |
78 | protected string m_FSBase; | 78 | protected string m_FSBase; |
79 | protected bool m_useOsgridFormat = false; | 79 | protected bool m_useOsgridFormat = false; |
80 | protected bool m_showStats = true; | ||
80 | 81 | ||
81 | private static bool m_Initialized; | 82 | private static bool m_Initialized; |
82 | private bool m_MainInstance; | 83 | private bool m_MainInstance; |
@@ -186,6 +187,9 @@ namespace OpenSim.Services.FSAssetService | |||
186 | 187 | ||
187 | m_useOsgridFormat = assetConfig.GetBoolean("UseOsgridFormat", m_useOsgridFormat); | 188 | m_useOsgridFormat = assetConfig.GetBoolean("UseOsgridFormat", m_useOsgridFormat); |
188 | 189 | ||
190 | // Default is to show stats to retain original behaviour | ||
191 | m_showStats = assetConfig.GetBoolean("ShowConsoleStats", m_showStats); | ||
192 | |||
189 | if (m_MainInstance) | 193 | if (m_MainInstance) |
190 | { | 194 | { |
191 | string loader = assetConfig.GetString("DefaultAssetLoader", string.Empty); | 195 | string loader = assetConfig.GetString("DefaultAssetLoader", string.Empty); |
@@ -203,8 +207,12 @@ namespace OpenSim.Services.FSAssetService | |||
203 | 207 | ||
204 | m_WriterThread = new Thread(Writer); | 208 | m_WriterThread = new Thread(Writer); |
205 | m_WriterThread.Start(); | 209 | m_WriterThread.Start(); |
206 | m_StatsThread = new Thread(Stats); | 210 | |
207 | m_StatsThread.Start(); | 211 | if (m_showStats) |
212 | { | ||
213 | m_StatsThread = new Thread(Stats); | ||
214 | m_StatsThread.Start(); | ||
215 | } | ||
208 | } | 216 | } |
209 | 217 | ||
210 | m_log.Info("[FSASSETS]: FS asset service enabled"); | 218 | m_log.Info("[FSASSETS]: FS asset service enabled"); |
@@ -441,7 +449,7 @@ namespace OpenSim.Services.FSAssetService | |||
441 | Store(asset); | 449 | Store(asset); |
442 | } | 450 | } |
443 | } | 451 | } |
444 | if (asset == null) | 452 | if (asset == null && m_showStats) |
445 | { | 453 | { |
446 | // m_log.InfoFormat("[FSASSETS]: Asset {0} not found", id); | 454 | // m_log.InfoFormat("[FSASSETS]: Asset {0} not found", id); |
447 | m_missingAssets++; | 455 | m_missingAssets++; |
@@ -469,8 +477,11 @@ namespace OpenSim.Services.FSAssetService | |||
469 | } | 477 | } |
470 | } | 478 | } |
471 | if (asset == null) | 479 | if (asset == null) |
472 | m_missingAssetsFS++; | 480 | { |
473 | // m_log.InfoFormat("[FSASSETS]: Asset {0}, hash {1} not found in FS", id, hash); | 481 | if (m_showStats) |
482 | m_missingAssetsFS++; | ||
483 | // m_log.InfoFormat("[FSASSETS]: Asset {0}, hash {1} not found in FS", id, hash); | ||
484 | } | ||
474 | else | 485 | else |
475 | { | 486 | { |
476 | // Deal with bug introduced in Oct. 20 (1eb3e6cc43e2a7b4053bc1185c7c88e22356c5e8) | 487 | // Deal with bug introduced in Oct. 20 (1eb3e6cc43e2a7b4053bc1185c7c88e22356c5e8) |
@@ -484,10 +495,13 @@ namespace OpenSim.Services.FSAssetService | |||
484 | } | 495 | } |
485 | } | 496 | } |
486 | 497 | ||
487 | lock (m_statsLock) | 498 | if (m_showStats) |
488 | { | 499 | { |
489 | m_readTicks += Environment.TickCount - startTime; | 500 | lock (m_statsLock) |
490 | m_readCount++; | 501 | { |
502 | m_readTicks += Environment.TickCount - startTime; | ||
503 | m_readCount++; | ||
504 | } | ||
491 | } | 505 | } |
492 | 506 | ||
493 | // Deal with bug introduced in Oct. 20 (1eb3e6cc43e2a7b4053bc1185c7c88e22356c5e8) | 507 | // Deal with bug introduced in Oct. 20 (1eb3e6cc43e2a7b4053bc1185c7c88e22356c5e8) |
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 2af617a..2869349 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -198,7 +198,7 @@ namespace OpenSim.Services.GridService | |||
198 | 198 | ||
199 | mapName = mapName.Trim(); | 199 | mapName = mapName.Trim(); |
200 | 200 | ||
201 | if (!mapName.StartsWith("http")) | 201 | if (!mapName.StartsWith("http") && !mapName.StartsWith("https")) |
202 | { | 202 | { |
203 | // Formats: grid.example.com:8002:region name | 203 | // Formats: grid.example.com:8002:region name |
204 | // grid.example.com:region name | 204 | // grid.example.com:region name |
@@ -231,9 +231,10 @@ namespace OpenSim.Services.GridService | |||
231 | { | 231 | { |
232 | regionName = parts[2]; | 232 | regionName = parts[2]; |
233 | } | 233 | } |
234 | 234 | ||
235 | bool success = TryCreateLink(scopeID, xloc, yloc, regionName, port, host, ownerID, out regInfo, out reason); | 235 | string serverURI = "http://"+ host +":"+ port.ToString() + "/"; |
236 | if (success) | 236 | // bool success = TryCreateLink(scopeID, xloc, yloc, regionName, port, host, ownerID, out regInfo, out reason); |
237 | if(TryCreateLink(scopeID, xloc, yloc, regionName, 0, null, serverURI, ownerID, out regInfo, out reason)) | ||
237 | { | 238 | { |
238 | regInfo.RegionName = mapName; | 239 | regInfo.RegionName = mapName; |
239 | return regInfo; | 240 | return regInfo; |
@@ -257,6 +258,8 @@ namespace OpenSim.Services.GridService | |||
257 | } | 258 | } |
258 | 259 | ||
259 | serverURI = parts[0]; | 260 | serverURI = parts[0]; |
261 | if (!serverURI.EndsWith("/")) | ||
262 | serverURI = serverURI + "/"; | ||
260 | 263 | ||
261 | if (parts.Length >= 2) | 264 | if (parts.Length >= 2) |
262 | { | 265 | { |
@@ -365,7 +368,9 @@ namespace OpenSim.Services.GridService | |||
365 | UUID regionID = UUID.Zero; | 368 | UUID regionID = UUID.Zero; |
366 | string externalName = string.Empty; | 369 | string externalName = string.Empty; |
367 | string imageURL = string.Empty; | 370 | string imageURL = string.Empty; |
368 | if (!m_GatekeeperConnector.LinkRegion(regInfo, out regionID, out handle, out externalName, out imageURL, out reason)) | 371 | int sizeX = (int)Constants.RegionSize; |
372 | int sizeY = (int)Constants.RegionSize; | ||
373 | if (!m_GatekeeperConnector.LinkRegion(regInfo, out regionID, out handle, out externalName, out imageURL, out reason, out sizeX, out sizeY)) | ||
369 | return false; | 374 | return false; |
370 | 375 | ||
371 | if (regionID == UUID.Zero) | 376 | if (regionID == UUID.Zero) |
@@ -397,6 +402,8 @@ namespace OpenSim.Services.GridService | |||
397 | // } | 402 | // } |
398 | 403 | ||
399 | regInfo.RegionID = regionID; | 404 | regInfo.RegionID = regionID; |
405 | regInfo.RegionSizeX = sizeX; | ||
406 | regInfo.RegionSizeY = sizeY; | ||
400 | 407 | ||
401 | if (externalName == string.Empty) | 408 | if (externalName == string.Empty) |
402 | regInfo.RegionName = regInfo.ServerURI; | 409 | regInfo.RegionName = regInfo.ServerURI; |
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 3c77924..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("-", ""); |
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. |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 1ea17b5..6d63959 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -785,7 +785,10 @@ namespace OpenSim.Services.LLLoginService | |||
785 | ulong handle; | 785 | ulong handle; |
786 | string imageURL = string.Empty, reason = string.Empty; | 786 | string imageURL = string.Empty, reason = string.Empty; |
787 | string message; | 787 | string message; |
788 | if (m_GatekeeperConnector.LinkRegion(gatekeeper, out regionID, out handle, out domainName, out imageURL, out reason)) | 788 | int sizeX = (int)Constants.RegionSize; |
789 | int sizeY = (int)Constants.RegionSize; | ||
790 | |||
791 | if (m_GatekeeperConnector.LinkRegion(gatekeeper, out regionID, out handle, out domainName, out imageURL, out reason, out sizeX, out sizeY)) | ||
789 | { | 792 | { |
790 | string homeURI = null; | 793 | string homeURI = null; |
791 | if (account.ServiceURLs != null && account.ServiceURLs.ContainsKey("HomeURI")) | 794 | if (account.ServiceURLs != null && account.ServiceURLs.ContainsKey("HomeURI")) |