From a11edceb00b5b86f825bd957bdac9edb91f893dd Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 2 Sep 2015 19:54:53 +0100 Subject: seems to compile ( tests comented out) --- OpenSim/Services/Base/ServiceBase.cs | 7 +- .../Connectors/Asset/AssetServicesConnector.cs | 60 +--------- .../Hypergrid/UserAgentServiceConnector.cs | 4 - .../Neighbour/NeighbourServicesConnector.cs | 6 - .../SimianGrid/SimianGridServiceConnector.cs | 77 ------------- .../SimianUserAccountServiceConnector.cs | 5 +- .../Simulation/SimulationServiceConnector.cs | 24 +--- .../UserAccounts/UserAccountServicesConnector.cs | 5 +- OpenSim/Services/GridService/GridService.cs | 37 +----- OpenSim/Services/GridService/HypergridLinker.cs | 33 +----- .../Services/Interfaces/IBakedTextureService.cs | 9 -- OpenSim/Services/Interfaces/IGridService.cs | 128 +++------------------ OpenSim/Services/Interfaces/IMapImageService.cs | 6 - OpenSim/Services/Interfaces/ISimulationService.cs | 9 +- .../Services/Interfaces/IUserProfilesService.cs | 5 + OpenSim/Services/LLLoginService/LLLoginResponse.cs | 8 +- OpenSim/Services/LLLoginService/LLLoginService.cs | 20 ++-- .../Services/MapImageService/MapImageService.cs | 74 +----------- .../UserProfilesService/UserProfilesService.cs | 4 +- 19 files changed, 48 insertions(+), 473 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Base/ServiceBase.cs b/OpenSim/Services/Base/ServiceBase.cs index 09dcbef..c18226b 100644 --- a/OpenSim/Services/Base/ServiceBase.cs +++ b/OpenSim/Services/Base/ServiceBase.cs @@ -47,7 +47,6 @@ namespace OpenSim.Services.Base public T LoadPlugin(string dllName, Object[] args) where T:class { -<<<<<<< HEAD // The path:type separator : is unfortunate because it collides // with Windows paths like C:\... // When the path provided includes the drive, this fails. @@ -55,11 +54,7 @@ namespace OpenSim.Services.Base string pathRoot = Path.GetPathRoot(dllName); string noRoot = dllName.Substring(pathRoot.Length); string[] parts = noRoot.Split(new char[] {':'}); -======= - string pathRoot = Path.GetPathRoot(dllName); - string noRoot = dllName.Substring(pathRoot.Length); - string[] parts = noRoot.Split(new char[] { ':' }); ->>>>>>> avn/ubitvar + dllName = pathRoot + parts[0]; diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index 795ca2e..24f802e 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs @@ -275,18 +275,11 @@ namespace OpenSim.Services.Connectors return fullAsset.Data; } -<<<<<<< HEAD - using (RestClient rc = new RestClient(m_ServerURI)) + using (RestClient rc = new RestClient(MapServer(id))) { rc.AddResourcePath("assets"); rc.AddResourcePath(id); rc.AddResourcePath("data"); -======= - RestClient rc = new RestClient(MapServer(id)); - rc.AddResourcePath("assets"); - rc.AddResourcePath(id); - rc.AddResourcePath("data"); ->>>>>>> avn/ubitvar rc.RequestMethod = "GET"; @@ -300,20 +293,11 @@ namespace OpenSim.Services.Connectors byte[] ret = new byte[s.Length]; s.Read(ret, 0, (int)s.Length); -<<<<<<< HEAD return ret; } return null; } -======= - s.Close(); - return ret; - } - - s.Close(); - return null; ->>>>>>> avn/ubitvar } private class QueuedAssetRequest @@ -348,24 +332,13 @@ namespace OpenSim.Services.Connectors List handlers; lock (m_AssetHandlers) { -<<<<<<< HEAD - if (a != null && m_Cache != null) - m_Cache.Cache(a); -======= handlers = m_AssetHandlers[id]; m_AssetHandlers.Remove(id); } ->>>>>>> avn/ubitvar Util.FireAndForget(x => { -<<<<<<< HEAD - handlers = m_AssetHandlers[id]; - m_AssetHandlers.Remove(id); - } - handlers.Invoke(a); - }, m_maxAssetRequestConcurrency, m_Auth); -======= + foreach (AssetRetrievedEx h in handlers) { // Util.FireAndForget(x => @@ -382,8 +355,6 @@ namespace OpenSim.Services.Connectors // if (handlers != null) // handlers.Clear(); ->>>>>>> avn/ubitvar - success = true; } } @@ -510,32 +481,6 @@ namespace OpenSim.Services.Connectors string newID; try { -<<<<<<< HEAD - newID = SynchronousRestObjectRequester.MakeRequest("POST", uri, asset, m_Auth); - } - catch (Exception e) - { - m_log.Warn(string.Format("[ASSET CONNECTOR]: Unable to send asset {0} to asset server. Reason: {1} ", asset.ID, e.Message), e); - return string.Empty; - } - - // TEMPORARY: SRAS returns 'null' when it's asked to store existing assets - if (newID == null) - { - m_log.DebugFormat("[ASSET CONNECTOR]: Storing of asset {0} returned null; assuming the asset already exists", asset.ID); - return asset.ID; - } - - if (string.IsNullOrEmpty(newID)) - return string.Empty; - - asset.ID = newID; - - if (m_Cache != null) - m_Cache.Cache(asset); - - return newID; -======= newID = SynchronousRestObjectRequester. MakeRequest("POST", uri, asset, 25); if (newID == null || newID == "") @@ -588,7 +533,6 @@ namespace OpenSim.Services.Connectors } } return asset.ID; ->>>>>>> avn/ubitvar } public bool UpdateContent(string id, byte[] data) diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 10b8d22..8abd046 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs @@ -100,14 +100,10 @@ namespace OpenSim.Services.Connectors.Hypergrid m_log.Error("[USER AGENT CONNECTOR]: No Server URI named in section UserAgentService"); throw new Exception("UserAgent connector init error"); } -<<<<<<< HEAD m_ServerURL = m_ServerURLHost = serviceURI; if (!m_ServerURL.EndsWith("/")) m_ServerURL += "/"; -======= - m_ServerURL = serviceURI; ->>>>>>> avn/ubitvar //m_log.DebugFormat("[USER AGENT CONNECTOR]: new connector to {0}", m_ServerURL); } diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs index e236ec3..70f1aee 100644 --- a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs +++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs @@ -153,15 +153,9 @@ namespace OpenSim.Services.Connectors } catch (Exception e) { -<<<<<<< HEAD - m_log.Warn(string.Format( - "[NEIGHBOUR SERVICES CONNECTOR]: Unable to send HelloNeighbour from {0} to {1} (uri {2}). Exception {3} ", - thisRegion.RegionName, region.RegionName, uri, e.Message), e); -======= // m_log.WarnFormat( // "[NEIGHBOUR SERVICE CONNCTOR]: Unable to send HelloNeighbour from {0} to {1}. Exception {2}{3}", // thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace); ->>>>>>> avn/ubitvar return false; } diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index 6043b70..bd35c6f 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs @@ -423,83 +423,6 @@ namespace OpenSim.Services.Connectors.SimianGrid #endregion IGridService - private void UploadMapTile(IScene scene) - { - string errorMessage = null; - - // Create a PNG map tile and upload it to the AddMapTile API - byte[] pngData = Utils.EmptyBytes; - IMapImageGenerator tileGenerator = scene.RequestModuleInterface(); - if (tileGenerator == null) - { - m_log.Warn("[SIMIAN GRID CONNECTOR]: Cannot upload PNG map tile without an IMapImageGenerator"); - return; - } - - using (Image mapTile = tileGenerator.CreateMapTile()) - { - using (MemoryStream stream = new MemoryStream()) - { - mapTile.Save(stream, ImageFormat.Png); - pngData = stream.ToArray(); - } - } - - List postParameters = new List() - { - new MultipartForm.Parameter("X", scene.RegionInfo.RegionLocX.ToString()), - new MultipartForm.Parameter("Y", scene.RegionInfo.RegionLocY.ToString()), - new MultipartForm.File("Tile", "tile.png", "image/png", pngData) - }; - - // Make the remote storage request - try - { - HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI); - - HttpWebResponse response = MultipartForm.Post(request, postParameters); - using (Stream responseStream = response.GetResponseStream()) - { - string responseStr = null; - - try - { - responseStr = responseStream.GetStreamString(); - OSD responseOSD = OSDParser.Deserialize(responseStr); - if (responseOSD.Type == OSDType.Map) - { - OSDMap responseMap = (OSDMap)responseOSD; - if (responseMap["Success"].AsBoolean()) - m_log.Info("[SIMIAN GRID CONNECTOR]: Uploaded " + pngData.Length + " byte PNG map tile to AddMapTile"); - else - errorMessage = "Upload failed: " + responseMap["Message"].AsString(); - } - else - { - errorMessage = "Response format was invalid:\n" + responseStr; - } - } - catch (Exception ex) - { - if (!String.IsNullOrEmpty(responseStr)) - errorMessage = "Failed to parse the response:\n" + responseStr; - else - errorMessage = "Failed to retrieve the response: " + ex.Message; - } - } - } - catch (WebException ex) - { - errorMessage = ex.Message; - } - - if (!String.IsNullOrEmpty(errorMessage)) - { - m_log.WarnFormat("[SIMIAN GRID CONNECTOR]: Failed to store {0} byte PNG map tile for {1}: {2}", - pngData.Length, scene.RegionInfo.RegionName, errorMessage.Replace('\n', ' ')); - } - } - private GridRegion GetNearestRegion(Vector3d position, bool onlyEnabled) { NameValueCollection requestArgs = new NameValueCollection diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs index 08c5c50..563a1e7 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs @@ -191,15 +191,14 @@ namespace OpenSim.Services.Connectors.SimianGrid return accounts; } -<<<<<<< HEAD public void InvalidateCache(UUID userID) { m_accountCache.Remove(userID); -======= + } + public List GetUserAccountsWhere(UUID scopeID, string query) { return null; ->>>>>>> avn/ubitvar } public bool StoreUserAccount(UserAccount data) diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 28b6de7..493d7e0 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs @@ -283,13 +283,8 @@ namespace OpenSim.Services.Connectors.Simulation } -<<<<<<< HEAD + public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string myversion, List featuresAvailable, out string version, out string reason) -======= - /// - /// - public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string myversion, out string version, out string reason) ->>>>>>> avn/ubitvar { reason = "Failed to contact destination"; version = "Unknown"; @@ -306,7 +301,6 @@ namespace OpenSim.Services.Connectors.Simulation request.Add("viaTeleport", OSD.FromBoolean(viaTeleport)); request.Add("position", OSD.FromString(position.ToString())); request.Add("my_version", OSD.FromString(myversion)); -<<<<<<< HEAD OSDArray features = new OSDArray(); foreach (UUID feature in featuresAvailable) @@ -314,8 +308,6 @@ namespace OpenSim.Services.Connectors.Simulation request.Add("features", features); -======= ->>>>>>> avn/ubitvar if (agentHomeURI != null) request.Add("agent_home_uri", OSD.FromString(agentHomeURI)); @@ -366,8 +358,6 @@ namespace OpenSim.Services.Connectors.Simulation return false; } -<<<<<<< HEAD - featuresAvailable.Clear(); if (result.ContainsKey("features")) @@ -377,12 +367,6 @@ namespace OpenSim.Services.Connectors.Simulation foreach (OSD o in array) featuresAvailable.Add(new UUID(o.AsString())); } -======= - OSDMap resp = (OSDMap)result["_Result"]; - success = resp["success"].AsBoolean(); - reason = resp["reason"].AsString(); ->>>>>>> avn/ubitvar - return success; } catch (Exception e) @@ -467,17 +451,13 @@ namespace OpenSim.Services.Connectors.Simulation args["destination_name"] = OSD.FromString(destination.RegionName); args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); -<<<<<<< HEAD + OSDMap result = WebUtil.PostToService(uri, args, 40000, false); if (result == null) return false; bool success = result["success"].AsBoolean(); if (!success) -======= - OSDMap response = WebUtil.PostToService(uri, args, 40000); - if (response["Success"] == "False") ->>>>>>> avn/ubitvar return false; } catch (Exception e) diff --git a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs index e5fb5a8..15a9fbe 100644 --- a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs +++ b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs @@ -191,14 +191,13 @@ namespace OpenSim.Services.Connectors return accounts; } -<<<<<<< HEAD public void InvalidateCache(UUID userID) { -======= + } + public List GetUserAccountsWhere(UUID scopeID, string where) { return null; // Not implemented for regions ->>>>>>> avn/ubitvar } public virtual bool StoreUserAccount(UserAccount data) diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 8293c18..8059275 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs @@ -57,13 +57,10 @@ namespace OpenSim.Services.GridService protected bool m_AllowDuplicateNames = false; protected bool m_AllowHypergridMapSearch = false; -<<<<<<< HEAD + protected bool m_SuppressVarregionOverlapCheckOnRegistration = false; private static Dictionary m_ExtraFeatures = new Dictionary(); -======= - private static Dictionary m_ExtraFeatures = new Dictionary(); ->>>>>>> avn/ubitvar public GridService(IConfigSource config) : base(config) @@ -159,15 +156,9 @@ namespace OpenSim.Services.GridService if (loginConfig == null || gridConfig == null) return; -<<<<<<< HEAD - - string configVal; - -======= string configVal; ->>>>>>> avn/ubitvar configVal = loginConfig.GetString("SearchURL", string.Empty); if (!string.IsNullOrEmpty(configVal)) m_ExtraFeatures["search-server-url"] = configVal; @@ -211,22 +202,11 @@ namespace OpenSim.Services.GridService if (regionInfos.RegionID == UUID.Zero) return "Invalid RegionID - cannot be zero UUID"; -<<<<<<< HEAD String reason = "Region overlaps another region"; - RegionData region = FindAnyConflictingRegion(regionInfos, scopeID, out reason); - // If there is a conflicting region, if it has the same ID and same coordinates - // then it is a region re-registering (permissions and ownership checked later). - if ((region != null) - && ( (region.coordX != regionInfos.RegionCoordX) - || (region.coordY != regionInfos.RegionCoordY) - || (region.RegionID != regionInfos.RegionID) ) - ) -======= // we should not need to check for overlaps RegionData region = m_Database.Get(regionInfos.RegionLocX, regionInfos.RegionLocY, scopeID); if ((region != null) && (region.RegionID != regionInfos.RegionID)) ->>>>>>> avn/ubitvar { // If not same ID and same coordinates, this new region has conflicts and can't be registered. m_log.WarnFormat("{0} Register region conflict in scope {1}. {2}", LogHeader, scopeID, reason); @@ -508,11 +488,8 @@ namespace OpenSim.Services.GridService if (region != null) { // Not really? Maybe? -<<<<<<< HEAD - // The adjacent regions are presumed to be the same size as the current region -======= + /* this fails wiht var regions. My_sql db should now handle var regions ->>>>>>> avn/ubitvar List rdatas = m_Database.Get( region.posX - region.sizeX - 1, region.posY - region.sizeY - 1, region.posX + region.sizeX + 1, region.posY + region.sizeY + 1, scopeID); @@ -898,11 +875,9 @@ namespace OpenSim.Services.GridService return; } -<<<<<<< HEAD + RegionData region = m_Database.Get((int)Util.RegionToWorldLoc(x), (int)Util.RegionToWorldLoc(y), UUID.Zero); -======= - RegionData region = m_Database.Get((int)Util.RegionToWorldLoc((uint)x), (int)Util.RegionToWorldLoc((uint)y), UUID.Zero); ->>>>>>> avn/ubitvar + if (region == null) { MainConsole.Instance.OutputFormat("No region found at {0},{1}", x, y); @@ -919,11 +894,7 @@ namespace OpenSim.Services.GridService ConsoleDisplayList dispList = new ConsoleDisplayList(); dispList.AddRow("Region Name", r.RegionName); dispList.AddRow("Region ID", r.RegionID); -<<<<<<< HEAD - dispList.AddRow("Position", string.Format("{0},{1}", r.coordX, r.coordY)); -======= dispList.AddRow("Location", string.Format("{0},{1}", r.coordX, r.coordY)); ->>>>>>> avn/ubitvar dispList.AddRow("Size", string.Format("{0}x{1}", r.sizeX, r.sizeY)); dispList.AddRow("URI", r.Data["serverURI"]); dispList.AddRow("Owner ID", r.Data["owner_uuid"]); diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index b4577b0..5d9931b 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs @@ -343,11 +343,7 @@ namespace OpenSim.Services.GridService GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY); if (region != null) { -<<<<<<< HEAD - m_log.WarnFormat("[HYPERGRID LINKER]: Coordinates <{0},{1}> are already occupied by region {2} with uuid {3}", -======= m_log.WarnFormat("[HYPERGRID LINKER]: Coordinates {0}-{1} are already occupied by region {2} with uuid {3}", ->>>>>>> avn/ubitvar Util.WorldToRegionLoc((uint)regInfo.RegionLocX), Util.WorldToRegionLoc((uint)regInfo.RegionLocY), region.RegionName, region.RegionID); reason = "Coordinates are already in use"; @@ -383,13 +379,8 @@ namespace OpenSim.Services.GridService region = m_GridService.GetRegionByUUID(scopeID, regionID); if (region != null) { -<<<<<<< HEAD - m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates <{0},{1}>", + m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates <{0},{1}>", Util.WorldToRegionLoc((uint)region.RegionLocX), Util.WorldToRegionLoc((uint)region.RegionLocY)); -======= - m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates {0} {1}", - Util.WorldToRegionLoc((uint)regInfo.RegionLocX), Util.WorldToRegionLoc((uint)regInfo.RegionLocY)); ->>>>>>> avn/ubitvar regInfo = region; return true; } @@ -545,7 +536,6 @@ namespace OpenSim.Services.GridService MainConsole.Instance.Output(new string('-', 72)); foreach (RegionData r in regions) { -<<<<<<< HEAD MainConsole.Instance.Output( String.Format("{0}\n{2,-32} {1}\n", r.RegionName, r.RegionID, @@ -554,12 +544,6 @@ namespace OpenSim.Services.GridService ) ) ); -======= - MainConsole.Instance.Output(String.Format("{0}\n{2,-32} {1}\n", - r.RegionName, r.RegionID, - String.Format("{0},{1} ({2},{3})", r.posX, r.posY, - Util.WorldToRegionLoc((uint)r.posX), Util.WorldToRegionLoc((uint)r.posY))) ); ->>>>>>> avn/ubitvar } return; } @@ -661,13 +645,8 @@ namespace OpenSim.Services.GridService string externalHostName; try { -<<<<<<< HEAD xloc = Convert.ToUInt32(cmdparams[0]); yloc = Convert.ToUInt32(cmdparams[1]); -======= - xloc = (uint)Convert.ToInt32(cmdparams[0]); - yloc = (uint)Convert.ToInt32(cmdparams[1]); ->>>>>>> avn/ubitvar externalPort = Convert.ToUInt32(cmdparams[3]); externalHostName = cmdparams[2]; //internalPort = Convert.ToUInt32(cmdparams[4]); @@ -770,13 +749,8 @@ namespace OpenSim.Services.GridService string externalHostName; uint realXLoc, realYLoc; -<<<<<<< HEAD xloc = Convert.ToUInt32(config.GetString("xloc", "0")); yloc = Convert.ToUInt32(config.GetString("yloc", "0")); -======= - xloc = (uint)Convert.ToInt32(config.GetString("xloc", "0")); - yloc = (uint)Convert.ToInt32(config.GetString("yloc", "0")); ->>>>>>> avn/ubitvar externalPort = Convert.ToUInt32(config.GetString("externalPort", "0")); externalHostName = config.GetString("externalHostName", ""); realXLoc = Convert.ToUInt32(config.GetString("real-xloc", "0")); @@ -784,13 +758,8 @@ namespace OpenSim.Services.GridService if (m_enableAutoMapping) { -<<<<<<< HEAD xloc = (xloc % 100) + m_autoMappingX; yloc = (yloc % 100) + m_autoMappingY; -======= - xloc = (uint)((xloc % 100) + m_autoMappingX); - yloc = (uint)((yloc % 100) + m_autoMappingY); ->>>>>>> avn/ubitvar } if (((realXLoc == 0) && (realYLoc == 0)) || diff --git a/OpenSim/Services/Interfaces/IBakedTextureService.cs b/OpenSim/Services/Interfaces/IBakedTextureService.cs index ab88695..69df4a0 100644 --- a/OpenSim/Services/Interfaces/IBakedTextureService.cs +++ b/OpenSim/Services/Interfaces/IBakedTextureService.cs @@ -1,4 +1,3 @@ -<<<<<<< HEAD /* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. @@ -26,14 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -======= -//////////////////////////////////////////////////////////////// -// -// (c) 2009, 2010 Careminster Limited and Melanie Thielker -// -// All rights reserved -// ->>>>>>> avn/ubitvar using System; using Nini.Config; diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index 7e5597b..63c6e5f 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs @@ -159,23 +159,24 @@ namespace OpenSim.Services.Interfaces } } set { -<<<<<<< HEAD - if (value.EndsWith("/")) { -======= if ( value == null) { m_serverURI = String.Empty; return; } - if ( value.EndsWith("/") ) { ->>>>>>> avn/ubitvar + if ( value.EndsWith("/") ) + { + m_serverURI = value; - } else { + } + else + { m_serverURI = value + '/'; } } } + protected string m_serverURI; /// @@ -368,6 +369,13 @@ namespace OpenSim.Services.Interfaces if (kvp.ContainsKey("regionName")) RegionName = (string)kvp["regionName"]; + if (kvp.ContainsKey("access")) + { + byte access = Convert.ToByte((string)kvp["access"]); + Access = access; + Maturity = (int)Util.ConvertAccessLevelToMaturity(access); + } + if (kvp.ContainsKey("flags") && kvp["flags"] != null) RegionFlags = (OpenSim.Framework.RegionFlags?)Convert.ToInt32((string)kvp["flags"]); @@ -404,9 +412,6 @@ namespace OpenSim.Services.Interfaces if (kvp.ContainsKey("parcelMapTexture")) UUID.TryParse((string)kvp["parcelMapTexture"], out ParcelImage); - if (kvp.ContainsKey("access")) - Access = Byte.Parse((string)kvp["access"]); - if (kvp.ContainsKey("regionSecret")) RegionSecret =(string)kvp["regionSecret"]; @@ -539,110 +544,5 @@ namespace OpenSim.Services.Interfaces { get { return Util.UIntsToLong((uint)RegionLocX, (uint)RegionLocY); } } -<<<<<<< HEAD -======= - - public Dictionary ToKeyValuePairs() - { - Dictionary kvp = new Dictionary(); - kvp["uuid"] = RegionID.ToString(); - kvp["locX"] = RegionLocX.ToString(); - kvp["locY"] = RegionLocY.ToString(); - kvp["sizeX"] = RegionSizeX.ToString(); - kvp["sizeY"] = RegionSizeY.ToString(); - kvp["regionName"] = RegionName; - kvp["serverIP"] = ExternalHostName; //ExternalEndPoint.Address.ToString(); - kvp["serverHttpPort"] = HttpPort.ToString(); - kvp["serverURI"] = ServerURI; - kvp["serverPort"] = InternalEndPoint.Port.ToString(); - kvp["regionMapTexture"] = TerrainImage.ToString(); - kvp["parcelMapTexture"] = ParcelImage.ToString(); - kvp["access"] = Access.ToString(); - kvp["regionSecret"] = RegionSecret; - kvp["owner_uuid"] = EstateOwner.ToString(); - kvp["Token"] = Token.ToString(); - // Maturity doesn't seem to exist in the DB - return kvp; - } - - public GridRegion(Dictionary kvp) - { - if (kvp.ContainsKey("uuid")) - RegionID = new UUID((string)kvp["uuid"]); - - if (kvp.ContainsKey("locX")) - RegionLocX = Convert.ToInt32((string)kvp["locX"]); - - if (kvp.ContainsKey("locY")) - RegionLocY = Convert.ToInt32((string)kvp["locY"]); - - if (kvp.ContainsKey("sizeX")) - RegionSizeX = Convert.ToInt32((string)kvp["sizeX"]); - else - RegionSizeX = (int)Constants.RegionSize; - - if (kvp.ContainsKey("sizeY")) - RegionSizeY = Convert.ToInt32((string)kvp["sizeY"]); - else - RegionSizeY = (int)Constants.RegionSize; - - if (kvp.ContainsKey("regionName")) - RegionName = (string)kvp["regionName"]; - - if (kvp.ContainsKey("access")) - { - byte access = Convert.ToByte((string)kvp["access"]); - Maturity = (int)Util.ConvertAccessLevelToMaturity(access); - } - - if (kvp.ContainsKey("serverIP")) - { - //int port = 0; - //Int32.TryParse((string)kvp["serverPort"], out port); - //IPEndPoint ep = new IPEndPoint(IPAddress.Parse((string)kvp["serverIP"]), port); - ExternalHostName = (string)kvp["serverIP"]; - } - else - ExternalHostName = "127.0.0.1"; - - if (kvp.ContainsKey("serverPort")) - { - Int32 port = 0; - Int32.TryParse((string)kvp["serverPort"], out port); - InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), port); - } - - if (kvp.ContainsKey("serverHttpPort")) - { - UInt32 port = 0; - UInt32.TryParse((string)kvp["serverHttpPort"], out port); - HttpPort = port; - } - - if (kvp.ContainsKey("serverURI")) - ServerURI = (string)kvp["serverURI"]; - - if (kvp.ContainsKey("regionMapTexture")) - UUID.TryParse((string)kvp["regionMapTexture"], out TerrainImage); - - if (kvp.ContainsKey("parcelMapTexture")) - UUID.TryParse((string)kvp["parcelMapTexture"], out ParcelImage); - - if (kvp.ContainsKey("access")) - Access = Byte.Parse((string)kvp["access"]); - - if (kvp.ContainsKey("regionSecret")) - RegionSecret =(string)kvp["regionSecret"]; - - if (kvp.ContainsKey("owner_uuid")) - EstateOwner = new UUID(kvp["owner_uuid"].ToString()); - - if (kvp.ContainsKey("Token")) - Token = kvp["Token"].ToString(); - - // m_log.DebugFormat("{0} New GridRegion. id={1}, loc=<{2},{3}>, size=<{4},{5}>", - // LogHeader, RegionID, RegionLocX, RegionLocY, RegionSizeX, RegionSizeY); - } ->>>>>>> avn/ubitvar } } diff --git a/OpenSim/Services/Interfaces/IMapImageService.cs b/OpenSim/Services/Interfaces/IMapImageService.cs index 0d1458e..b8d45dd 100644 --- a/OpenSim/Services/Interfaces/IMapImageService.cs +++ b/OpenSim/Services/Interfaces/IMapImageService.cs @@ -34,14 +34,8 @@ namespace OpenSim.Services.Interfaces public interface IMapImageService { //List GetMapBlocks(UUID scopeID, int minX, int minY, int maxX, int maxY); -<<<<<<< HEAD - bool AddMapTile(int x, int y, byte[] imageData, out string reason); - bool RemoveMapTile(int x, int y, out string reason); - byte[] GetMapTile(string fileName, out string format); -======= bool AddMapTile(int x, int y, byte[] imageData, UUID scopeID, out string reason); bool RemoveMapTile(int x, int y, UUID scopeID, out string reason); byte[] GetMapTile(string fileName, UUID scopeID, out string format); ->>>>>>> avn/ubitvar } } diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs index ee1e294..3573bea 100644 --- a/OpenSim/Services/Interfaces/ISimulationService.cs +++ b/OpenSim/Services/Interfaces/ISimulationService.cs @@ -86,7 +86,7 @@ namespace OpenSim.Services.Interfaces /// The visitor's Home URI. Will be missing (null) in older OpenSims. /// True: via teleport; False: via cross (walking) /// Position in the region -<<<<<<< HEAD + /// /// Version that the requesting simulator is runing. If null then no version check is carried out. /// @@ -94,13 +94,6 @@ namespace OpenSim.Services.Interfaces /// [out] Optional error message /// True: ok; False: not allowed bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string sversion, List features, out string version, out string reason); -======= - /// version that the requesting simulator is runing - /// version that the target simulator is running - /// [out] Optional error message - /// True: ok; False: not allowed - bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string sversion, out string version, out string reason); ->>>>>>> avn/ubitvar /// /// Message from receiving region to departing region, telling it got contacted by the client. diff --git a/OpenSim/Services/Interfaces/IUserProfilesService.cs b/OpenSim/Services/Interfaces/IUserProfilesService.cs index 319d307..121baa8 100644 --- a/OpenSim/Services/Interfaces/IUserProfilesService.cs +++ b/OpenSim/Services/Interfaces/IUserProfilesService.cs @@ -57,6 +57,11 @@ namespace OpenSim.Services.Interfaces bool AvatarPropertiesRequest(ref UserProfileProperties prop, ref string result); bool AvatarPropertiesUpdate(ref UserProfileProperties prop, ref string result); #endregion Profile Properties + + #region User Preferences + bool UserPreferencesRequest(ref UserPreferences pref, ref string result); + bool UserPreferencesUpdate(ref UserPreferences pref, ref string result); + #endregion User Preferences #region Interests bool AvatarInterestsUpdate(UserProfileProperties prop, ref string result); diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index 92d93ee..0f57c2e 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs @@ -234,13 +234,9 @@ namespace OpenSim.Services.LLLoginService public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo, GridRegion destination, List invSkel, FriendInfo[] friendsList, ILibraryService libService, string where, string startlocation, Vector3 position, Vector3 lookAt, List gestures, string message, -<<<<<<< HEAD - GridRegion home, IPEndPoint clientIP, string mapTileURL, string searchURL, string currency, - string DSTZone, string destinationsURL, string avatarsURL, string classifiedFee, int maxAgentGroups) -======= + GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency, - string DSTZone, string destinationsURL, string avatarsURL, UUID realID, string classifiedFee) ->>>>>>> avn/ubitvar + string DSTZone, string destinationsURL, string avatarsURL, UUID realID, string classifiedFee,int maxAgentGroups) : this() { FillOutInventoryData(invSkel, libService); diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index ba69e95..29199ae 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -77,6 +77,8 @@ namespace OpenSim.Services.LLLoginService protected string m_GatekeeperURL; protected bool m_AllowRemoteSetLoginLevel; protected string m_MapTileURL; + protected string m_ProfileURL; + protected string m_OpenIDURL; protected string m_SearchURL; protected string m_Currency; protected string m_ClassifiedFee; @@ -117,6 +119,8 @@ namespace OpenSim.Services.LLLoginService m_GatekeeperURL = Util.GetConfigVarFromSections(config, "GatekeeperURI", new string[] { "Startup", "Hypergrid", "LoginService" }, String.Empty); m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty); + m_ProfileURL = m_LoginServerConfig.GetString("ProfileServerURL", string.Empty); + m_OpenIDURL = m_LoginServerConfig.GetString("OpenIDServerURL", String.Empty); m_SearchURL = m_LoginServerConfig.GetString("SearchURL", string.Empty); m_Currency = m_LoginServerConfig.GetString("Currency", string.Empty); m_ClassifiedFee = m_LoginServerConfig.GetString("ClassifiedFee", string.Empty); @@ -262,13 +266,11 @@ namespace OpenSim.Services.LLLoginService { bool success = false; UUID session = UUID.Random(); -<<<<<<< HEAD + string processedMessage; -======= + if (clientVersion.Contains("Radegast")) LibOMVclient = false; ->>>>>>> avn/ubitvar - m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}, Possible LibOMVGridProxy: {8} ", firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0, LibOMVclient.ToString()); @@ -522,19 +524,11 @@ namespace OpenSim.Services.LLLoginService processedMessage = processedMessage.Replace("\\n", "\n").Replace("", firstName + " " + lastName); LLLoginResponse response -<<<<<<< HEAD - = new LLLoginResponse( - account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, - where, startLocation, position, lookAt, gestures, processedMessage, home, clientIP, - m_MapTileURL, m_SearchURL, m_Currency, m_DSTZone, - m_DestinationGuide, m_AvatarPicker, m_ClassifiedFee, m_MaxAgentGroups); -======= = new LLLoginResponse( account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone, - m_DestinationGuide, m_AvatarPicker, realID, m_ClassifiedFee); ->>>>>>> avn/ubitvar + m_DestinationGuide, m_AvatarPicker, realID, m_ClassifiedFee,m_MaxAgentGroups); m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); diff --git a/OpenSim/Services/MapImageService/MapImageService.cs b/OpenSim/Services/MapImageService/MapImageService.cs index fcace3a..6728752 100644 --- a/OpenSim/Services/MapImageService/MapImageService.cs +++ b/OpenSim/Services/MapImageService/MapImageService.cs @@ -131,16 +131,6 @@ namespace OpenSim.Services.MapImageService return false; } } -<<<<<<< HEAD - - return UpdateMultiResolutionFilesAsync(x, y, out reason); - } - - public bool RemoveMapTile(int x, int y, out string reason) - { - reason = String.Empty; - string fileName = GetFileName(1, x, y); -======= return UpdateMultiResolutionFiles(x, y, scopeID, out reason); } @@ -149,40 +139,25 @@ namespace OpenSim.Services.MapImageService { reason = String.Empty; string fileName = GetFileName(1, x, y, scopeID); ->>>>>>> avn/ubitvar lock (m_Sync) { try -<<<<<<< HEAD { File.Delete(fileName); } catch (Exception e) { -======= - { - File.Delete(fileName); - } - catch (Exception e) - { ->>>>>>> avn/ubitvar + m_log.WarnFormat("[MAP IMAGE SERVICE]: Unable to save delete file {0}: {1}", fileName, e); reason = e.Message; return false; } } -<<<<<<< HEAD - - return UpdateMultiResolutionFilesAsync(x, y, out reason); - } - -======= - return UpdateMultiResolutionFiles(x, y, scopeID, out reason); } ->>>>>>> avn/ubitvar + // When large varregions start up, they can send piles of new map tiles. This causes // this multi-resolution routine to be called a zillion times an causes much CPU // time to be spent creating multi-resolution tiles that will be replaced when @@ -191,25 +166,6 @@ namespace OpenSim.Services.MapImageService { public int xx; public int yy; -<<<<<<< HEAD - public mapToMultiRez(int pX, int pY) - { - xx = pX; - yy = pY; - } - }; - private Queue multiRezToBuild = new Queue(); - private bool UpdateMultiResolutionFilesAsync(int x, int y, out string reason) - { - reason = String.Empty; - lock (multiRezToBuild) - { - // m_log.DebugFormat("{0} UpdateMultiResolutionFilesAsync: scheduling update for <{1},{2}>", LogHeader, x, y); - multiRezToBuild.Enqueue(new mapToMultiRez(x, y)); - if (multiRezToBuild.Count == 1) - Util.FireAndForget( - DoUpdateMultiResolutionFilesAsync, null, "MapImageService.DoUpdateMultiResolutionFilesAsync"); -======= public UUID scopeID; public mapToMultiRez(int pX, int pY, UUID pscopeID) { @@ -231,7 +187,6 @@ namespace OpenSim.Services.MapImageService if (multiRezToBuild.Count == 1) Util.FireAndForget( DoUpdateMultiResolutionFilesAsync); ->>>>>>> avn/ubitvar } return true; @@ -239,15 +194,8 @@ namespace OpenSim.Services.MapImageService private void DoUpdateMultiResolutionFilesAsync(object o) { -<<<<<<< HEAD - // This sleep causes the FireAndForget thread to be different than the invocation thread. - // It also allows other tiles to be uploaded so the multi-rez images are more likely - // to be correct. - Thread.Sleep(1 * 1000); -======= // let acumulate large region tiles Thread.Sleep(60 * 1000); // large regions take time to upload tiles ->>>>>>> avn/ubitvar while (multiRezToBuild.Count > 0) { @@ -261,35 +209,23 @@ namespace OpenSim.Services.MapImageService { int x = toMultiRez.xx; int y = toMultiRez.yy; -<<<<<<< HEAD - // m_log.DebugFormat("{0} DoUpdateMultiResolutionFilesAsync: doing build for <{1},{2}>", LogHeader, x, y); - -======= UUID scopeID = toMultiRez.scopeID; // m_log.DebugFormat("{0} DoUpdateMultiResolutionFilesAsync: doing build for <{1},{2}>", LogHeader, x, y); int width = 1; ->>>>>>> avn/ubitvar + // Stitch seven more aggregate tiles together for (uint zoomLevel = 2; zoomLevel <= ZOOM_LEVELS; zoomLevel++) { // Calculate the width (in full resolution tiles) and bottom-left // corner of the current zoom level -<<<<<<< HEAD - int width = (int)Math.Pow(2, (double)(zoomLevel - 1)); -======= width *= 2; ->>>>>>> avn/ubitvar int x1 = x - (x % width); int y1 = y - (y % width); lock (m_Sync) // must lock the reading and writing of the maptile files { -<<<<<<< HEAD - if (!CreateTile(zoomLevel, x1, y1)) -======= if (!CreateTile(zoomLevel, x1, y1, scopeID)) ->>>>>>> avn/ubitvar { m_log.WarnFormat("[MAP IMAGE SERVICE]: Unable to create tile for {0},{1} at zoom level {1}", x, y, zoomLevel); return; @@ -298,10 +234,6 @@ namespace OpenSim.Services.MapImageService } } } -<<<<<<< HEAD - -======= ->>>>>>> avn/ubitvar return; } diff --git a/OpenSim/Services/UserProfilesService/UserProfilesService.cs b/OpenSim/Services/UserProfilesService/UserProfilesService.cs index 35fe31b..9a52e02 100644 --- a/OpenSim/Services/UserProfilesService/UserProfilesService.cs +++ b/OpenSim/Services/UserProfilesService/UserProfilesService.cs @@ -159,7 +159,7 @@ namespace OpenSim.Services.ProfilesService } #endregion Interests - /* + #region User Preferences public bool UserPreferencesUpdate(ref UserPreferences pref, ref string result) { @@ -239,7 +239,7 @@ namespace OpenSim.Services.ProfilesService return true; } #endregion User Preferences - */ + #region Utility public OSD AvatarImageAssetsRequest(UUID avatarId) -- cgit v1.1