From b8f0a82b7fdf442c72289d8b271f6b9c4e8560c4 Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Wed, 14 Oct 2015 21:59:28 -0700 Subject: [PATCH 1/6] Lots and lots of dead code... I attempted to only clean out code that was not apparent as to why it shoudl ever be added back in. Code that was well commented as to why it was dead was left intact. That said, there may be stuff I cleaned out that might be useful as a reference. Otherwise dead code has a nasty habit of developing bitrot, which I observed in a few of these cases... --- .../InWorldz.Phlox.Engine/LSLSystemAPI.cs | 17 - InWorldz/InWorldz.RemoteAdmin/RemoteAdmin.cs | 347 ------------- .../InWorldz.RemoteAdmin/RemoteAdminPlugin.cs | 491 ------------------ .../InWorldz.VivoxVoice/VivoxVoiceModule.cs | 43 -- OpenSim/Data/MySQL/MySQLManager.cs | 15 - OpenSim/Data/UserDataBase.cs | 23 +- OpenSim/Framework/EstateSettings.cs | 15 - .../GridServer.Modules/GridXmlRpcModule.cs | 7 - OpenSim/Grid/GridServer/Program.cs | 11 +- OpenSim/Grid/MessagingServer/Main.cs | 30 -- .../MessageServersConnector.cs | 6 +- OpenSim/Grid/UserServer/Main.cs | 4 - .../ClientStack/LindenUDP/LLClientView.cs | 11 - .../Capabilities/AssetCapsModule.cs | 332 ------------ .../Capabilities/AssortedCapsModule.cs | 219 -------- ...ewFileAgentInventoryVariablePriceModule.cs | 328 ------------ .../Capabilities/UploadObjectAssetModule.cs | 404 -------------- .../World/Land/LandManagementModule.cs | 9 - OpenSim/Region/Framework/Scenes/Scene.cs | 6 - .../Shared/RegionInfoStructure.cs | 15 - 20 files changed, 4 insertions(+), 2329 deletions(-) delete mode 100644 OpenSim/Region/CoreModules/Capabilities/NewFileAgentInventoryVariablePriceModule.cs delete mode 100644 OpenSim/Region/CoreModules/Capabilities/UploadObjectAssetModule.cs diff --git a/InWorldz/InWorldz.Phlox.Engine/LSLSystemAPI.cs b/InWorldz/InWorldz.Phlox.Engine/LSLSystemAPI.cs index c2745c02..ffb2c2ff 100644 --- a/InWorldz/InWorldz.Phlox.Engine/LSLSystemAPI.cs +++ b/InWorldz/InWorldz.Phlox.Engine/LSLSystemAPI.cs @@ -12562,23 +12562,6 @@ public void llSetContentType(string id, int type) userAgent.IndexOf("InWorldz", StringComparison.CurrentCultureIgnoreCase) < 0) return; // Not the embedded browser. Is this check good enough? -#if false - // Use the IP address of the client and check against the request - // seperate logins from the same IP will allow all of them to get non-text/plain as long - // as the owner is in the region. Same as SL! - string logonFromIPAddress = agent.ControllingClient.RemoteEndPoint.Address.ToString(); - string requestFromIPAddress = m_UrlModule.GetHttpHeader(key, "remote_addr"); - //m_log.Debug("IP from header='" + requestFromIPAddress + "' IP from endpoint='" + logonFromIPAddress + "'"); - if (requestFromIPAddress == null || requestFromIPAddress.Trim() == "") - return; - if (logonFromIPAddress == null || logonFromIPAddress.Trim() == "") - return; - - // If the request isnt from the same IP address then the request cannot be from the owner - if (!requestFromIPAddress.Trim().Equals(logonFromIPAddress.Trim())) - return; -#endif - switch (type) { case ScriptBaseClass.CONTENT_TYPE_HTML: diff --git a/InWorldz/InWorldz.RemoteAdmin/RemoteAdmin.cs b/InWorldz/InWorldz.RemoteAdmin/RemoteAdmin.cs index c6210ea7..f768b88f 100644 --- a/InWorldz/InWorldz.RemoteAdmin/RemoteAdmin.cs +++ b/InWorldz/InWorldz.RemoteAdmin/RemoteAdmin.cs @@ -239,353 +239,6 @@ private object ConsoleCommandHandler(IList args, IPEndPoint client) return ""; } -#if false - /// - /// Create a new user account. - /// - /// incoming XML RPC request - /// - /// XmlRpcCreateUserMethod takes the following XMLRPC - /// parameters - /// - /// parameter namedescription - /// password - /// admin password as set in OpenSim.ini - /// user_firstname - /// avatar's first name - /// user_lastname - /// avatar's last name - /// user_password - /// avatar's password - /// user_email - /// email of the avatar's owner (optional) - /// start_region_x - /// avatar's start region coordinates, X value - /// start_region_y - /// avatar's start region coordinates, Y value - /// - /// - /// XmlRpcCreateUserMethod returns - /// - /// namedescription - /// success - /// true or false - /// error - /// error message if success is false - /// avatar_uuid - /// UUID of the newly created avatar - /// account; UUID.Zero if failed. - /// - /// - /// - public XmlRpcResponse XmlRpcCreateUserMethod(XmlRpcRequest request, IPEndPoint remoteClient) - { - m_log.Info("[RADMIN]: CreateUser: new request"); - XmlRpcResponse response = new XmlRpcResponse(); - Hashtable responseData = new Hashtable(); - - lock (rslock) - { - try - { - Hashtable requestData = (Hashtable)request.Params[0]; - - // check completeness - checkStringParameters(request, new string[] - { - "password", "user_firstname", - "user_lastname", "user_password", - }); - checkIntegerParams(request, new string[] { "start_region_x", "start_region_y" }); - - // check password - if (!String.IsNullOrEmpty(m_requiredPassword) && - (string)requestData["password"] != m_requiredPassword) throw new Exception("wrong password"); - - // do the job - string firstname = (string)requestData["user_firstname"]; - string lastname = (string)requestData["user_lastname"]; - string passwd = (string)requestData["user_password"]; - uint regX = Convert.ToUInt32((Int32)requestData["start_region_x"]); - uint regY = Convert.ToUInt32((Int32)requestData["start_region_y"]); - - string email = ""; // empty string for email - if (requestData.Contains("user_email")) - email = (string)requestData["user_email"]; - - CachedUserInfo userInfo = - m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(firstname, lastname); - - if (null != userInfo) - throw new Exception(String.Format("Avatar {0} {1} already exists", firstname, lastname)); - - UUID userID = - m_app.CommunicationsManager.UserAdminService.AddUser(firstname, lastname, - passwd, email, regX, regY); - - if (userID == UUID.Zero) - throw new Exception(String.Format("failed to create new user {0} {1}", - firstname, lastname)); - - // Establish the avatar's initial appearance - - updateUserAppearance(responseData, requestData, userID); - - responseData["success"] = true; - responseData["avatar_uuid"] = userID.ToString(); - - response.Value = responseData; - - m_log.InfoFormat("[RADMIN]: CreateUser: User {0} {1} created, UUID {2}", firstname, lastname, userID); - } - catch (Exception e) - { - m_log.ErrorFormat("[RADMIN] CreateUser: failed: {0}", e.Message); - m_log.DebugFormat("[RADMIN] CreateUser: failed: {0}", e.ToString()); - - responseData["success"] = false; - responseData["avatar_uuid"] = UUID.Zero.ToString(); - responseData["error"] = e.Message; - - response.Value = responseData; - } - m_log.Info("[RADMIN]: CreateUser: request complete"); - return response; - } - } - - /// - /// Check whether a certain user account exists. - /// - /// incoming XML RPC request - /// - /// XmlRpcUserExistsMethod takes the following XMLRPC - /// parameters - /// - /// parameter namedescription - /// password - /// admin password as set in OpenSim.ini - /// user_firstname - /// avatar's first name - /// user_lastname - /// avatar's last name - /// - /// - /// XmlRpcCreateUserMethod returns - /// - /// namedescription - /// user_firstname - /// avatar's first name - /// user_lastname - /// avatar's last name - /// success - /// true or false - /// error - /// error message if success is false - /// - /// - public XmlRpcResponse XmlRpcUserExistsMethod(XmlRpcRequest request, IPEndPoint remoteClient) - { - m_log.Info("[RADMIN]: UserExists: new request"); - XmlRpcResponse response = new XmlRpcResponse(); - Hashtable responseData = new Hashtable(); - - try - { - Hashtable requestData = (Hashtable)request.Params[0]; - - // check completeness - checkStringParameters(request, new string[] { "password", "user_firstname", "user_lastname" }); - - string firstname = (string)requestData["user_firstname"]; - string lastname = (string)requestData["user_lastname"]; - - CachedUserInfo userInfo - = m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(firstname, lastname); - - responseData["user_firstname"] = firstname; - responseData["user_lastname"] = lastname; - - if (null == userInfo) - responseData["success"] = false; - else - responseData["success"] = true; - - response.Value = responseData; - } - catch (Exception e) - { - m_log.ErrorFormat("[RADMIN] UserExists: failed: {0}", e.Message); - m_log.DebugFormat("[RADMIN] UserExists: failed: {0}", e.ToString()); - - responseData["success"] = false; - responseData["error"] = e.Message; - - response.Value = responseData; - } - - m_log.Info("[RADMIN]: UserExists: request complete"); - return response; - } - - /// - /// Update a user account. - /// - /// incoming XML RPC request - /// - /// XmlRpcUpdateUserAccountMethod takes the following XMLRPC - /// parameters (changeable ones are optional) - /// - /// parameter namedescription - /// password - /// admin password as set in OpenSim.ini - /// user_firstname - /// avatar's first name (cannot be changed) - /// user_lastname - /// avatar's last name (cannot be changed) - /// user_password - /// avatar's password (changeable) - /// start_region_x - /// avatar's start region coordinates, X - /// value (changeable) - /// start_region_y - /// avatar's start region coordinates, Y - /// value (changeable) - /// about_real_world - /// "about" text of avatar owner (changeable) - /// about_virtual_world - /// "about" text of avatar (changeable) - /// - /// - /// XmlRpcCreateUserMethod returns - /// - /// namedescription - /// success - /// true or false - /// error - /// error message if success is false - /// - /// - - public XmlRpcResponse XmlRpcUpdateUserAccountMethod(XmlRpcRequest request, IPEndPoint remoteClient) - { - m_log.Info("[RADMIN]: UpdateUserAccount: new request"); - XmlRpcResponse response = new XmlRpcResponse(); - Hashtable responseData = new Hashtable(); - - lock (rslock) - { - try - { - Hashtable requestData = (Hashtable)request.Params[0]; - - // check completeness - checkStringParameters(request, new string[] { - "password", "user_firstname", - "user_lastname"}); - - // check password - if (!String.IsNullOrEmpty(m_requiredPassword) && - (string)requestData["password"] != m_requiredPassword) throw new Exception("wrong password"); - - // do the job - string firstname = (string)requestData["user_firstname"]; - string lastname = (string)requestData["user_lastname"]; - - string passwd = String.Empty; - uint? regX = null; - uint? regY = null; - uint? ulaX = null; - uint? ulaY = null; - uint? ulaZ = null; - uint? usaX = null; - uint? usaY = null; - uint? usaZ = null; - string aboutFirstLive = String.Empty; - string aboutAvatar = String.Empty; - - if (requestData.ContainsKey("user_password")) passwd = (string)requestData["user_password"]; - if (requestData.ContainsKey("start_region_x")) - regX = Convert.ToUInt32((Int32)requestData["start_region_x"]); - if (requestData.ContainsKey("start_region_y")) - regY = Convert.ToUInt32((Int32)requestData["start_region_y"]); - - if (requestData.ContainsKey("start_lookat_x")) - ulaX = Convert.ToUInt32((Int32)requestData["start_lookat_x"]); - if (requestData.ContainsKey("start_lookat_y")) - ulaY = Convert.ToUInt32((Int32)requestData["start_lookat_y"]); - if (requestData.ContainsKey("start_lookat_z")) - ulaZ = Convert.ToUInt32((Int32)requestData["start_lookat_z"]); - - if (requestData.ContainsKey("start_standat_x")) - usaX = Convert.ToUInt32((Int32)requestData["start_standat_x"]); - if (requestData.ContainsKey("start_standat_y")) - usaY = Convert.ToUInt32((Int32)requestData["start_standat_y"]); - if (requestData.ContainsKey("start_standat_z")) - usaZ = Convert.ToUInt32((Int32)requestData["start_standat_z"]); - if (requestData.ContainsKey("about_real_world")) - aboutFirstLive = (string)requestData["about_real_world"]; - if (requestData.ContainsKey("about_virtual_world")) - aboutAvatar = (string)requestData["about_virtual_world"]; - - UserProfileData userProfile - = m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname); - - if (null == userProfile) - throw new Exception(String.Format("avatar {0} {1} does not exist", firstname, lastname)); - - if (null != passwd) - { - string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(passwd) + ":" + String.Empty); - userProfile.PasswordHash = md5PasswdHash; - } - - if (null != regX) userProfile.HomeRegionX = (uint)regX; - if (null != regY) userProfile.HomeRegionY = (uint)regY; - - if (null != usaX) userProfile.HomeLocationX = (uint)usaX; - if (null != usaY) userProfile.HomeLocationY = (uint)usaY; - if (null != usaZ) userProfile.HomeLocationZ = (uint)usaZ; - - if (null != ulaX) userProfile.HomeLookAtX = (uint)ulaX; - if (null != ulaY) userProfile.HomeLookAtY = (uint)ulaY; - if (null != ulaZ) userProfile.HomeLookAtZ = (uint)ulaZ; - - if (String.Empty != aboutFirstLive) userProfile.FirstLifeAboutText = aboutFirstLive; - if (String.Empty != aboutAvatar) userProfile.AboutText = aboutAvatar; - - // User has been created. Now establish gender and appearance. - - updateUserAppearance(responseData, requestData, userProfile.ID); - - if (!m_app.CommunicationsManager.UserService.UpdateUserProfile(userProfile)) - throw new Exception("did not manage to update user profile"); - - responseData["success"] = true; - - response.Value = responseData; - - m_log.InfoFormat("[RADMIN]: UpdateUserAccount: account for user {0} {1} updated, UUID {2}", - firstname, lastname, - userProfile.ID); - } - catch (Exception e) - { - m_log.ErrorFormat("[RADMIN] UpdateUserAccount: failed: {0}", e.Message); - m_log.DebugFormat("[RADMIN] UpdateUserAccount: failed: {0}", e.ToString()); - - responseData["success"] = false; - responseData["error"] = e.Message; - - response.Value = responseData; - } - } - - m_log.Info("[RADMIN]: UpdateUserAccount: request complete"); - return response; - - } -#endif public void Dispose() { } diff --git a/InWorldz/InWorldz.RemoteAdmin/RemoteAdminPlugin.cs b/InWorldz/InWorldz.RemoteAdmin/RemoteAdminPlugin.cs index 04770a0d..9bb2bfa7 100644 --- a/InWorldz/InWorldz.RemoteAdmin/RemoteAdminPlugin.cs +++ b/InWorldz/InWorldz.RemoteAdmin/RemoteAdminPlugin.cs @@ -516,496 +516,5 @@ public object RegionChangeParcelFlagsHandler(IList args, IPEndPoint remoteClient #endregion - -#if false - public XmlRpcResponse XmlRpcLoadHeightmapMethod(XmlRpcRequest request, IPEndPoint remoteClient) - { - XmlRpcResponse response = new XmlRpcResponse(); - Hashtable responseData = new Hashtable(); - - m_log.Info("[RADMIN]: Load height maps request started"); - - try - { - Hashtable requestData = (Hashtable)request.Params[0]; - - m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}", request.ToString()); - // foreach (string k in requestData.Keys) - // { - // m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}: >{1}< {2}", - // k, (string)requestData[k], ((string)requestData[k]).Length); - // } - - checkStringParameters(request, new string[] { "password", "filename", "regionid" }); - - if (m_requiredPassword != String.Empty && - (!requestData.Contains("password") || (string)requestData["password"] != m_requiredPassword)) - throw new Exception("wrong password"); - - string file = (string)requestData["filename"]; - UUID regionID = (UUID)(string)requestData["regionid"]; - m_log.InfoFormat("[RADMIN]: Terrain Loading: {0}", file); - - responseData["accepted"] = true; - - Scene region = null; - - if (!m_app.SceneManager.TryGetScene(regionID, out region)) - throw new Exception("1: unable to get a scene with that name"); - - ITerrainModule terrainModule = region.RequestModuleInterface(); - if (null == terrainModule) throw new Exception("terrain module not available"); - terrainModule.LoadFromFile(file); - - responseData["success"] = false; - - response.Value = responseData; - } - catch (Exception e) - { - m_log.ErrorFormat("[RADMIN] Terrain Loading: failed: {0}", e.Message); - m_log.DebugFormat("[RADMIN] Terrain Loading: failed: {0}", e.ToString()); - - responseData["success"] = false; - responseData["error"] = e.Message; - } - - m_log.Info("[RADMIN]: Load height maps request complete"); - - return response; - } - - - - /// - /// Create a new region. - /// - /// incoming XML RPC request - /// - /// XmlRpcCreateRegionMethod takes the following XMLRPC - /// parameters - /// - /// parameter namedescription - /// password - /// admin password as set in OpenSim.ini - /// region_name - /// desired region name - /// region_id - /// (optional) desired region UUID - /// region_x - /// desired region X coordinate (integer) - /// region_y - /// desired region Y coordinate (integer) - /// region_master_first - /// firstname of region master - /// region_master_last - /// lastname of region master - /// region_master_uuid - /// explicit UUID to use for master avatar (optional) - /// listen_ip - /// internal IP address (dotted quad) - /// listen_port - /// internal port (integer) - /// external_address - /// external IP address - /// persist - /// if true, persist the region info - /// ('true' or 'false') - /// public - /// if true, the region is public - /// ('true' or 'false') (optional, default: true) - /// enable_voice - /// if true, enable voice on all parcels, - /// ('true' or 'false') (optional, default: false) - /// - /// - /// XmlRpcCreateRegionMethod returns - /// - /// namedescription - /// success - /// true or false - /// error - /// error message if success is false - /// region_uuid - /// UUID of the newly created region - /// region_name - /// name of the newly created region - /// - /// - public XmlRpcResponse XmlRpcCreateRegionMethod(XmlRpcRequest request, IPEndPoint remoteClient) - { - m_log.Info("[RADMIN]: CreateRegion: new request"); - XmlRpcResponse response = new XmlRpcResponse(); - Hashtable responseData = new Hashtable(); - - lock (rslock) - { - - int m_regionLimit = m_config.GetInt("region_limit", 0); - bool m_enableVoiceForNewRegions = m_config.GetBoolean("create_region_enable_voice", false); - bool m_publicAccess = m_config.GetBoolean("create_region_public", true); - - try - { - Hashtable requestData = (Hashtable)request.Params[0]; - - checkStringParameters(request, new string[] - { - "password", - "region_name", - "region_master_first", "region_master_last", - "region_master_password", - "listen_ip", "external_address" - }); - checkIntegerParams(request, new string[] { "region_x", "region_y", "listen_port" }); - - // check password - if (!String.IsNullOrEmpty(m_requiredPassword) && - (string)requestData["password"] != m_requiredPassword) throw new Exception("wrong password"); - - // check whether we still have space left (iff we are using limits) - if (m_regionLimit != 0 && m_app.SceneManager.Scenes.Count >= m_regionLimit) - throw new Exception(String.Format("cannot instantiate new region, server capacity {0} already reached; delete regions first", - m_regionLimit)); - // extract or generate region ID now - Scene scene = null; - UUID regionID = UUID.Zero; - if (requestData.ContainsKey("region_id") && - !String.IsNullOrEmpty((string)requestData["region_id"])) - { - regionID = (UUID)(string)requestData["region_id"]; - if (m_app.SceneManager.TryGetScene(regionID, out scene)) - throw new Exception( - String.Format("region UUID already in use by region {0}, UUID {1}, <{2},{3}>", - scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, - scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); - } - else - { - regionID = UUID.Random(); - m_log.DebugFormat("[RADMIN] CreateRegion: new region UUID {0}", regionID); - } - - // create volatile or persistent region info - RegionInfo region = new RegionInfo(); - - region.RegionID = regionID; - region.RegionName = (string)requestData["region_name"]; - region.RegionLocX = Convert.ToUInt32(requestData["region_x"]); - region.RegionLocY = Convert.ToUInt32(requestData["region_y"]); - - // check for collisions: region name, region UUID, - // region location - if (m_app.SceneManager.TryGetScene(region.RegionName, out scene)) - throw new Exception( - String.Format("region name already in use by region {0}, UUID {1}, <{2},{3}>", - scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, - scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); - - if (m_app.SceneManager.TryGetScene(region.RegionLocX, region.RegionLocY, out scene)) - throw new Exception( - String.Format("region location <{0},{1}> already in use by region {2}, UUID {3}, <{4},{5}>", - region.RegionLocX, region.RegionLocY, - scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, - scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); - - region.InternalEndPoint = - new IPEndPoint(IPAddress.Parse((string)requestData["listen_ip"]), 0); - - region.InternalEndPoint.Port = Convert.ToInt32(requestData["listen_port"]); - if (0 == region.InternalEndPoint.Port) throw new Exception("listen_port is 0"); - if (m_app.SceneManager.TryGetScene(region.InternalEndPoint, out scene)) - throw new Exception( - String.Format( - "region internal IP {0} and port {1} already in use by region {2}, UUID {3}, <{4},{5}>", - region.InternalEndPoint.Address, - region.InternalEndPoint.Port, - scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, - scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); - - - region.ExternalHostName = (string)requestData["external_address"]; - - string masterFirst = (string)requestData["region_master_first"]; - string masterLast = (string)requestData["region_master_last"]; - string masterPassword = (string)requestData["region_master_password"]; - - UUID userID = UUID.Zero; - if (requestData.ContainsKey("region_master_uuid")) - { - // ok, client wants us to use an explicit UUID - // regardless of what the avatar name provided - userID = new UUID((string)requestData["region_master_uuid"]); - } - else - { - // no client supplied UUID: look it up... - CachedUserInfo userInfo - = m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails( - masterFirst, masterLast); - - if (null == userInfo) - { - m_log.InfoFormat("master avatar does not exist, creating it"); - // ...or create new user - userID = m_app.CommunicationsManager.UserAdminService.AddUser( - masterFirst, masterLast, masterPassword, "", region.RegionLocX, region.RegionLocY); - - if (userID == UUID.Zero) - throw new Exception(String.Format("failed to create new user {0} {1}", - masterFirst, masterLast)); - } - else - { - userID = userInfo.UserProfile.ID; - } - } - - region.MasterAvatarFirstName = masterFirst; - region.MasterAvatarLastName = masterLast; - region.MasterAvatarSandboxPassword = masterPassword; - region.MasterAvatarAssignedUUID = userID; - - bool persist = Convert.ToBoolean((string)requestData["persist"]); - if (persist) - { - // default place for region XML files is in the - // Regions directory of the config dir (aka /bin) - string regionConfigPath = Path.Combine(Util.configDir(), "Regions"); - try - { - // OpenSim.ini can specify a different regions dir - IConfig startupConfig = (IConfig)m_configSource.Configs["Startup"]; - regionConfigPath = startupConfig.GetString("regionload_regionsdir", regionConfigPath).Trim(); - } - catch (Exception) - { - // No INI setting recorded. - } - string regionXmlPath = Path.Combine(regionConfigPath, - String.Format( - m_config.GetString("region_file_template", - "{0}x{1}-{2}.xml"), - region.RegionLocX.ToString(), - region.RegionLocY.ToString(), - regionID.ToString(), - region.InternalEndPoint.Port.ToString(), - region.RegionName.Replace(" ", "_").Replace(":", "_"). - Replace("/", "_"))); - m_log.DebugFormat("[RADMIN] CreateRegion: persisting region {0} to {1}", - region.RegionID, regionXmlPath); - region.SaveRegionToFile("dynamic region", regionXmlPath); - } - - // Create the region and perform any initial initialization - - IScene newscene; - m_app.CreateRegion(region, out newscene); - - // If an access specification was provided, use it. - // Otherwise accept the default. - newscene.RegionInfo.EstateSettings.PublicAccess = getBoolean(requestData, "public", m_publicAccess); - - // enable voice on newly created region if - // requested by either the XmlRpc request or the - // configuration - if (getBoolean(requestData, "enable_voice", m_enableVoiceForNewRegions)) - { - List parcels = ((Scene)newscene).LandChannel.AllParcels(); - - foreach (ILandObject parcel in parcels) - { - parcel.landData.Flags |= (uint)ParcelFlags.AllowVoiceChat; - parcel.landData.Flags |= (uint)ParcelFlags.UseEstateVoiceChan; - } - } - - responseData["success"] = true; - responseData["region_name"] = region.RegionName; - responseData["region_uuid"] = region.RegionID.ToString(); - - response.Value = responseData; - } - catch (Exception e) - { - m_log.ErrorFormat("[RADMIN] CreateRegion: failed {0}", e.Message); - m_log.DebugFormat("[RADMIN] CreateRegion: failed {0}", e.ToString()); - - responseData["success"] = false; - responseData["error"] = e.Message; - - response.Value = responseData; - } - - m_log.Info("[RADMIN]: CreateRegion: request complete"); - return response; - } - } - - /// - /// Delete a new region. - /// - /// incoming XML RPC request - /// - /// XmlRpcDeleteRegionMethod takes the following XMLRPC - /// parameters - /// - /// parameter namedescription - /// password - /// admin password as set in OpenSim.ini - /// region_name - /// desired region name - /// region_id - /// (optional) desired region UUID - /// - /// - /// XmlRpcDeleteRegionMethod returns - /// - /// namedescription - /// success - /// true or false - /// error - /// error message if success is false - /// - /// - public XmlRpcResponse XmlRpcDeleteRegionMethod(XmlRpcRequest request, IPEndPoint remoteClient) - { - m_log.Info("[RADMIN]: DeleteRegion: new request"); - XmlRpcResponse response = new XmlRpcResponse(); - Hashtable responseData = new Hashtable(); - - lock (rslock) - { - try - { - Hashtable requestData = (Hashtable)request.Params[0]; - checkStringParameters(request, new string[] { "password", "region_name" }); - - Scene scene = null; - string regionName = (string)requestData["region_name"]; - if (!m_app.SceneManager.TryGetScene(regionName, out scene)) - throw new Exception(String.Format("region \"{0}\" does not exist", regionName)); - - m_app.RemoveRegion(scene, true); - - responseData["success"] = true; - responseData["region_name"] = regionName; - - response.Value = responseData; - } - catch (Exception e) - { - m_log.ErrorFormat("[RADMIN] DeleteRegion: failed {0}", e.Message); - m_log.DebugFormat("[RADMIN] DeleteRegion: failed {0}", e.ToString()); - - responseData["success"] = false; - responseData["error"] = e.Message; - - response.Value = responseData; - } - - m_log.Info("[RADMIN]: DeleteRegion: request complete"); - return response; - } - } - - /// - /// Change characteristics of an existing region. - /// - /// incoming XML RPC request - /// - /// XmlRpcModifyRegionMethod takes the following XMLRPC - /// parameters - /// - /// parameter namedescription - /// password - /// admin password as set in OpenSim.ini - /// region_name - /// desired region name - /// region_id - /// (optional) desired region UUID - /// public - /// if true, set the region to public - /// ('true' or 'false'), else to private - /// enable_voice - /// if true, enable voice on all parcels of - /// the region, else disable - /// - /// - /// XmlRpcModifyRegionMethod returns - /// - /// namedescription - /// success - /// true or false - /// error - /// error message if success is false - /// - /// - - public XmlRpcResponse XmlRpcModifyRegionMethod(XmlRpcRequest request, IPEndPoint remoteClient) - { - m_log.Info("[RADMIN]: ModifyRegion: new request"); - XmlRpcResponse response = new XmlRpcResponse(); - Hashtable responseData = new Hashtable(); - - lock (rslock) - { - try - { - Hashtable requestData = (Hashtable)request.Params[0]; - checkStringParameters(request, new string[] { "password", "region_name" }); - - Scene scene = null; - string regionName = (string)requestData["region_name"]; - if (!m_app.SceneManager.TryGetScene(regionName, out scene)) - throw new Exception(String.Format("region \"{0}\" does not exist", regionName)); - - // Modify access - scene.RegionInfo.EstateSettings.PublicAccess = - getBoolean(requestData, "public", scene.RegionInfo.EstateSettings.PublicAccess); - - if (requestData.ContainsKey("enable_voice")) - { - bool enableVoice = getBoolean(requestData, "enable_voice", true); - List parcels = ((Scene)scene).LandChannel.AllParcels(); - - foreach (ILandObject parcel in parcels) - { - if (enableVoice) - { - parcel.landData.Flags |= (uint)ParcelFlags.AllowVoiceChat; - parcel.landData.Flags |= (uint)ParcelFlags.UseEstateVoiceChan; - } - else - { - parcel.landData.Flags &= ~(uint)ParcelFlags.AllowVoiceChat; - parcel.landData.Flags &= ~(uint)ParcelFlags.UseEstateVoiceChan; - } - } - } - - responseData["success"] = true; - responseData["region_name"] = regionName; - - response.Value = responseData; - } - catch (Exception e) - { - m_log.ErrorFormat("[RADMIN] ModifyRegion: failed {0}", e.Message); - m_log.DebugFormat("[RADMIN] ModifyRegion: failed {0}", e.ToString()); - - responseData["success"] = false; - responseData["error"] = e.Message; - - response.Value = responseData; - } - - m_log.Info("[RADMIN]: ModifyRegion: request complete"); - return response; - } - } -#endif - - } } diff --git a/InWorldz/InWorldz.VivoxVoice/VivoxVoiceModule.cs b/InWorldz/InWorldz.VivoxVoice/VivoxVoiceModule.cs index c7840ef6..89493135 100644 --- a/InWorldz/InWorldz.VivoxVoice/VivoxVoiceModule.cs +++ b/InWorldz/InWorldz.VivoxVoice/VivoxVoiceModule.cs @@ -1069,18 +1069,6 @@ private bool VivoxTryGetDirectory(string directoryName, out string directoryId) return false; } - // private static readonly string m_vivoxChannelById = "http://{0}/api2/viv_chan_mod.php?mode={1}&chan_id={2}&auth_token={3}"; - - // private XmlElement VivoxGetChannelById(string parent, string channelid) - // { - // string requrl = String.Format(m_vivoxChannelById, m_vivoxServer, "get", channelid, m_authToken); - - // if (parent != null && parent != String.Empty) - // return VivoxGetChild(parent, channelid); - // else - // return VivoxCall(requrl, true); - // } - /// /// Delete a channel. /// Once again, there a multitude of options possible. In the simplest case @@ -1117,37 +1105,6 @@ private XmlElement VivoxListChildren(string channelid) return VivoxCall(requrl, true); } - // private XmlElement VivoxGetChild(string parent, string child) - // { - - // XmlElement children = VivoxListChildren(parent); - // string count; - - // if (XmlFind(children, "response.level0.channel-search.count", out count)) - // { - // int cnum = Convert.ToInt32(count); - // for (int i = 0; i < cnum; i++) - // { - // string name; - // string id; - // if (XmlFind(children, "response.level0.channel-search.channels.channels.level4.name", i, out name)) - // { - // if (name == child) - // { - // if (XmlFind(children, "response.level0.channel-search.channels.channels.level4.id", i, out id)) - // { - // return VivoxGetChannelById(null, id); - // } - // } - // } - // } - // } - - // // One we *know* does not exist. - // return VivoxGetChannel(null, Guid.NewGuid().ToString()); - - // } - /// /// This method handles the WEB side of making a request over the /// Vivox interface. The returned values are tansferred to a has diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index 5a063d31..bea287e3 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs @@ -966,11 +966,6 @@ public bool insertRegion(RegionProfileData regiondata) { IDbCommand result = Query(sql, parameters); - // int x; - // if ((x = result.ExecuteNonQuery()) > 0) - // { - // returnval = true; - // } if (result.ExecuteNonQuery() > 0) { returnval = true; @@ -1006,11 +1001,6 @@ public bool deleteRegion(string uuid) IDbCommand result = Query(sql, parameters); - // int x; - // if ((x = result.ExecuteNonQuery()) > 0) - // { - // returnval = true; - // } if (result.ExecuteNonQuery() > 0) { returnval = true; @@ -1058,11 +1048,6 @@ public bool insertAgentRow(UserAgentData agentdata) { IDbCommand result = Query(sql, parameters); - // int x; - // if ((x = result.ExecuteNonQuery()) > 0) - // { - // returnval = true; - // } if (result.ExecuteNonQuery() > 0) { returnval = true; diff --git a/OpenSim/Data/UserDataBase.cs b/OpenSim/Data/UserDataBase.cs index 16b7a37e..731b611d 100644 --- a/OpenSim/Data/UserDataBase.cs +++ b/OpenSim/Data/UserDataBase.cs @@ -34,10 +34,6 @@ namespace OpenSim.Data { public abstract class UserDataBase : IUserDataPlugin { - // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - // private Dictionary aplist = new Dictionary(); - public abstract UserProfileData GetUserByUUID(UUID user); public abstract UserProfileData GetUserByName(string fname, string lname); public abstract UserAgentData GetAgentByUUID(UUID user); @@ -45,10 +41,8 @@ public abstract class UserDataBase : IUserDataPlugin public abstract UserAgentData GetAgentByName(string fname, string lname); public UserProfileData GetUserByUri(Uri uri) { return null; } public abstract void StoreWebLoginKey(UUID agentID, UUID webLoginKey); - //public abstract UserAgentData GetAgentProfileURL(UUID agentID, string profileURL); public abstract void AddNewUserProfile(UserProfileData user); - //public abstract UserInterestsData GetUserInterests(UUID user); - + public virtual void AddTemporaryUserProfile(UserProfileData userProfile) { // Temporary profiles are optional for database plugins. @@ -59,7 +53,6 @@ public virtual void RemoveTemporaryUserProfile(UUID userid) } public abstract bool UpdateUserProfile(UserProfileData user); - //public abstract bool UpdateUserInterests(UserInterestsData user); public abstract void AddNewUserAgent(UserAgentData agent); public abstract void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms); public abstract void RemoveUserFriend(UUID friendlistowner, UUID friend); @@ -77,20 +70,6 @@ public virtual void RemoveTemporaryUserProfile(UUID userid) public abstract List GetBotOutfitsByOwner(UUID userID); public abstract List GetCachedBakedTextures(List args); public abstract void SetCachedBakedTextures(Dictionary bakedTextures); - // public virtual AvatarAppearance GetUserAppearance(UUID user) { - // AvatarAppearance aa = null; - // try { - // aa = aplist[user]; - // m_log.Info("[APPEARANCE] Found appearance for " + user.ToString() + aa.ToString()); - // } catch (System.Collections.Generic.KeyNotFoundException e) { - // m_log.Info("[APPEARANCE] No appearance found for " + user.ToString()); - // } - // return aa; - // } - // public virtual void UpdateUserAppearance(UUID user, AvatarAppearance appearance) { - // aplist[user] = appearance; - // m_log.Info("[APPEARANCE] Setting appearance for " + user.ToString() + appearance.ToString()); - // } public abstract void ResetAttachments(UUID userID); public abstract void LogoutUsers(UUID regionID); diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index c7531067..29297d5f 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs @@ -34,7 +34,6 @@ namespace OpenSim.Framework { public class EstateSettings { - // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private readonly ConfigurationMember configMember; public enum EstateSaveOptions : uint { EstateSaveSettingsOnly = 0, EstateSaveManagers = 1, EstateSaveUsers = 2, EstateSaveGroups = 4, EstateSaveBans = 8 }; @@ -406,14 +405,6 @@ public void loadConfigurationOptions() ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, String.Empty, "0.0", true); -// configMember.addConfigurationOption("estate_id", -// ConfigurationOption.ConfigurationTypes.TYPE_UINT32, -// String.Empty, "100", true); - -// configMember.addConfigurationOption("parent_estate_id", -// ConfigurationOption.ConfigurationTypes.TYPE_UINT32, -// String.Empty, "1", true); - configMember.addConfigurationOption("redirect_grid_x", ConfigurationOption.ConfigurationTypes.TYPE_INT32, String.Empty, "0", true); @@ -496,12 +487,6 @@ public bool handleIncomingConfiguration(string configuration_key, object configu case "billable_factor": m_BillableFactor = (float) configuration_result; break; -// case "estate_id": -// m_EstateID = (uint) configuration_result; -// break; -// case "parent_estate_id": -// m_ParentEstateID = (uint) configuration_result; -// break; case "redirect_grid_x": m_RedirectGridX = (int) configuration_result; break; diff --git a/OpenSim/Grid/GridServer.Modules/GridXmlRpcModule.cs b/OpenSim/Grid/GridServer.Modules/GridXmlRpcModule.cs index f34300b1..bd2c4c3b 100644 --- a/OpenSim/Grid/GridServer.Modules/GridXmlRpcModule.cs +++ b/OpenSim/Grid/GridServer.Modules/GridXmlRpcModule.cs @@ -657,13 +657,6 @@ public XmlRpcResponse XmlRpcSimulatorDataRequestMethod(XmlRpcRequest request, IP { UUID regionID = new UUID((string)requestData["region_UUID"]); simData = m_gridDBService.GetRegion(regionID); -#if false // this happens all the time normally and pollutes the log - if (simData == null) - { - m_log.WarnFormat("[DATA] didn't find regionID {0} from {1}", - regionID, request.Params.Count > 1 ? request.Params[1] : "unknown source"); - } -#endif } else if (requestData.ContainsKey("region_handle")) { diff --git a/OpenSim/Grid/GridServer/Program.cs b/OpenSim/Grid/GridServer/Program.cs index 2f8d358c..18160997 100644 --- a/OpenSim/Grid/GridServer/Program.cs +++ b/OpenSim/Grid/GridServer/Program.cs @@ -40,15 +40,8 @@ public static void Main(string[] args) GridServerBase app = new GridServerBase(); -// if (args.Length > 0 && args[0] == "-setuponly") -// { -// app.Config(); -// } -// else -// { - app.Startup(); - app.Work(); -// } + app.Startup(); + app.Work(); } } } diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs index 62531ac4..fd47129d 100644 --- a/OpenSim/Grid/MessagingServer/Main.cs +++ b/OpenSim/Grid/MessagingServer/Main.cs @@ -63,8 +63,6 @@ public class OpenMessage_Main : BaseOpenSimServer , IGridServiceCore private InWorldz.RemoteAdmin.RemoteAdmin m_radmin; - // private UUID m_lastCreatedUser = UUID.Random(); - public static void Main(string[] args) { ServicePointManager.DefaultConnectionLimit = 12; @@ -224,34 +222,6 @@ protected override void StartupSpecific() "Re-register with user server(s)", HandleRegister); } - public void do_create(string what) - { - //switch (what) - //{ - // case "user": - // try - // { - // //userID = - // //m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); - // } catch (Exception ex) - // { - // m_console.Error("[SERVER]: Error creating user: {0}", ex.ToString()); - // } - - // try - // { - // //RestObjectPoster.BeginPostObject(m_userManager._config.InventoryUrl + "CreateInventory/", - // //userID.Guid); - // } - // catch (Exception ex) - // { - // m_console.Error("[SERVER]: Error creating inventory for user: {0}", ex.ToString()); - // } - // // m_lastCreatedUser = userID; - // break; - //} - } - private void HandleClearCache(string module, string[] cmd) { int entries = m_regionModule.ClearRegionCache(); diff --git a/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs b/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs index 002a8afa..70976b83 100644 --- a/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs +++ b/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs @@ -118,7 +118,7 @@ public void RegisterHandlers(BaseHttpServer httpServer) m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("region_shutdown"), RegionShutdown)); m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("agent_location"), AgentLocation)); m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("agent_leaving"), AgentLeaving)); - + // Message Server ---> User Server m_httpServer.AddXmlRPCHandler("register_messageserver", XmlRPCRegisterMessageServer); m_httpServer.AddXmlRPCHandler("agent_change_region", XmlRPCUserMovedtoRegion); @@ -281,10 +281,6 @@ private void TellMessageServersAboutUserInternal(UUID agentID, UUID sessionID, U { m_log.Info("[MSGCONNECTOR]: Sending login notice to registered message servers"); } -// else -// { -// m_log.Debug("[MSGCONNECTOR]: No Message Servers registered, ignoring"); -// } foreach (MessageServerInfo serv in MessageServers.Values) { NotifyMessageServerAboutUser(serv, agentID, sessionID, RegionID, diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 5472d1a8..4182f7ee 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs @@ -225,10 +225,6 @@ protected virtual void StartupLoginService() { m_loginService = new UserLoginService( m_userDataBaseService, new LibraryRootFolder(Cfg.LibraryXmlfile), Cfg.MapServerURI, Cfg, Cfg.DefaultStartupMsg, new RegionProfileServiceProxy()); - - //if (Cfg.EnableHGLogin) - // m_loginAuthService = new UserLoginAuthService(m_userDataBaseService, inventoryService, new LibraryRootFolder(Cfg.LibraryXmlfile), - // Cfg, Cfg.DefaultStartupMsg, new RegionProfileServiceProxy()); } protected virtual void PostInitialiseModules() diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index d508cc17..2bc57055 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -4318,17 +4318,6 @@ public void SendLandProperties(int sequence_id, bool snap_selection, int request updateMessage.ObscureMusic = landData.ObscureMusic; updateMessage.ObscureMedia = landData.ObscureMedia; -#if false - if (landData.SimwideArea > 0) - { - int simulatorCapacity = (int)(((float)landData.SimwideArea / 65536.0f) * (float)m_scene.RegionInfo.ObjectCapacity * (float)m_scene.RegionInfo.RegionSettings.ObjectBonus); - updateMessage.SimWideMaxPrims = simulatorCapacity; - } - else - { - updateMessage.SimWideMaxPrims = 0; - } -#endif updateMessage.SimWideMaxPrims = simObjectCapacity; updateMessage.OwnerPrims = landData.OwnerPrims; diff --git a/OpenSim/Region/CoreModules/Capabilities/AssetCapsModule.cs b/OpenSim/Region/CoreModules/Capabilities/AssetCapsModule.cs index 6fde71ce..424e99c4 100644 --- a/OpenSim/Region/CoreModules/Capabilities/AssetCapsModule.cs +++ b/OpenSim/Region/CoreModules/Capabilities/AssetCapsModule.cs @@ -164,16 +164,6 @@ public void RegisterCaps(UUID agentID, Caps caps) caps.RegionName, e.Message); } - if (getTextureCapRegistered == false) - { -#if false - // If we get here aperture is either disabled or we failed to contact it - IRequestHandler handler = new GetTextureHandler("/CAPS/" + capID + "/", m_assetService, "GetTexture", agentID.ToString()); - caps.RegisterHandler("GetTexture", handler); - // m_log.DebugFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); -#endif - } - IRequestHandler requestHandler; ISimulatorFeaturesModule SimulatorFeatures = m_Scene.RequestModuleInterface(); @@ -327,328 +317,6 @@ private void DoDeregisterSingleApertureCap(Caps caps, string which) } } -#if false - protected class GetTextureHandler : BaseStreamHandler - { - private static readonly ILog m_log = - LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private IAssetService m_assetService; - - public const string DefaultFormat = "x-j2c"; - - // TODO: Change this to a config option - const string REDIRECT_URL = null; - - public GetTextureHandler(string path, IAssetService assService, string name, string description) - : base("GET", path, name, description) - { - m_assetService = assService; - } - - public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) - { - // Try to parse the texture ID from the request URL - NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query); - string textureStr = query.GetOne("texture_id"); - string format = query.GetOne("format"); - - //m_log.DebugFormat("[GETTEXTURE]: called {0}", textureStr); - - if (m_assetService == null) - { - m_log.Error("[GETTEXTURE]: Cannot fetch texture " + textureStr + " without an asset service"); - httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; - } - - UUID textureID; - if (!String.IsNullOrEmpty(textureStr) && UUID.TryParse(textureStr, out textureID)) - { - // m_log.DebugFormat("[GETTEXTURE]: Received request for texture id {0}", textureID); - - string[] formats; - if (format != null && format != string.Empty) - { - formats = new string[1] { format.ToLower() }; - } - else - { - formats = WebUtil.GetPreferredImageTypes(httpRequest.Headers.Get("Accept")); - if (formats.Length == 0) - formats = new string[1] { DefaultFormat }; // default - - } - // OK, we have an array with preferred formats, possibly with only one entry - - httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; - foreach (string f in formats) - { - if (FetchTexture(httpRequest, httpResponse, textureID, f)) - break; - } - } - else - { - m_log.Warn("[GETTEXTURE]: Failed to parse a texture_id from GetTexture request: " + httpRequest.Url); - } - - // m_log.DebugFormat( - // "[GETTEXTURE]: For texture {0} sending back response {1}, data length {2}", - // textureID, httpResponse.StatusCode, httpResponse.ContentLength); - - return null; - } - - /// - /// - /// - /// - /// - /// - /// - /// False for "caller try another codec"; true otherwise - private bool FetchTexture(OSHttpRequest httpRequest, OSHttpResponse httpResponse, UUID textureID, string format) - { - // m_log.DebugFormat("[GETTEXTURE]: {0} with requested format {1}", textureID, format); - AssetBase texture; - - string fullID = textureID.ToString(); - if (format != DefaultFormat) - fullID = fullID + "-" + format; - - if (!String.IsNullOrEmpty(REDIRECT_URL)) - { - // Only try to fetch locally cached textures. Misses are redirected - texture = m_assetService.GetCached(fullID); - - if (texture != null) - { - if (texture.Type != (sbyte)AssetType.Texture) - { - httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; - return true; - } - WriteTextureData(httpRequest, httpResponse, texture, format); - } - else - { - string textureUrl = REDIRECT_URL + textureID.ToString(); - m_log.Debug("[GETTEXTURE]: Redirecting texture request to " + textureUrl); - httpResponse.RedirectLocation = textureUrl; - return true; - } - } - else // no redirect - { - // try the cache - texture = m_assetService.GetCached(fullID); - - if (texture == null) - { - //m_log.DebugFormat("[GETTEXTURE]: texture was not in the cache"); - - // Fetch locally or remotely. Misses return a 404 - texture = m_assetService.Get(textureID.ToString()); - - if (texture != null) - { - if (texture.Type != (sbyte)AssetType.Texture) - { - httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; - return true; - } - if (format == DefaultFormat) - { - WriteTextureData(httpRequest, httpResponse, texture, format); - return true; - } - else - { - AssetBase newTexture = new AssetBase(texture.ID + "-" + format, texture.Name, (sbyte)AssetType.Texture, texture.Metadata.CreatorID); - newTexture.Data = ConvertTextureData(texture, format); - if (newTexture.Data.Length == 0) - return false; // !!! Caller try another codec, please! - - newTexture.Flags = AssetFlags.Collectable; - newTexture.Temporary = true; - m_assetService.Store(newTexture); - WriteTextureData(httpRequest, httpResponse, newTexture, format); - return true; - } - } - } - else // it was on the cache - { - //m_log.DebugFormat("[GETTEXTURE]: texture was in the cache"); - WriteTextureData(httpRequest, httpResponse, texture, format); - return true; - } - } - - // not found - // m_log.Warn("[GETTEXTURE]: Texture " + textureID + " not found"); - httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; - return true; - } - - private void WriteTextureData(IOSHttpRequest request, IOSHttpResponse response, AssetBase texture, string format) - { - string range = request.Headers.GetOne("Range"); - - if (!String.IsNullOrEmpty(range)) // JP2's only - { - // Range request - int start, end; - if (TryParseRange(range, out start, out end)) - { - - // Before clamping start make sure we can satisfy it in order to avoid - // sending back the last byte instead of an error status - if (start >= texture.Data.Length) - { - response.StatusCode = (int)System.Net.HttpStatusCode.RequestedRangeNotSatisfiable; - } - else - { - end = Utils.Clamp(end, 0, texture.Data.Length - 1); - start = Utils.Clamp(start, 0, end); - int len = end - start + 1; - - //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); - - // Always return PartialContent, even if the range covered the entire data length - // We were accidentally sending back 404 before in this situation - // https://issues.apache.org/bugzilla/show_bug.cgi?id=51878 supports sending 206 even if the - // entire range is requested, and viewer 3.2.2 (and very probably earlier) seems fine with this. - response.StatusCode = (int)System.Net.HttpStatusCode.PartialContent; - - response.ContentLength = len; - response.ContentType = texture.Metadata.ContentType; - response.AddHeader("Content-Range", String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length)); - - response.Body.Write(texture.Data, start, len); - } - } - else - { - m_log.Warn("[GETTEXTURE]: Malformed Range header: " + range); - response.StatusCode = (int)System.Net.HttpStatusCode.BadRequest; - } - } - else // JP2's or other formats - { - // Full content request - response.StatusCode = (int)System.Net.HttpStatusCode.OK; - response.ContentLength = texture.Data.Length; - if (format == DefaultFormat) - response.ContentType = texture.Metadata.ContentType; - else - response.ContentType = "image/" + format; - response.Body.Write(texture.Data, 0, texture.Data.Length); - } - - // if (response.StatusCode < 200 || response.StatusCode > 299) - // m_log.WarnFormat( - // "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})", - // texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length); - // else - // m_log.DebugFormat( - // "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})", - // texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length); - } - - private bool TryParseRange(string header, out int start, out int end) - { - if (header.StartsWith("bytes=")) - { - string[] rangeValues = header.Substring(6).Split('-'); - if (rangeValues.Length == 2) - { - if (Int32.TryParse(rangeValues[0], out start) && Int32.TryParse(rangeValues[1], out end)) - return true; - } - } - - start = end = 0; - return false; - } - - private byte[] ConvertTextureData(AssetBase texture, string format) - { - m_log.DebugFormat("[GETTEXTURE]: Converting texture {0} to {1}", texture.ID, format); - byte[] data = new byte[0]; - - MemoryStream imgstream = new MemoryStream(); - Bitmap mTexture = new Bitmap(1, 1); - ManagedImage managedImage; - Image image = (Image)mTexture; - - try - { - // Taking our jpeg2000 data, decoding it, then saving it to a byte array with regular data - - imgstream = new MemoryStream(); - - // Decode image to System.Drawing.Image - if (OpenJPEG.DecodeToImage(texture.Data, out managedImage, out image)) - { - // Save to bitmap - mTexture = new Bitmap(image); - - EncoderParameters myEncoderParameters = new EncoderParameters(); - myEncoderParameters.Param[0] = new EncoderParameter(Encoder.Quality, 95L); - - // Save bitmap to stream - ImageCodecInfo codec = GetEncoderInfo("image/" + format); - if (codec != null) - { - mTexture.Save(imgstream, codec, myEncoderParameters); - // Write the stream to a byte array for output - data = imgstream.ToArray(); - } - else - m_log.WarnFormat("[GETTEXTURE]: No such codec {0}", format); - - } - } - catch (Exception e) - { - m_log.WarnFormat("[GETTEXTURE]: Unable to convert texture {0} to {1}: {2}", texture.ID, format, e.Message); - } - finally - { - // Reclaim memory, these are unmanaged resources - // If we encountered an exception, one or more of these will be null - if (mTexture != null) - mTexture.Dispose(); - - if (image != null) - image.Dispose(); - - if (imgstream != null) - { - imgstream.Close(); - imgstream.Dispose(); - } - } - - return data; - } - - // From msdn - private static ImageCodecInfo GetEncoderInfo(String mimeType) - { - ImageCodecInfo[] encoders; - encoders = ImageCodecInfo.GetImageEncoders(); - for (int j = 0; j < encoders.Length; ++j) - { - if (encoders[j].MimeType == mimeType) - return encoders[j]; - } - return null; - } - } -#endif - protected class UploadBakedTextureHandler { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Capabilities/AssortedCapsModule.cs b/OpenSim/Region/CoreModules/Capabilities/AssortedCapsModule.cs index 078aaff6..de5177b4 100644 --- a/OpenSim/Region/CoreModules/Capabilities/AssortedCapsModule.cs +++ b/OpenSim/Region/CoreModules/Capabilities/AssortedCapsModule.cs @@ -92,48 +92,6 @@ public string Name public void RegisterCaps(UUID agentID, Caps caps) { -#if false - m_service = service; - m_agentInfoService = service.Registry.RequestModuleInterface(); - m_agentProcessing = service.Registry.RequestModuleInterface(); - - HttpServerHandle method = delegate(string path, Stream request, - OSHttpRequest httpRequest, OSHttpResponse httpResponse) - { - return ProcessUpdateAgentLanguage(request, m_service.AgentID); - }; - service.AddStreamHandler("UpdateAgentLanguage", new GenericStreamHandler("POST", service.CreateCAPS("UpdateAgentLanguage", ""), - method)); - - - method = delegate(string path, Stream request, - OSHttpRequest httpRequest, OSHttpResponse httpResponse) - { - return ProcessUpdateAgentInfo(request, m_service.AgentID); - }; - service.AddStreamHandler("UpdateAgentInformation", new GenericStreamHandler("POST", service.CreateCAPS("UpdateAgentInformation", ""), - method)); - - service.AddStreamHandler("AvatarPickerSearch", new GenericStreamHandler("GET", service.CreateCAPS("AvatarPickerSearch", ""), - ProcessAvatarPickerSearch)); - - method = delegate(string path, Stream request, - OSHttpRequest httpRequest, OSHttpResponse httpResponse) - { - return HomeLocation(request, m_service.AgentID); - }; - service.AddStreamHandler("HomeLocation", new GenericStreamHandler("POST", service.CreateCAPS("HomeLocation", ""), - method)); - - method = delegate(string path, Stream request, - OSHttpRequest httpRequest, OSHttpResponse httpResponse) - { - return TeleportLocation(request, m_service.AgentID); - }; - - service.AddStreamHandler("TeleportLocation", new GenericStreamHandler("POST", service.CreateCAPS("TeleportLocation", ""), - method)); -#endif } public void EnteringRegion() @@ -142,187 +100,10 @@ public void EnteringRegion() public void DeregisterCaps() { -#if false - m_service.RemoveStreamHandler("UpdateAgentLanguage", "POST"); - m_service.RemoveStreamHandler("UpdateAgentInformation", "POST"); - m_service.RemoveStreamHandler("AvatarPickerSearch", "GET"); - m_service.RemoveStreamHandler("HomeLocation", "POST"); - m_service.RemoveStreamHandler("TeleportLocation", "POST"); -#endif } #region Other CAPS -#if false - private byte[] HomeLocation(Stream request, UUID agentID) - { - OSDMap rm = (OSDMap)OSDParser.DeserializeLLSDXml(request); - OSDMap HomeLocation = rm["HomeLocation"] as OSDMap; - if (HomeLocation != null) - { - OSDMap pos = HomeLocation["LocationPos"] as OSDMap; - Vector3 position = new Vector3((float)pos["X"].AsReal(), - (float)pos["Y"].AsReal(), - (float)pos["Z"].AsReal()); - OSDMap lookat = HomeLocation["LocationLookAt"] as OSDMap; - Vector3 lookAt = new Vector3((float)lookat["X"].AsReal(), - (float)lookat["Y"].AsReal(), - (float)lookat["Z"].AsReal()); - //int locationID = HomeLocation["LocationId"].AsInteger(); - - m_agentInfoService.SetHomePosition(agentID.ToString(), m_service.Region.RegionID, position, lookAt); - } - - rm.Add("success", OSD.FromBoolean(true)); - return OSDParser.SerializeLLSDXmlBytes(rm); - } - - private byte[] ProcessUpdateAgentLanguage(Stream request, UUID agentID) - { - OSDMap rm = OSDParser.DeserializeLLSDXml(request) as OSDMap; - if (rm == null) - return MainServer.BadRequest; - IAgentConnector AgentFrontend = DataManager.RequestPlugin(); - if (AgentFrontend != null) - { - IAgentInfo IAI = AgentFrontend.GetAgent(agentID); - if (IAI == null) - return MainServer.BadRequest; - IAI.Language = rm["language"].AsString(); - IAI.LanguageIsPublic = int.Parse(rm["language_is_public"].AsString()) == 1; - AgentFrontend.UpdateAgent(IAI); - } - return MainServer.BlankResponse; - } - - private byte[] ProcessAvatarPickerSearch(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) - { - NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query); - string amt = query.GetOne("page-size"); - string name = query.GetOne("names"); - List accounts = m_service.Registry.RequestModuleInterface().GetUserAccounts(m_service.ClientCaps.AccountInfo.AllScopeIDs, name, 0, uint.Parse(amt)) ?? - new List(0); - - OSDMap body = new OSDMap(); - OSDArray array = new OSDArray(); - foreach (UserAccount account in accounts) - { - OSDMap map = new OSDMap(); - map["agent_id"] = account.PrincipalID; - IUserProfileInfo profileInfo = DataManager.RequestPlugin().GetUserProfile(account.PrincipalID); - map["display_name"] = (profileInfo == null || profileInfo.DisplayName == "") ? account.Name : profileInfo.DisplayName; - map["username"] = account.Name; - array.Add(map); - } - - body["agents"] = array; - return OSDParser.SerializeLLSDXmlBytes(body); - } - - private byte[] ProcessUpdateAgentInfo(Stream request, UUID agentID) - { - OSD r = OSDParser.DeserializeLLSDXml(request); - OSDMap rm = (OSDMap)r; - OSDMap access = (OSDMap)rm["access_prefs"]; - string Level = access["max"].AsString(); - int maxLevel = 0; - if (Level == "PG") - maxLevel = 0; - if (Level == "M") - maxLevel = 1; - if (Level == "A") - maxLevel = 2; - IAgentConnector data = DataManager.RequestPlugin(); - if (data != null) - { - IAgentInfo agent = data.GetAgent(agentID); - agent.MaturityRating = maxLevel; - data.UpdateAgent(agent); - } - return MainServer.BlankResponse; - } - - private bool _isInTeleportCurrently = false; - private byte[] TeleportLocation(Stream request, UUID agentID) - { - OSDMap retVal = new OSDMap(); - if (_isInTeleportCurrently) - { - retVal.Add("reason", "Duplicate teleport request."); - retVal.Add("success", OSD.FromBoolean(false)); - return OSDParser.SerializeLLSDXmlBytes(retVal); - } - _isInTeleportCurrently = true; - - OSDMap rm = (OSDMap)OSDParser.DeserializeLLSDXml(request); - OSDMap pos = rm["LocationPos"] as OSDMap; - Vector3 position = new Vector3((float)pos["X"].AsReal(), - (float)pos["Y"].AsReal(), - (float)pos["Z"].AsReal()); - /*OSDMap lookat = rm["LocationLookAt"] as OSDMap; - Vector3 lookAt = new Vector3((float)lookat["X"].AsReal(), - (float)lookat["Y"].AsReal(), - (float)lookat["Z"].AsReal());*/ - ulong RegionHandle = rm["RegionHandle"].AsULong(); - const uint tpFlags = 16; - - if (m_service.ClientCaps.GetRootCapsService().RegionHandle != m_service.RegionHandle) - { - retVal.Add("reason", "Contacted by non-root region for teleport. Protocol implemention is wrong."); - retVal.Add("success", OSD.FromBoolean(false)); - return OSDParser.SerializeLLSDXmlBytes(retVal); - } - - string reason = ""; - int x, y; - Util.UlongToInts(RegionHandle, out x, out y); - GridRegion destination = m_service.Registry.RequestModuleInterface().GetRegionByPosition( - m_service.ClientCaps.AccountInfo.AllScopeIDs, x, y); - ISimulationService simService = m_service.Registry.RequestModuleInterface(); - AgentData ad = new AgentData(); - AgentCircuitData circuitData = null; - if (destination != null) - { - simService.RetrieveAgent(m_service.Region, m_service.AgentID, true, out ad, out circuitData); - if (ad != null) - { - ad.Position = position; - ad.Center = position; - circuitData.startpos = position; - } - } - if (destination == null || circuitData == null) - { - retVal.Add("reason", "Could not find the destination region."); - retVal.Add("success", OSD.FromBoolean(false)); - return OSDParser.SerializeLLSDXmlBytes(retVal); - } - circuitData.reallyischild = false; - circuitData.child = false; - - if (m_service.RegionHandle != destination.RegionHandle) - simService.MakeChildAgent(m_service.AgentID, m_service.Region.RegionID, destination, false); - - if (m_agentProcessing.TeleportAgent(ref destination, tpFlags, ad == null ? 0 : (int)ad.Far, circuitData, ad, - m_service.AgentID, m_service.RegionHandle, out reason) || reason == "") - { - if (m_service.RegionHandle != destination.RegionHandle) - simService.MakeChildAgent(m_service.AgentID, m_service.Region.RegionID, destination, true); - retVal.Add("success", OSD.FromBoolean(true)); - } - else - { - if (reason != "Already in a teleport")//If this error occurs... don't kick them out of their current region - simService.FailedToMoveAgentIntoNewRegion(m_service.AgentID, destination.RegionID); - retVal.Add("reason", reason); - retVal.Add("success", OSD.FromBoolean(false)); - } - - //Send back data - _isInTeleportCurrently = false; - return OSDParser.SerializeLLSDXmlBytes(retVal); - } -#endif #endregion } diff --git a/OpenSim/Region/CoreModules/Capabilities/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/CoreModules/Capabilities/NewFileAgentInventoryVariablePriceModule.cs deleted file mode 100644 index 5241793b..00000000 --- a/OpenSim/Region/CoreModules/Capabilities/NewFileAgentInventoryVariablePriceModule.cs +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Copyright (c) 2015, InWorldz Halcyon Developers - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * * Neither the name of halcyon nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#if false -/* - * Copyright (c) InWorldz Halcyon Developers - * Copyright (c) Contributors, http://opensimulator.org/ - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections; -using System.Collections.Specialized; -using System.Reflection; -using System.IO; -using System.Web; -using Mono.Addins; -using log4net; -using Nini.Config; -using OpenMetaverse; -using OpenMetaverse.StructuredData; -using OpenSim.Framework; -using OpenSim.Framework.Servers; -using OpenSim.Framework.Servers.HttpServer; -using OpenSim.Region.Framework.Interfaces; -using OpenSim.Region.Framework.Scenes; -using OpenSim.Services.Interfaces; -using Caps = OpenSim.Framework.Communications.Capabilities.Caps; -using OpenSim.Framework.Capabilities; - -namespace OpenSim.Region.CoreModules.Capabilities -{ - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] - public class NewFileAgentInventoryVariablePriceModule : INonSharedRegionModule - { -// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - private Scene m_scene; -// private IAssetService m_assetService; - private bool m_dumpAssetsToFile = false; - private bool m_enabled = true; - private int m_levelUpload = 0; - -#region IRegionModuleBase Members - - - public Type ReplaceableInterface - { - get { return null; } - } - - public void Initialise(IConfigSource source) - { - IConfig meshConfig = source.Configs["Mesh"]; - if (meshConfig == null) - return; - - m_enabled = meshConfig.GetBoolean("AllowMeshUpload", true); - m_levelUpload = meshConfig.GetInt("LevelUpload", 0); - } - - public void AddRegion(Scene pScene) - { - m_scene = pScene; - } - - public void RemoveRegion(Scene scene) - { - - m_scene.EventManager.OnRegisterCaps -= RegisterCaps; - m_scene = null; - } - - public void RegionLoaded(Scene scene) - { - -// m_assetService = m_scene.RequestModuleInterface(); - m_scene.EventManager.OnRegisterCaps += RegisterCaps; - } - - #endregion - - -#region IRegionModule Members - - - - public void Close() { } - - public string Name { get { return "NewFileAgentInventoryVariablePriceModule"; } } - - - public void RegisterCaps(UUID agentID, Caps caps) - { - if(!m_enabled) - return; - - UUID capID = UUID.Random(); - -// m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID); - caps.RegisterHandler( - "NewFileAgentInventoryVariablePrice", - new LLSDStreamhandler( - "POST", - "/CAPS/" + capID.ToString(), - req => NewAgentInventoryRequest(req, agentID), - "NewFileAgentInventoryVariablePrice", - agentID.ToString())); - } - - #endregion - - public LLSDNewFileAngentInventoryVariablePriceReplyResponse NewAgentInventoryRequest(LLSDAssetUploadRequest llsdRequest, UUID agentID) - { - //TODO: The Mesh uploader uploads many types of content. If you're going to implement a Money based limit - // you need to be aware of this - - //if (llsdRequest.asset_type == "texture" || - // llsdRequest.asset_type == "animation" || - // llsdRequest.asset_type == "sound") - // { - // check user level - - ScenePresence avatar = null; - IClientAPI client = null; - m_scene.TryGetScenePresence(agentID, out avatar); - - if (avatar != null) - { - client = avatar.ControllingClient; - - if (avatar.UserLevel < m_levelUpload) - { - if (client != null) - client.SendAgentAlertMessage("Unable to upload asset. Insufficient permissions.", false); - - LLSDNewFileAngentInventoryVariablePriceReplyResponse errorResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse(); - errorResponse.rsvp = ""; - errorResponse.state = "error"; - return errorResponse; - } - } - - // check funds - IMoneyModule mm = m_scene.RequestModuleInterface(); - - if (mm != null) - { - if (!mm.UploadCovered(agentID, mm.UploadCharge)) - { - if (client != null) - client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false); - - LLSDNewFileAngentInventoryVariablePriceReplyResponse errorResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse(); - errorResponse.rsvp = ""; - errorResponse.state = "error"; - return errorResponse; - } - } - - // } - - string assetName = llsdRequest.name; - string assetDes = llsdRequest.description; - string capsBase = "/CAPS/NewFileAgentInventoryVariablePrice/"; - UUID newAsset = UUID.Random(); - UUID newInvItem = UUID.Random(); - UUID parentFolder = llsdRequest.folder_id; - string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000") + "/"; - - AssetUploader uploader = - new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type, - llsdRequest.asset_type, capsBase + uploaderPath, MainServer.Instance, m_dumpAssetsToFile); - - MainServer.Instance.AddStreamHandler( - new BinaryStreamHandler( - "POST", - capsBase + uploaderPath, - uploader.uploaderCaps, - "NewFileAgentInventoryVariablePrice", - agentID.ToString())); - - string protocol = "http://"; - - if (MainServer.Instance.UseSSL) - protocol = "https://"; - - string uploaderURL = protocol + m_scene.RegionInfo.ExternalHostName + ":" + MainServer.Instance.Port.ToString() + capsBase + - uploaderPath; - - - LLSDNewFileAngentInventoryVariablePriceReplyResponse uploadResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse(); - - uploadResponse.rsvp = uploaderURL; - uploadResponse.state = "upload"; - uploadResponse.resource_cost = 0; - uploadResponse.upload_price = 0; - - uploader.OnUpLoad += //UploadCompleteHandler; - - delegate( - string passetName, string passetDescription, UUID passetID, - UUID pinventoryItem, UUID pparentFolder, byte[] pdata, string pinventoryType, - string passetType) - { - UploadCompleteHandler(passetName, passetDescription, passetID, - pinventoryItem, pparentFolder, pdata, pinventoryType, - passetType,agentID); - }; - - return uploadResponse; - } - - public void UploadCompleteHandler(string assetName, string assetDescription, UUID assetID, - UUID inventoryItem, UUID parentFolder, byte[] data, string inventoryType, - string assetType,UUID AgentID) - { -// m_log.DebugFormat( -// "[NEW FILE AGENT INVENTORY VARIABLE PRICE MODULE]: Upload complete for {0}", inventoryItem); - - sbyte assType = 0; - sbyte inType = 0; - - if (inventoryType == "sound") - { - inType = 1; - assType = 1; - } - else if (inventoryType == "animation") - { - inType = 19; - assType = 20; - } - else if (inventoryType == "wearable") - { - inType = 18; - switch (assetType) - { - case "bodypart": - assType = 13; - break; - case "clothing": - assType = 5; - break; - } - } - else if (inventoryType == "mesh") - { - inType = (sbyte)InventoryType.Mesh; - assType = (sbyte)AssetType.Mesh; - } - - AssetBase asset; - asset = new AssetBase(assetID, assetName, assType, AgentID.ToString()); - asset.Data = data; - - if (m_scene.AssetService != null) - m_scene.AssetService.Store(asset); - - InventoryItemBase item = new InventoryItemBase(); - item.Owner = AgentID; - item.CreatorId = AgentID.ToString(); - item.ID = inventoryItem; - item.AssetID = asset.FullID; - item.Description = assetDescription; - item.Name = assetName; - item.AssetType = assType; - item.InvType = inType; - item.Folder = parentFolder; - item.CurrentPermissions - = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer); - item.BasePermissions = (uint)PermissionMask.All; - item.EveryOnePermissions = 0; - item.NextPermissions = (uint)PermissionMask.All; - item.CreationDate = Util.UnixTimeSinceEpoch(); - m_scene.AddInventoryItem(item); - } - } -} -#endif diff --git a/OpenSim/Region/CoreModules/Capabilities/UploadObjectAssetModule.cs b/OpenSim/Region/CoreModules/Capabilities/UploadObjectAssetModule.cs deleted file mode 100644 index c9f609b3..00000000 --- a/OpenSim/Region/CoreModules/Capabilities/UploadObjectAssetModule.cs +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Copyright (c) 2015, InWorldz Halcyon Developers - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * * Neither the name of halcyon nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#if false -/* - * Copyright (c) InWorldz Halcyon Developers - * Copyright (c) Contributors, http://opensimulator.org/ - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections; -using System.Collections.Specialized; -using System.Reflection; -using System.IO; -using System.Web; -using Mono.Addins; -using log4net; -using Nini.Config; -using OpenMetaverse; -using OpenMetaverse.StructuredData; -using OpenMetaverse.Messages.Linden; -using OpenSim.Framework; -using OpenSim.Framework.Servers; -using OpenSim.Framework.Servers.HttpServer; -using OpenSim.Region.Framework.Interfaces; -using OpenSim.Region.Framework.Scenes; -using OpenSim.Services.Interfaces; -using Caps = OpenSim.Framework.Communications.Capabilities.Caps; -using OSD = OpenMetaverse.StructuredData.OSD; -using OSDMap = OpenMetaverse.StructuredData.OSDMap; -using OpenSim.Framework.Communications.Capabilities; -using ExtraParamType = OpenMetaverse.ExtraParamType; - -namespace OpenSim.Region.CoreModules.Capabilities -{ - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] - public class UploadObjectAssetModule : INonSharedRegionModule - { - private static readonly ILog m_log = - LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private Scene m_scene; - - #region IRegionModuleBase Members - - - public Type ReplaceableInterface - { - get { return null; } - } - - public void Initialise(IConfigSource source) - { - - } - - public void AddRegion(Scene pScene) - { - m_scene = pScene; - } - - public void RemoveRegion(Scene scene) - { - - m_scene.EventManager.OnRegisterCaps -= RegisterCaps; - m_scene = null; - } - - public void RegionLoaded(Scene scene) - { - - m_scene.EventManager.OnRegisterCaps += RegisterCaps; - } - - #endregion - - - #region IRegionModule Members - - - - public void Close() { } - - public string Name { get { return "UploadObjectAssetModuleModule"; } } - - - public void RegisterCaps(UUID agentID, Caps caps) - { - UUID capID = UUID.Random(); - - // m_log.Debug("[UPLOAD OBJECT ASSET MODULE]: /CAPS/" + capID); - caps.RegisterHandler( - "UploadObjectAsset", - new RestHTTPHandler( - "POST", - "/CAPS/OA/" + capID + "/", - httpMethod => ProcessAdd(httpMethod, agentID, caps))); - - /* - caps.RegisterHandler("NewFileAgentInventoryVariablePrice", - - new LLSDStreamhandler("POST", - "/CAPS/" + capID.ToString(), - delegate(LLSDAssetUploadRequest req) - { - return NewAgentInventoryRequest(req,agentID); - })); - */ - - } - - #endregion - - - /// - /// Parses add request - /// - /// - /// - /// - /// - public Hashtable ProcessAdd(Hashtable request, UUID AgentId, Caps cap) - { - Hashtable responsedata = new Hashtable(); - responsedata["int_response_code"] = 400; //501; //410; //404; - responsedata["content_type"] = "text/plain"; - responsedata["str_response_string"] = "Request wasn't what was expected"; - ScenePresence avatar; - - if (!m_scene.TryGetScenePresence(AgentId, out avatar)) - return responsedata; - - OSDMap r = (OSDMap)OSDParser.Deserialize((string)request["requestbody"]); - UploadObjectAssetMessage message = new UploadObjectAssetMessage(); - try - { - message.Deserialize(r); - - } - catch (Exception ex) - { - m_log.Error("[UPLOAD OBJECT ASSET MODULE]: Error deserializing message " + ex.ToString()); - message = null; - } - - if (message == null) - { - responsedata["int_response_code"] = 400; //501; //410; //404; - responsedata["content_type"] = "text/plain"; - responsedata["str_response_string"] = - "errorError parsing Object"; - - return responsedata; - } - - Vector3 pos = avatar.AbsolutePosition + (Vector3.UnitX * avatar.Rotation); - Quaternion rot = Quaternion.Identity; - Vector3 rootpos = Vector3.Zero; - // Quaternion rootrot = Quaternion.Identity; - - SceneObjectGroup rootGroup = null; - SceneObjectGroup[] allparts = new SceneObjectGroup[message.Objects.Length]; - for (int i = 0; i < message.Objects.Length; i++) - { - UploadObjectAssetMessage.Object obj = message.Objects[i]; - PrimitiveBaseShape pbs = PrimitiveBaseShape.CreateBox(); - - if (i == 0) - { - rootpos = obj.Position; - // rootrot = obj.Rotation; - } - - // Combine the extraparams data into it's ugly blob again.... - //int bytelength = 0; - //for (int extparams = 0; extparams < obj.ExtraParams.Length; extparams++) - //{ - // bytelength += obj.ExtraParams[extparams].ExtraParamData.Length; - //} - //byte[] extraparams = new byte[bytelength]; - //int position = 0; - - - - //for (int extparams = 0; extparams < obj.ExtraParams.Length; extparams++) - //{ - // Buffer.BlockCopy(obj.ExtraParams[extparams].ExtraParamData, 0, extraparams, position, - // obj.ExtraParams[extparams].ExtraParamData.Length); - // - // position += obj.ExtraParams[extparams].ExtraParamData.Length; - // } - - //pbs.ExtraParams = extraparams; - for (int extparams = 0; extparams < obj.ExtraParams.Length; extparams++) - { - UploadObjectAssetMessage.Object.ExtraParam extraParam = obj.ExtraParams[extparams]; - switch ((ushort)extraParam.Type) - { - case (ushort)ExtraParamType.Sculpt: - Primitive.SculptData sculpt = new Primitive.SculptData(extraParam.ExtraParamData, 0); - - pbs.SculptEntry = true; - - pbs.SculptTexture = obj.SculptID; - pbs.SculptType = (byte)sculpt.Type; - - break; - case (ushort)ExtraParamType.Flexible: - Primitive.FlexibleData flex = new Primitive.FlexibleData(extraParam.ExtraParamData, 0); - pbs.FlexiEntry = true; - pbs.FlexiDrag = flex.Drag; - pbs.FlexiForceX = flex.Force.X; - pbs.FlexiForceY = flex.Force.Y; - pbs.FlexiForceZ = flex.Force.Z; - pbs.FlexiGravity = flex.Gravity; - pbs.FlexiSoftness = flex.Softness; - pbs.FlexiTension = flex.Tension; - pbs.FlexiWind = flex.Wind; - break; - case (ushort)ExtraParamType.Light: - Primitive.LightData light = new Primitive.LightData(extraParam.ExtraParamData, 0); - pbs.LightColorA = light.Color.A; - pbs.LightColorB = light.Color.B; - pbs.LightColorG = light.Color.G; - pbs.LightColorR = light.Color.R; - pbs.LightCutoff = light.Cutoff; - pbs.LightEntry = true; - pbs.LightFalloff = light.Falloff; - pbs.LightIntensity = light.Intensity; - pbs.LightRadius = light.Radius; - break; - case 0x40: - pbs.ReadProjectionData(extraParam.ExtraParamData, 0); - break; - } - } - - pbs.PathBegin = (ushort)obj.PathBegin; - pbs.PathCurve = (byte)obj.PathCurve; - pbs.PathEnd = (ushort)obj.PathEnd; - pbs.PathRadiusOffset = (sbyte)obj.RadiusOffset; - pbs.PathRevolutions = (byte)obj.Revolutions; - pbs.PathScaleX = (byte)obj.ScaleX; - pbs.PathScaleY = (byte)obj.ScaleY; - pbs.PathShearX = (byte)obj.ShearX; - pbs.PathShearY = (byte)obj.ShearY; - pbs.PathSkew = (sbyte)obj.Skew; - pbs.PathTaperX = (sbyte)obj.TaperX; - pbs.PathTaperY = (sbyte)obj.TaperY; - pbs.PathTwist = (sbyte)obj.Twist; - pbs.PathTwistBegin = (sbyte)obj.TwistBegin; - pbs.HollowShape = (HollowShape)obj.ProfileHollow; - pbs.PCode = (byte)PCode.Prim; - pbs.ProfileBegin = (ushort)obj.ProfileBegin; - pbs.ProfileCurve = (byte)obj.ProfileCurve; - pbs.ProfileEnd = (ushort)obj.ProfileEnd; - pbs.Scale = obj.Scale; - pbs.State = (byte)0; - SceneObjectPart prim = new SceneObjectPart(); - prim.UUID = UUID.Random(); - prim.CreatorID = AgentId; - prim.OwnerID = AgentId; - prim.GroupID = obj.GroupID; - prim.LastOwnerID = prim.OwnerID; - prim.CreationDate = Util.UnixTimeSinceEpoch(); - prim.Name = obj.Name; - prim.Description = ""; - - prim.PayPrice[0] = -2; - prim.PayPrice[1] = -2; - prim.PayPrice[2] = -2; - prim.PayPrice[3] = -2; - prim.PayPrice[4] = -2; - Primitive.TextureEntry tmp = - new Primitive.TextureEntry(UUID.Parse("89556747-24cb-43ed-920b-47caed15465f")); - - for (int j = 0; j < obj.Faces.Length; j++) - { - UploadObjectAssetMessage.Object.Face face = obj.Faces[j]; - - Primitive.TextureEntryFace primFace = tmp.CreateFace((uint)j); - - primFace.Bump = face.Bump; - primFace.RGBA = face.Color; - primFace.Fullbright = face.Fullbright; - primFace.Glow = face.Glow; - primFace.TextureID = face.ImageID; - primFace.Rotation = face.ImageRot; - primFace.MediaFlags = ((face.MediaFlags & 1) != 0); - - primFace.OffsetU = face.OffsetS; - primFace.OffsetV = face.OffsetT; - primFace.RepeatU = face.ScaleS; - primFace.RepeatV = face.ScaleT; - primFace.TexMapType = (MappingType)(face.MediaFlags & 6); - } - - pbs.TextureEntry = tmp.GetBytes(); - prim.Shape = pbs; - prim.Scale = obj.Scale; - - SceneObjectGroup grp = new SceneObjectGroup(); - - grp.SetRootPart(prim); - prim.ParentID = 0; - if (i == 0) - { - rootGroup = grp; - - } - grp.AttachToScene(m_scene); - grp.AbsolutePosition = obj.Position; - prim.RotationOffset = obj.Rotation; - - // Required for linking - grp.RootPart.ClearUpdateSchedule(); - - if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos)) - { - m_scene.AddSceneObject(grp); - grp.AbsolutePosition = obj.Position; - } - - allparts[i] = grp; - } - - for (int j = 1; j < allparts.Length; j++) - { - // Required for linking - rootGroup.RootPart.ClearUpdateSchedule(); - allparts[j].RootPart.ClearUpdateSchedule(); - rootGroup.LinkToGroup(allparts[j]); - } - - rootGroup.ScheduleGroupForFullUpdate(); - pos - = m_scene.GetNewRezLocation( - Vector3.Zero, rootpos, UUID.Zero, rot, (byte)1, 1, true, allparts[0].GroupScale, false); - - responsedata["int_response_code"] = 200; //501; //410; //404; - responsedata["content_type"] = "text/plain"; - responsedata["str_response_string"] = String.Format("local_id{0}", ConvertUintToBytes(allparts[0].LocalId)); - - return responsedata; - } - - private string ConvertUintToBytes(uint val) - { - byte[] resultbytes = Utils.UIntToBytes(val); - if (BitConverter.IsLittleEndian) - Array.Reverse(resultbytes); - return String.Format("{0}", Convert.ToBase64String(resultbytes)); - } - } -} -#endif diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index fd73371f..c614c0f6 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -526,15 +526,6 @@ public void RefreshParcelInfo(IClientAPI remote_client, bool force) // Either entering a new parcel from the side, or entering the restricted zone from above. handleAvatarChangingParcel(avatar, parcel.landData.LocalID, m_scene.RegionInfo.RegionID); } -#if false -// redundant parcel access check for the parcel we're already in, don't do group access lookups for every movement... - else if (zpos < LandChannel.BAN_LINE_SAFETY_HEIGHT) - { - ParcelPropertiesStatus reason; - if (parcel.DenyParcelAccess(avatar.UUID, out reason)) - SendNoEntryNotice(avatar,reason); - } -#endif } } } diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 40298e75..f0dae717 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2736,12 +2736,6 @@ public bool CrossPrimGroupIntoNewRegion(ulong newRegionHandle, SceneObjectGroup if (success) { -#if false - int threadId = Thread.CurrentThread.ManagedThreadId; - m_log.WarnFormat("[CROSSING]: Thread {0} region {1} now sleeping.", threadId.ToString(), RegionInfo.RegionName); - Thread.Sleep(6000); - m_log.WarnFormat("[CROSSING]: Thread {0} region {1} now resuming.", threadId.ToString(), RegionInfo.RegionName);w -#endif //separate kill step in case this object left the view of other avatars var regionInfo = SurroundingRegions.GetKnownNeighborByHandle(newRegionHandle); diff --git a/OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs b/OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs index cc5941cf..68f19dca 100644 --- a/OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs +++ b/OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs @@ -101,20 +101,5 @@ public IScriptScheduler FindScheduler(ScriptMetaData scriptMetaData) return Schedulers[scheduler]; } } - - //public Assembly[] GetCommandProviderAssemblies() - //{ - // lock (CommandProviders) - // { - // Assembly[] ass = new Assembly[CommandProviders.Count]; - // int i = 0; - // foreach (string key in CommandProviders.Keys) - // { - // ass[i] = CommandProviders[key].GetType().Assembly; - // i++; - // } - // return ass; - // } - //} } } From e2487a7464171b3e9ef01a6c681116119f9a7d25 Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Thu, 15 Oct 2015 20:24:41 -0700 Subject: [PATCH 2/6] Initialise&Serialise -> Initialize&Serialize Plus a couple of dead code excisions. --- .../AvatarRemoteCommandModule.cs | 4 +- .../ChatFilter/ChatFilterModule.cs | 2 +- .../ChatLogMessageCassandra12Backend.cs | 6 +- .../ChatLog/ChatLogMessageFileBackend.cs | 6 +- .../ChatLog/ChatLogModule.cs | 2 +- .../Guest/GuestModule.cs | 2 +- .../CloudFilesAssetClient.cs | 4 +- .../StratusAssetClient.cs | 4 +- .../StratusPlugin.cs | 6 +- .../CassandraInventoryPlugin.cs | 2 +- .../InWorldz.Phlox.Engine/EngineInterface.cs | 2 +- .../InWorldz.Phlox.Engine/LSLSystemAPI.cs | 2 +- InWorldz/InWorldz.PhysxPhysics/PhysUtil.cs | 2 +- .../ThoosaModule.cs | 4 +- .../InWorldz.RemoteAdmin/RemoteAdminPlugin.cs | 8 +- InWorldz/InWorldz.Testing/SceneHelper.cs | 2 +- .../InWorldz.VivoxVoice/VivoxVoiceModule.cs | 10 +-- .../CreateCommsManagerPlugin.cs | 78 ++++--------------- .../LoadRegions/LoadRegionsPlugin.cs | 12 +-- .../RegionModulesControllerPlugin.cs | 20 ++--- .../ScriptEngine/RegionEngineLoader.cs | 8 +- .../ScriptEngine/ScriptEnginePlugin.cs | 8 +- OpenSim/Base/IApplicationPlugin.cs | 12 +-- OpenSim/Base/OpenSim.cs | 2 +- OpenSim/Base/OpenSimBackground.cs | 2 +- OpenSim/Base/OpenSimBase.cs | 49 +++--------- OpenSim/Client/Linden/LLClientStackModule.cs | 4 +- OpenSim/Client/Linden/LLProxyLoginModule.cs | 4 +- .../Client/Linden/LLStandaloneLoginModule.cs | 4 +- OpenSim/Data/AssetDataBase.cs | 4 +- OpenSim/Data/DataPluginFactory.cs | 26 +++---- OpenSim/Data/GridDataBase.cs | 4 +- OpenSim/Data/IAssetData.cs | 10 +-- OpenSim/Data/IGridData.cs | 12 +-- OpenSim/Data/IInventoryData.cs | 12 +-- OpenSim/Data/ILogData.cs | 12 +-- OpenSim/Data/IUserData.cs | 12 +-- OpenSim/Data/MySQL/MySQLAssetData.cs | 14 ++-- OpenSim/Data/MySQL/MySQLEstateData.cs | 2 +- OpenSim/Data/MySQL/MySQLGridData.cs | 10 +-- OpenSim/Data/MySQL/MySQLLogData.cs | 6 +- OpenSim/Data/MySQL/MySQLManager.cs | 14 ++-- OpenSim/Data/MySQL/MySQLRegionData.cs | 2 +- OpenSim/Data/MySQL/MySQLUserData.cs | 10 +-- OpenSim/Data/Null/NullDataStore.cs | 2 +- OpenSim/Data/UserDataBase.cs | 4 +- .../Communications/Cache/AssetCache.cs | 16 ++-- .../Communications/Cache/WHIPAssetClient.cs | 4 +- .../Capabilities/LLSDEnvironmentSettings.cs | 2 +- .../Capabilities/LLSDHelpers.cs | 12 +-- .../Capabilities/LLSDStreamHandler.cs | 4 +- .../Osp/OspInventoryWrapperPlugin.cs | 4 +- .../Communications/UserManagerBase.cs | 2 +- OpenSim/Framework/IAssetCache.cs | 10 +-- OpenSim/Framework/IAssetServer.cs | 10 +-- OpenSim/Framework/IPlugin.cs | 26 +++---- OpenSim/Framework/PluginLoader.cs | 30 +++---- OpenSim/Framework/Remoting.cs | 2 +- .../Framework/Servers/BaseOpenSimServer.cs | 2 +- ...seHandler.cs => RestDeserializeHandler.cs} | 12 +-- .../Servers/HttpServer/RestSessionService.cs | 14 ++-- OpenSim/Grid/Framework/IGridServiceModule.cs | 4 +- .../GridServer.Modules/GridMessagingModule.cs | 4 +- .../Grid/GridServer.Modules/GridRestModule.cs | 4 +- .../GridServer.Modules/GridServerPlugin.cs | 16 ++-- .../GridServer.Modules/GridXmlRpcModule.cs | 4 +- OpenSim/Grid/GridServer/GridServerBase.cs | 2 +- OpenSim/Grid/GridServer/IGridPlugin.cs | 10 +-- .../InterMessageUserServerModule.cs | 4 +- .../MessageRegionModule.cs | 4 +- .../MessagingServer.Modules/MessageService.cs | 4 +- OpenSim/Grid/MessagingServer/Main.cs | 12 +-- .../GridInfoServiceModule.cs | 4 +- .../MessageServersConnector.cs | 4 +- .../UserServer.Modules/UserDataBaseService.cs | 4 +- .../Grid/UserServer.Modules/UserManager.cs | 4 +- .../UserServerAvatarAppearanceModule.cs | 4 +- .../UserServerFriendsModule.cs | 4 +- OpenSim/Grid/UserServer/Main.cs | 40 +++++----- .../UserServer/UserServerCommandModule.cs | 4 +- .../UserServerEventDispatchModule.cs | 4 +- .../Region/ClientStack/ClientStackManager.cs | 2 +- .../ClientStack/IClientNetworkServer.cs | 2 +- .../ClientStack/LindenUDP/LLFileTransfer.cs | 6 +- .../ClientStack/LindenUDP/LLUDPServer.cs | 2 +- .../Communications/OGS1/OGS1UserDataPlugin.cs | 4 +- .../AssetTransactionModule.cs | 10 +-- .../AssetTransaction/AssetXferUploader.cs | 4 +- .../Agent/BotManager/BotManager.cs | 4 +- .../CoreModules/Agent/IPBan/IPBanModule.cs | 4 +- .../CoreModules/Agent/SceneView/SceneView.cs | 12 +-- .../TextureDownload/TextureDownloadModule.cs | 4 +- .../Agent/TextureSender/CSJ2KDecoderModule.cs | 4 +- .../Agent/TextureSender/J2KDecoderModule.cs | 4 +- .../CoreModules/Agent/Xfer/XferModule.cs | 4 +- .../CoreModules/Asset/CoreAssetCache.cs | 4 +- .../AvatarFactory/AvatarFactoryModule.cs | 4 +- .../CoreModules/Avatar/Chat/ChatModule.cs | 4 +- .../CoreModules/Avatar/Combat/CombatModule.cs | 4 +- .../Avatar/Currency/AvatarCurrency.cs | 4 +- .../CoreModules/Avatar/Dialog/DialogModule.cs | 4 +- .../Avatar/Friends/FriendsModule.cs | 4 +- .../Avatar/Gestures/GesturesModule.cs | 4 +- .../CoreModules/Avatar/Gods/GodsModule.cs | 4 +- .../CoreModules/Avatar/Groups/GroupsModule.cs | 4 +- .../InstantMessage/InstantMessageModule.cs | 4 +- .../InstantMessage/MessageTransferModule.cs | 4 +- .../Avatar/InstantMessage/MuteListModule.cs | 4 +- .../InstantMessage/OfflineMessageModule.cs | 4 +- .../Avatar/InstantMessage/PresenceModule.cs | 6 +- .../Archiver/InventoryArchiveReadRequest.cs | 2 +- .../Archiver/InventoryArchiverModule.cs | 4 +- .../Transfer/InventoryTransferModule.cs | 4 +- .../CoreModules/Avatar/Lure/LureModule.cs | 4 +- .../Avatar/Profiles/AvatarProfilesModule.cs | 4 +- .../Avatar/Search/AvatarSearchModule.cs | 4 +- .../Capabilities/AssetCapsModule.cs | 8 +- .../Capabilities/AssortedCapsModule.cs | 2 +- .../Capabilities/CapabilitiesModule.cs | 4 +- .../EventQueue/EventQueueGetModule.cs | 4 +- .../Capabilities/GroupCapsModule.cs | 4 +- .../Capabilities/InventoryCapsModule.cs | 42 +++++----- .../Capabilities/MeshUploadFlagModule.cs | 4 +- .../Capabilities/ObjectAddModule.cs | 4 +- .../Capabilities/RegionConsoleModule.cs | 4 +- .../CoreModules/Capabilities/SeedCapModule.cs | 6 +- .../Capabilities/SimulatorFeaturesModule.cs | 4 +- OpenSim/Region/CoreModules/Plus/PlusModule.cs | 4 +- .../DynamicTexture/DynamicTextureModule.cs | 4 +- .../Scripting/EMailModules/EmailModule.cs | 4 +- .../Scripting/EMailModules/GetEmailModule.cs | 4 +- .../HttpRequest/ScriptsHttpRequests.cs | 4 +- .../Scripting/LSLHttp/UrlModule.cs | 4 +- .../LoadImageURL/LoadImageURLModule.cs | 4 +- .../VectorRender/VectorRenderModule.cs | 4 +- .../Scripting/WorldComm/WorldCommModule.cs | 10 +-- .../Scripting/XMLRPC/XMLRPCModule.cs | 4 +- .../Interregion/LocalInterregionComms.cs | 4 +- .../Interregion/RESTInterregionComms.cs | 6 +- .../User/LocalUserServiceConnector.cs | 4 +- .../User/RemoteUserServiceConnector.cs | 4 +- .../World/Archiver/ArchiveReadRequest.cs | 16 ++-- .../Archiver/ArchiveWriteRequestExecution.cs | 8 +- .../ArchiveWriteRequestPreparation.cs | 2 +- .../World/Archiver/ArchiverModule.cs | 4 +- .../CoreModules/World/Cloud/CloudModule.cs | 4 +- .../World/Environment/EnvironmentModule.cs | 6 +- .../World/Estate/EstateManagementModule.cs | 4 +- .../World/Land/LandManagementModule.cs | 10 +-- .../World/Media/Moap/MoapModule.cs | 2 +- .../World/Permissions/PermissionsModule.cs | 4 +- .../IFileSerializer.cs} | 4 +- .../SerializeObjects.cs} | 10 +-- .../SerializeTerrain.cs} | 6 +- .../SerializerModule.cs} | 50 ++++++------ .../CoreModules/World/Sound/SoundModule.cs | 4 +- .../Region/CoreModules/World/Sun/SunModule.cs | 4 +- .../World/Terrain/TerrainModule.cs | 18 ++--- .../World/Vegetation/VegetationModule.cs | 4 +- .../World/Wind/Plugins/ConfigurableWind.cs | 2 +- .../World/Wind/Plugins/SimpleRandomWind.cs | 2 +- .../World/Wind/Plugins/ZephyrWind.cs | 2 +- .../CoreModules/World/Wind/WindModule.cs | 6 +- .../World/WorldMap/IMapTileTerrainRenderer.cs | 2 +- .../World/WorldMap/MapImageModule.cs | 6 +- .../World/WorldMap/MapSearchModule.cs | 4 +- .../World/WorldMap/ShadedMapTileRenderer.cs | 2 +- .../World/WorldMap/TexturedMapTileRenderer.cs | 2 +- .../World/WorldMap/WorldMapModule.cs | 2 +- .../Framework/Interfaces/IEstateDataStore.cs | 2 +- .../Framework/Interfaces/IRegionDataStore.cs | 4 +- .../Framework/Interfaces/IRegionModule.cs | 4 +- .../Framework/Interfaces/IRegionModuleBase.cs | 6 +- ...erModule.cs => IRegionSerializerModule.cs} | 4 +- .../Region/Framework/Interfaces/ISceneView.cs | 4 +- .../Interfaces/ISharedRegionModule.cs | 4 +- OpenSim/Region/Framework/ModuleLoader.cs | 16 ++-- OpenSim/Region/Framework/Scenes/Scene.cs | 8 +- .../Region/Framework/Scenes/SceneManager.cs | 30 +++---- .../Scenes/Serialization/SceneXmlLoader.cs | 2 +- .../Region/Framework/Scenes/TerrainChannel.cs | 4 +- OpenSim/Region/Framework/StorageManager.cs | 6 +- OpenSim/Region/Interfaces/ITerrainChannel.cs | 2 +- .../Avatar/Concierge/ConciergeModule.cs | 4 +- .../Avatar/FlexiGroups/FlexiGroupsModule.cs | 4 +- .../FlexiGroups/XmlRpcGroupsMessaging.cs | 4 +- .../FriendPermissionsModule.cs | 2 +- .../FreeSwitchVoice/FreeSwitchVoiceModule.cs | 14 ++-- .../XmlRpcGroups/XmlRpcGroupsMessaging.cs | 4 +- .../Grid/Interregion/InterregionModule.cs | 20 +---- .../Grid/Interregion/RemotingObject.cs | 2 +- .../Scripting/RegionReady/RegionReady.cs | 6 +- .../XmlRpcGridRouterModule.cs | 4 +- .../XmlRpcRouterModule/XmlRpcRouterModule.cs | 4 +- .../TreePopulator/TreePopulatorModule.cs | 6 +- OpenSim/Region/ScriptEngine/Shared/Helpers.cs | 2 +- OpenSim/ScriptEngine/Shared/IScriptEngine.cs | 4 +- OpenSim/Servers/Base/HttpServerBase.cs | 2 +- OpenSim/Servers/Base/ServicesServerBase.cs | 4 +- .../Services/AssetService/AssetServiceBase.cs | 2 +- .../Services/UserService/UserServiceBase.cs | 2 +- OpenSimProfile/Modules/OpenProfile.cs | 4 +- 202 files changed, 651 insertions(+), 746 deletions(-) rename OpenSim/Framework/Servers/HttpServer/{RestDeserialiseHandler.cs => RestDeserializeHandler.cs} (87%) rename OpenSim/Region/CoreModules/World/{Serialiser/IFileSerialiser.cs => Serializer/IFileSerializer.cs} (94%) rename OpenSim/Region/CoreModules/World/{Serialiser/SerialiseObjects.cs => Serializer/SerializeObjects.cs} (94%) rename OpenSim/Region/CoreModules/World/{Serialiser/SerialiseTerrain.cs => Serializer/SerializeTerrain.cs} (93%) rename OpenSim/Region/CoreModules/World/{Serialiser/SerialiserModule.cs => Serializer/SerializerModule.cs} (82%) rename OpenSim/Region/Framework/Interfaces/{IRegionSerialiserModule.cs => IRegionSerializerModule.cs} (97%) diff --git a/InWorldz/InWorldz.ApplicationPlugins/AvatarRemoteCommandModule/AvatarRemoteCommandModule.cs b/InWorldz/InWorldz.ApplicationPlugins/AvatarRemoteCommandModule/AvatarRemoteCommandModule.cs index 62029418..5e09b897 100644 --- a/InWorldz/InWorldz.ApplicationPlugins/AvatarRemoteCommandModule/AvatarRemoteCommandModule.cs +++ b/InWorldz/InWorldz.ApplicationPlugins/AvatarRemoteCommandModule/AvatarRemoteCommandModule.cs @@ -160,7 +160,7 @@ private class LeavingRegionInfo #region INonSharedRegionModule members - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { IConfig config = source.Configs["AvatarRemoteCommands"]; if (config == null || !config.GetBoolean("Enabled", false)) @@ -169,7 +169,7 @@ public void Initialise(IConfigSource source) _enabled = true; } - public void PostInitialise() + public void PostInitialize() { } diff --git a/InWorldz/InWorldz.ApplicationPlugins/ChatFilter/ChatFilterModule.cs b/InWorldz/InWorldz.ApplicationPlugins/ChatFilter/ChatFilterModule.cs index 0d28c997..5526db45 100644 --- a/InWorldz/InWorldz.ApplicationPlugins/ChatFilter/ChatFilterModule.cs +++ b/InWorldz/InWorldz.ApplicationPlugins/ChatFilter/ChatFilterModule.cs @@ -90,7 +90,7 @@ public Type ReplaceableInterface get { return null; } } - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { IConfig config = source.Configs[Name]; if (config == null) return; diff --git a/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageCassandra12Backend.cs b/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageCassandra12Backend.cs index 1d2a4031..50933b6c 100644 --- a/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageCassandra12Backend.cs +++ b/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageCassandra12Backend.cs @@ -80,7 +80,7 @@ private static readonly log4net.ILog m_log #region IApplicationPlugin Members - public void Initialise(OpenSimBase openSim) + public void Initialize(OpenSimBase openSim) { IConfig config = openSim.ConfigSource.Source.Configs["ChatLogModule"]; if (config == null) return; @@ -125,7 +125,7 @@ private void ExtractSeedNodesFromConfig(IConfig config) } } - public void PostInitialise() + public void PostInitialize() { } @@ -139,7 +139,7 @@ public string Name get { return "InworldzChatLogMessageCassandra12Backend"; } } - public void Initialise() + public void Initialize() { } diff --git a/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageFileBackend.cs b/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageFileBackend.cs index d7b6f6bc..0b28e642 100644 --- a/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageFileBackend.cs +++ b/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageFileBackend.cs @@ -65,7 +65,7 @@ public class InworldzChatLogMessageFileBackend : IApplicationPlugin, IChatMessag #region IApplicationPlugin Members - public void Initialise(OpenSimBase openSim) + public void Initialize(OpenSimBase openSim) { IConfig config = openSim.ConfigSource.Source.Configs["ChatLogModule"]; if (config == null) return; @@ -80,7 +80,7 @@ public void Initialise(OpenSimBase openSim) } } - public void PostInitialise() + public void PostInitialize() { } @@ -94,7 +94,7 @@ public string Name get { return "InworldzChatLogMessageFileBackend"; } } - public void Initialise() + public void Initialize() { } diff --git a/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogModule.cs b/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogModule.cs index 9beae0e3..a560d16f 100644 --- a/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogModule.cs +++ b/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogModule.cs @@ -72,7 +72,7 @@ public Type ReplaceableInterface get { return null; } } - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { IConfig config = source.Configs[Name]; if (config == null) return; diff --git a/InWorldz/InWorldz.ApplicationPlugins/Guest/GuestModule.cs b/InWorldz/InWorldz.ApplicationPlugins/Guest/GuestModule.cs index 48e7b4d5..9fa3942b 100644 --- a/InWorldz/InWorldz.ApplicationPlugins/Guest/GuestModule.cs +++ b/InWorldz/InWorldz.ApplicationPlugins/Guest/GuestModule.cs @@ -79,7 +79,7 @@ public Type ReplaceableInterface get { return null; } } - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { IConfig config = source.Configs[Name]; if (config == null) return; diff --git a/InWorldz/InWorldz.Data.Assets.Stratus/CloudFilesAssetClient.cs b/InWorldz/InWorldz.Data.Assets.Stratus/CloudFilesAssetClient.cs index 63070db4..a9c8fc79 100644 --- a/InWorldz/InWorldz.Data.Assets.Stratus/CloudFilesAssetClient.cs +++ b/InWorldz/InWorldz.Data.Assets.Stratus/CloudFilesAssetClient.cs @@ -119,7 +119,7 @@ internal Cache.DiskWriteBackCache DiskWriteBackCache - public void Initialise(ConfigSettings settings) + public void Initialize(ConfigSettings settings) { //if this is being called, we were loaded as a plugin instead of the StratusAssetClient //we shouldnt be loaded like this, throw. @@ -602,7 +602,7 @@ public string Name get { return "InWorldz.Data.Assets.Stratus.CloudFilesAssetClient"; } } - public void Initialise() + public void Initialize() { } diff --git a/InWorldz/InWorldz.Data.Assets.Stratus/StratusAssetClient.cs b/InWorldz/InWorldz.Data.Assets.Stratus/StratusAssetClient.cs index fc51c12a..092c2755 100644 --- a/InWorldz/InWorldz.Data.Assets.Stratus/StratusAssetClient.cs +++ b/InWorldz/InWorldz.Data.Assets.Stratus/StratusAssetClient.cs @@ -70,7 +70,7 @@ public class StratusAssetClient : IAssetServer, IAssetReceiver private IAssetReceiver _assetReceiver; - public void Initialise(ConfigSettings settings) + public void Initialize(ConfigSettings settings) { IConfig stratusConfig = settings.SettingsFile["InWorldz.Data.Assets.Stratus"]; if (stratusConfig != null && stratusConfig.GetBoolean("enabled", true)) @@ -264,7 +264,7 @@ public string Name get { return "InWorldz.Data.Assets.Stratus.StratusAssetClient"; } } - public void Initialise() + public void Initialize() { } diff --git a/InWorldz/InWorldz.Data.Assets.Stratus/StratusPlugin.cs b/InWorldz/InWorldz.Data.Assets.Stratus/StratusPlugin.cs index 493ca158..24795ae3 100644 --- a/InWorldz/InWorldz.Data.Assets.Stratus/StratusPlugin.cs +++ b/InWorldz/InWorldz.Data.Assets.Stratus/StratusPlugin.cs @@ -38,11 +38,11 @@ namespace InWorldz.Data.Assets.Stratus { public class StratusPlugin : IApplicationPlugin { - public void Initialise(OpenSimBase openSim) + public void Initialize(OpenSimBase openSim) { } - public void PostInitialise() + public void PostInitialize() { } @@ -56,7 +56,7 @@ public string Name get { return "StratusPlugin"; } } - public void Initialise() + public void Initialize() { } diff --git a/InWorldz/InWorldz.Data.Inventory.Cassandra/CassandraInventoryPlugin.cs b/InWorldz/InWorldz.Data.Inventory.Cassandra/CassandraInventoryPlugin.cs index b4be6293..95d3ae8b 100644 --- a/InWorldz/InWorldz.Data.Inventory.Cassandra/CassandraInventoryPlugin.cs +++ b/InWorldz/InWorldz.Data.Inventory.Cassandra/CassandraInventoryPlugin.cs @@ -88,7 +88,7 @@ public string Name get { return "InWorldz.Data.Inventory.Cassandra"; } } - public void Initialise() + public void Initialize() { } diff --git a/InWorldz/InWorldz.Phlox.Engine/EngineInterface.cs b/InWorldz/InWorldz.Phlox.Engine/EngineInterface.cs index 1254b120..f2eca778 100644 --- a/InWorldz/InWorldz.Phlox.Engine/EngineInterface.cs +++ b/InWorldz/InWorldz.Phlox.Engine/EngineInterface.cs @@ -89,7 +89,7 @@ public Type ReplaceableInterface get { return null; } } - public void Initialise(Nini.Config.IConfigSource source) + public void Initialize(Nini.Config.IConfigSource source) { _configSource = source; diff --git a/InWorldz/InWorldz.Phlox.Engine/LSLSystemAPI.cs b/InWorldz/InWorldz.Phlox.Engine/LSLSystemAPI.cs index ffb2c2ff..60a98142 100644 --- a/InWorldz/InWorldz.Phlox.Engine/LSLSystemAPI.cs +++ b/InWorldz/InWorldz.Phlox.Engine/LSLSystemAPI.cs @@ -6085,7 +6085,7 @@ public LSL_Vector llRot2Axis(LSL_Rotation rot) } else { - x = rot.X / s; // normalise axis + x = rot.X / s; // normalize axis y = rot.Y / s; z = rot.Z / s; } diff --git a/InWorldz/InWorldz.PhysxPhysics/PhysUtil.cs b/InWorldz/InWorldz.PhysxPhysics/PhysUtil.cs index c183eb80..effa6f1c 100644 --- a/InWorldz/InWorldz.PhysxPhysics/PhysUtil.cs +++ b/InWorldz/InWorldz.PhysxPhysics/PhysUtil.cs @@ -247,7 +247,7 @@ public static OpenMetaverse.Vector3 Rot2Axis(OpenMetaverse.Quaternion rot) } else { - x = rot.X / s; // normalise axis + x = rot.X / s; // normalize axis y = rot.Y / s; z = rot.Z / s; } diff --git a/InWorldz/InWorldz.Region.Data.Thoosa/ThoosaModule.cs b/InWorldz/InWorldz.Region.Data.Thoosa/ThoosaModule.cs index 9fb595f8..454a7ef3 100644 --- a/InWorldz/InWorldz.Region.Data.Thoosa/ThoosaModule.cs +++ b/InWorldz/InWorldz.Region.Data.Thoosa/ThoosaModule.cs @@ -44,7 +44,7 @@ private static readonly log4net.ILog m_log private Engines.SerializationEngine _engine; - public void PostInitialise() + public void PostInitialize() { } @@ -58,7 +58,7 @@ public System.Type ReplaceableInterface get { return null; } } - public void Initialise(Nini.Config.IConfigSource source) + public void Initialize(Nini.Config.IConfigSource source) { var cfg = source.Configs["InWorldz.Thoosa"]; if (cfg == null || cfg.GetBoolean("enable_serialization_engine", true)) diff --git a/InWorldz/InWorldz.RemoteAdmin/RemoteAdminPlugin.cs b/InWorldz/InWorldz.RemoteAdmin/RemoteAdminPlugin.cs index 9bb2bfa7..983ad874 100644 --- a/InWorldz/InWorldz.RemoteAdmin/RemoteAdminPlugin.cs +++ b/InWorldz/InWorldz.RemoteAdmin/RemoteAdminPlugin.cs @@ -81,19 +81,19 @@ public string Name get { return m_name; } } - public void Initialise() + public void Initialize() { m_log.Info("[RADMIN]: " + Name + " cannot be default-initialized!"); - throw new PluginNotInitialisedException(Name); + throw new PluginNotInitializedException(Name); } - public void Initialise(OpenSimBase openSim) + public void Initialize(OpenSimBase openSim) { m_app = openSim; m_admin = new RemoteAdmin(); } - public void PostInitialise() + public void PostInitialize() { m_admin.AddCommand("Region", "Restart", RegionRestartHandler); m_admin.AddCommand("Region", "SendAlert", RegionSendAlertHandler); diff --git a/InWorldz/InWorldz.Testing/SceneHelper.cs b/InWorldz/InWorldz.Testing/SceneHelper.cs index b1d542ee..0e68b209 100644 --- a/InWorldz/InWorldz.Testing/SceneHelper.cs +++ b/InWorldz/InWorldz.Testing/SceneHelper.cs @@ -57,7 +57,7 @@ public static Scene CreateScene(ushort httpPort, uint xloc, uint yloc) gridSvc.UnitTest_SetCommsOut(restComms); Scene scene = new Scene(regionInfo, commsManager, gridSvc); - restComms.Initialise_Unittest(scene); + restComms.Initialize_Unittest(scene); server.Start(); diff --git a/InWorldz/InWorldz.VivoxVoice/VivoxVoiceModule.cs b/InWorldz/InWorldz.VivoxVoice/VivoxVoiceModule.cs index 89493135..8248f1bb 100644 --- a/InWorldz/InWorldz.VivoxVoice/VivoxVoiceModule.cs +++ b/InWorldz/InWorldz.VivoxVoice/VivoxVoiceModule.cs @@ -118,7 +118,7 @@ public class VivoxVoiceModule : ISharedRegionModule private static readonly string EMPTY_RESPONSE = ""; - public void Initialise(IConfigSource config) + public void Initialize(IConfigSource config) { m_config = config.Configs["VivoxVoice"]; @@ -374,7 +374,7 @@ public void RemoveRegion(Scene scene) } } - public void PostInitialise() + public void PostInitialize() { // Do nothing. } @@ -416,7 +416,7 @@ public bool IsSharedModule // // Note that OnRegisterCaps is called here via a closure // delegate containing the scene of the respective region (see - // Initialise()). + // Initialize()). // public void OnRegisterCaps(Scene scene, UUID agentID, Caps caps) { @@ -598,7 +598,7 @@ public string ProvisionVoiceAccountRequest(Scene scene, string request, string p LLSDVoiceAccountResponse voiceAccountResponse = new LLSDVoiceAccountResponse(agentname, password, m_vivoxSipUri, m_vivoxVoiceAccountApi); - string r = LLSDHelpers.SerialiseLLSDReply(voiceAccountResponse); + string r = LLSDHelpers.SerializeLLSDReply(voiceAccountResponse); m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: avatar \"{0}\": {1}", avatarName, r); @@ -693,7 +693,7 @@ public string ParcelVoiceInfoRequest(Scene scene, string request, string path, s creds["channel_uri"] = channel_uri; parcelVoiceInfo = new LLSDParcelVoiceInfoResponse(scene.RegionInfo.RegionName, land.LocalID, creds); - string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo); + string r = LLSDHelpers.SerializeLLSDReply(parcelVoiceInfo); // m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}", // scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, r); diff --git a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs index 7a57bd8c..e957441b 100644 --- a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs +++ b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs @@ -73,18 +73,18 @@ public string Name protected IRegionCreator m_regionCreator; - public void Initialise() + public void Initialize() { m_log.Info("[LOADREGIONS]: " + Name + " cannot be default-initialized!"); - throw new PluginNotInitialisedException(Name); + throw new PluginNotInitializedException(Name); } - public void Initialise(OpenSimBase openSim) + public void Initialize(OpenSimBase openSim) { m_openSim = openSim; m_httpServer = openSim.HttpServer; - InitialiseCommsManager(openSim); + InitializeCommsManager(openSim); if (m_commsManager != null) { m_openSim.ApplicationRegistry.RegisterInterface(m_commsManager.UserService); @@ -93,7 +93,7 @@ public void Initialise(OpenSimBase openSim) } - public void PostInitialise() + public void PostInitialize() { if (m_openSim.ApplicationRegistry.TryGet(out m_regionCreator)) { @@ -115,51 +115,34 @@ private void RegionCreated(IScene scene) } } - protected void InitialiseCommsManager(OpenSimBase openSim) + protected void InitializeCommsManager(OpenSimBase openSim) { LibraryRootFolder libraryRootFolder = new LibraryRootFolder(m_openSim.ConfigurationSettings.LibrariesXMLFile); - InitialiseStandardServices(libraryRootFolder); + InitializeStandardServices(libraryRootFolder); openSim.CommunicationsManager = m_commsManager; } - /* - protected void InitialiseHGServices(OpenSimBase openSim, LibraryRootFolder libraryRootFolder) + protected void InitializeStandardServices(LibraryRootFolder libraryRootFolder) { // Standalone mode is determined by !startupConfig.GetBoolean("gridmode", false) if (m_openSim.ConfigurationSettings.Standalone) { - InitialiseHGStandaloneServices(libraryRootFolder); + InitializeStandaloneServices(libraryRootFolder); } else { // We are in grid mode - InitialiseHGGridServices(libraryRootFolder); - } - HGCommands.HGServices = HGServices; - } - */ - - protected void InitialiseStandardServices(LibraryRootFolder libraryRootFolder) - { - // Standalone mode is determined by !startupConfig.GetBoolean("gridmode", false) - if (m_openSim.ConfigurationSettings.Standalone) - { - InitialiseStandaloneServices(libraryRootFolder); - } - else - { - // We are in grid mode - InitialiseGridServices(libraryRootFolder); + InitializeGridServices(libraryRootFolder); } } /// - /// Initialises the backend services for standalone mode, and registers some http handlers + /// Initializes the backend services for standalone mode, and registers some http handlers /// /// - protected virtual void InitialiseStandaloneServices(LibraryRootFolder libraryRootFolder) + protected virtual void InitializeStandaloneServices(LibraryRootFolder libraryRootFolder) { m_commsManager = new CommunicationsLocal( @@ -169,7 +152,7 @@ protected virtual void InitialiseStandaloneServices(LibraryRootFolder libraryRoo CreateGridInfoService(); } - protected virtual void InitialiseGridServices(LibraryRootFolder libraryRootFolder) + protected virtual void InitializeGridServices(LibraryRootFolder libraryRootFolder) { m_commsManager = new CommunicationsOGS1(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, libraryRootFolder, @@ -181,41 +164,6 @@ protected virtual void InitialiseGridServices(LibraryRootFolder libraryRootFolde m_httpServer.AddStreamHandler(new OpenSim.UXSimStatusHandler(m_openSim)); } - /* - protected virtual void InitialiseHGStandaloneServices(LibraryRootFolder libraryRootFolder) - { - HGGridServicesStandalone gridService - = new HGGridServicesStandalone( - m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, m_openSim.SceneManager); - - m_commsManager - = new HGCommunicationsStandalone( - m_openSim.ConfigurationSettings, m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, - gridService, - libraryRootFolder, m_openSim.ConfigurationSettings.DumpAssetsToFile); - - HGServices = gridService; - - CreateGridInfoService(); - } - - - protected virtual void InitialiseHGGridServices(LibraryRootFolder libraryRootFolder) - { - m_commsManager - = new HGCommunicationsGridMode( - m_openSim.NetServersInfo, m_httpServer, - m_openSim.AssetCache, m_openSim.SceneManager, libraryRootFolder); - - HGServices = ((HGCommunicationsGridMode) m_commsManager).HGServices; - - m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler()); - m_httpServer.AddStreamHandler(new OpenSim.XSimStatusHandler(m_openSim)); - if (m_openSim.userStatsURI != String.Empty ) - m_httpServer.AddStreamHandler(new OpenSim.UXSimStatusHandler(m_openSim)); - } - */ - private void CreateGridInfoService() { // provide grid info diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index fc1f1f4d..3b4f6127 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs @@ -66,21 +66,21 @@ public string Name protected OpenSimBase m_openSim; - public void Initialise() + public void Initialize() { m_log.Error("[LOADREGIONS]: " + Name + " cannot be default-initialized!"); - throw new PluginNotInitialisedException(Name); + throw new PluginNotInitializedException(Name); } - public void Initialise(OpenSimBase openSim) + public void Initialize(OpenSimBase openSim) { m_openSim = openSim; m_openSim.ApplicationRegistry.RegisterInterface(this); } - public void PostInitialise() + public void PostInitialize() { - //m_log.Info("[LOADREGIONS]: Load Regions addin being initialised"); + //m_log.Info("[LOADREGIONS]: Load Regions addin being initialized"); IRegionLoader regionLoader; if (m_openSim.ConfigSource.Source.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") @@ -128,7 +128,7 @@ public void PostInitialise() } } - m_openSim.ModuleLoader.PostInitialise(); + m_openSim.ModuleLoader.PostInitialize(); m_openSim.ModuleLoader.ClearCache(); foreach (var region in loadedRegions) diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs index 60a70f59..7eb1d9e9 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs @@ -63,7 +63,7 @@ public class RegionModulesControllerPlugin : IRegionModulesController, #region IApplicationPlugin implementation - public void Initialise (OpenSimBase openSim) + public void Initialize (OpenSimBase openSim) { m_openSim = openSim; m_openSim.ApplicationRegistry.RegisterInterface(this); @@ -153,18 +153,18 @@ public void Initialise (OpenSimBase openSim) // OK, we're up and running m_sharedInstances.Add(module); - module.Initialise(m_openSim.ConfigSource.Source); + module.Initialize(m_openSim.ConfigSource.Source); } } - public void PostInitialise () + public void PostInitialize() { m_log.DebugFormat("[REGIONMODULES]: PostInitializing..."); - // Immediately run PostInitialise on shared modules + // Immediately run PostInitialize on shared modules foreach (ISharedRegionModule module in m_sharedInstances) { - module.PostInitialise(); + module.PostInitialize(); } } @@ -174,7 +174,7 @@ public void PostInitialise () // We don't do that here // - public void Initialise () + public void Initialize () { throw new System.NotImplementedException(); } @@ -365,15 +365,15 @@ public void AddRegionToModules (Scene scene) m_log.DebugFormat("[REGIONMODULE]: Adding scene {0} to non-shared module {1}", scene.RegionInfo.RegionName, module.Name); - // Initialise the module - module.Initialise(m_openSim.ConfigSource.Source); + // Initialize the module + module.Initialize(m_openSim.ConfigSource.Source); list.Add(module); } // Now add the modules that we found to the scene. If a module // wishes to override a replaceable interface, it needs to - // register it in Initialise, so that the deferred module + // register it in Initialize, so that the deferred module // won't load. foreach (INonSharedRegionModule module in list) { @@ -428,7 +428,7 @@ public void AddRegionToModules (Scene scene) m_log.DebugFormat("[REGIONMODULE]: Adding scene {0} to non-shared module {1} (deferred)", scene.RegionInfo.RegionName, module.Name); - module.Initialise(m_openSim.ConfigSource.Source); + module.Initialize(m_openSim.ConfigSource.Source); list.Add(module); deferredlist.Add(module); diff --git a/OpenSim/ApplicationPlugins/ScriptEngine/RegionEngineLoader.cs b/OpenSim/ApplicationPlugins/ScriptEngine/RegionEngineLoader.cs index a94eb586..27c81ac1 100644 --- a/OpenSim/ApplicationPlugins/ScriptEngine/RegionEngineLoader.cs +++ b/OpenSim/ApplicationPlugins/ScriptEngine/RegionEngineLoader.cs @@ -47,7 +47,7 @@ public class RegionEngineLoader : IRegionModule public IScriptEngine scriptEngine; public IConfigSource ConfigSource; public IConfig ScriptConfigSource; - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { // New region is being created // Create a new script engine @@ -66,7 +66,7 @@ public void Initialise(Scene scene, IConfigSource source) { LoadEngine(); if (scriptEngine != null) - scriptEngine.Initialise(scene, source); + scriptEngine.Initialize(scene, source); } } catch (NullReferenceException) @@ -74,10 +74,10 @@ public void Initialise(Scene scene, IConfigSource source) } } - public void PostInitialise() + public void PostInitialize() { if (scriptEngine != null) - scriptEngine.PostInitialise(); + scriptEngine.PostInitialize(); } public void Close() diff --git a/OpenSim/ApplicationPlugins/ScriptEngine/ScriptEnginePlugin.cs b/OpenSim/ApplicationPlugins/ScriptEngine/ScriptEnginePlugin.cs index 9270514d..aab0d2c9 100644 --- a/OpenSim/ApplicationPlugins/ScriptEngine/ScriptEnginePlugin.cs +++ b/OpenSim/ApplicationPlugins/ScriptEngine/ScriptEnginePlugin.cs @@ -55,7 +55,7 @@ public ScriptEnginePlugin() ComponentFactory.Load(".", "OpenSim.ScriptEngine.*.dll"); } - public void Initialise(OpenSimBase openSim) + public void Initialize(OpenSimBase openSim) { // Our objective: Load component .dll's @@ -63,7 +63,7 @@ public void Initialise(OpenSimBase openSim) //m_OpenSim.Shutdown(); } - public void PostInitialise() + public void PostInitialize() { } @@ -88,9 +88,9 @@ public string Name } /// - /// Default-initialises the plugin + /// Default-initializes the plugin /// - public void Initialise() { } + public void Initialize() { } /// ///Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. diff --git a/OpenSim/Base/IApplicationPlugin.cs b/OpenSim/Base/IApplicationPlugin.cs index e445e51a..0e0304a0 100644 --- a/OpenSim/Base/IApplicationPlugin.cs +++ b/OpenSim/Base/IApplicationPlugin.cs @@ -38,28 +38,28 @@ public interface IApplicationPlugin : IPlugin /// Initialize the Plugin /// /// The Application instance - void Initialise(OpenSimBase openSim); + void Initialize(OpenSimBase openSim); /// /// Called when the application loading is completed /// - void PostInitialise(); + void PostInitialize(); } - public class ApplicationPluginInitialiser : PluginInitialiserBase + public class ApplicationPluginInitializer : PluginInitializerBase { private OpenSimBase server; - public ApplicationPluginInitialiser(OpenSimBase s) + public ApplicationPluginInitializer(OpenSimBase s) { server = s; } - public override void Initialise(IPlugin plugin) + public override void Initialize(IPlugin plugin) { IApplicationPlugin p = plugin as IApplicationPlugin; - p.Initialise(server); + p.Initialize(server); } } } diff --git a/OpenSim/Base/OpenSim.cs b/OpenSim/Base/OpenSim.cs index 9ae58095..48c1ef88 100644 --- a/OpenSim/Base/OpenSim.cs +++ b/OpenSim/Base/OpenSim.cs @@ -120,7 +120,7 @@ protected override void ReadExtraConfigSettings() } /// - /// Performs initialisation of the scene, such as loading configuration from disk. + /// Performs initialization of the scene, such as loading configuration from disk. /// protected override void StartupSpecific() { diff --git a/OpenSim/Base/OpenSimBackground.cs b/OpenSim/Base/OpenSimBackground.cs index 264af00a..191fd53b 100644 --- a/OpenSim/Base/OpenSimBackground.cs +++ b/OpenSim/Base/OpenSimBackground.cs @@ -46,7 +46,7 @@ public OpenSimBackground(IConfigSource configSource) : base(configSource) } /// - /// Performs initialisation of the scene, such as loading configuration from disk. + /// Performs initialization of the scene, such as loading configuration from disk. /// public override void Startup() { diff --git a/OpenSim/Base/OpenSimBase.cs b/OpenSim/Base/OpenSimBase.cs index 79f15473..b500d17b 100644 --- a/OpenSim/Base/OpenSimBase.cs +++ b/OpenSim/Base/OpenSimBase.cs @@ -165,7 +165,7 @@ protected virtual void ReadExtraConfigSettings() protected virtual void LoadPlugins() { PluginLoader loader = - new PluginLoader(new ApplicationPluginInitialiser(this)); + new PluginLoader(new ApplicationPluginInitializer(this)); loader.Load("/OpenSim/Startup"); m_plugins = loader.Plugins; @@ -208,7 +208,7 @@ protected override void StartupSpecific() LoadPlugins(); foreach (IApplicationPlugin plugin in m_plugins) { - plugin.PostInitialise(); + plugin.PostInitialize(); } // Only enable logins to the regions once we have completely finished starting up (apart from scripts) @@ -283,11 +283,11 @@ protected override void Initialize() // Called from base.StartUp() m_httpServerPort = m_networkServersInfo.HttpListenerPort; - InitialiseAssetCache(); + InitializeAssetCache(); } /// - /// Initialises the asset cache. This supports legacy configuration values + /// Initializes the asset cache. This supports legacy configuration values /// to ensure consistent operation, but values outside of that namespace /// are handled by the more generic resolution mechanism provided by /// the ResolveAssetServer virtual method. If extended resolution fails, @@ -297,7 +297,7 @@ protected override void Initialize() /// returns an IAssetCache implementation, if possible. This is a virtual /// method. /// - protected virtual void InitialiseAssetCache() + protected virtual void InitializeAssetCache() { IAssetServer assetServer = null; string mode = m_configSettings.AssetStorage; @@ -307,7 +307,7 @@ protected virtual void InitialiseAssetCache() throw new Exception("No asset server specified"); } - AssetClientPluginInitialiser linit = new AssetClientPluginInitialiser(m_configSettings); + AssetClientPluginInitializer linit = new AssetClientPluginInitializer(m_configSettings); //todo: hack to handle transition from whip if (mode.ToUpper() == "WHIP") mode = mode.ToUpper(); @@ -327,9 +327,9 @@ protected virtual void InitialiseAssetCache() } // This method loads the identified asset server, passing an approrpiately - // initialized Initialise wrapper. There should to be exactly one match, + // initialized Initialize wrapper. There should to be exactly one match, // if not, then the first match is used. - private IAssetServer loadAssetServer(string id, PluginInitialiserBase pi) + private IAssetServer loadAssetServer(string id, PluginInitializerBase pi) { if (id != null && id != String.Empty) { @@ -367,33 +367,6 @@ private IAssetServer loadAssetServer(string id, PluginInitialiserBase pi) /// protected virtual IAssetCache ResolveAssetCache(IAssetServer assetServer) { - /*IAssetCache assetCache = null; - if (m_configSettings.AssetCache != null && m_configSettings.AssetCache != String.Empty) - { - m_log.DebugFormat("[OPENSIMBASE]: Attempting to load asset cache id = {0}", m_configSettings.AssetCache); - - try - { - PluginInitialiserBase init = new AssetCachePluginInitialiser(m_configSettings, assetServer); - PluginLoader loader = new PluginLoader(init); - loader.AddFilter(PLUGIN_ASSET_CACHE, new PluginProviderFilter(m_configSettings.AssetCache)); - - loader.Load(PLUGIN_ASSET_CACHE); - if (loader.Plugins.Count > 0) - assetCache = (IAssetCache) loader.Plugins[0]; - } - catch (Exception e) - { - m_log.Error("[OPENSIMBASE]: ResolveAssetCache failed"); - m_log.Error(e); - } - } - - // If everything else fails, we force load the built-in asset cache - return (IAssetCache) ((assetCache != null) ? assetCache - : new Framework.Communications.Cache.AssetCache(assetServer)); - */ - return new Framework.Communications.Cache.AssetCache(assetServer); } @@ -462,7 +435,7 @@ private IClientNetworkServer CreateRegion(RegionInfo regionInfo, bool portadd_fl // This needs to be ahead of the script engine load, so the // script module can pick up events exposed by a module - m_moduleLoader.InitialiseSharedModules(scene); + m_moduleLoader.InitializeSharedModules(scene); // Use this in the future, the line above will be deprecated soon m_log.Info("[MODULES]: Loading Region's modules (new style)"); @@ -519,7 +492,7 @@ private IClientNetworkServer CreateRegion(RegionInfo regionInfo, bool portadd_fl { foreach (IRegionModule module in modules) { - module.PostInitialise(); + module.PostInitialize(); } } @@ -656,7 +629,7 @@ protected Scene SetupScene( scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName, scene.RegionInfo.RegionID); scene.PhysicsScene.TerrainChannel = scene.Heightmap; scene.PhysicsScene.RegionSettings = scene.RegionInfo.RegionSettings; - scene.PhysicsScene.SetStartupTerrain(scene.Heightmap.GetFloatsSerialised(), scene.Heightmap.RevisionNumber); + scene.PhysicsScene.SetStartupTerrain(scene.Heightmap.GetFloatsSerialized(), scene.Heightmap.RevisionNumber); scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight); return scene; diff --git a/OpenSim/Client/Linden/LLClientStackModule.cs b/OpenSim/Client/Linden/LLClientStackModule.cs index 79bd5cee..1957b812 100644 --- a/OpenSim/Client/Linden/LLClientStackModule.cs +++ b/OpenSim/Client/Linden/LLClientStackModule.cs @@ -55,7 +55,7 @@ public class LLClientStackModule : IRegionModule protected string m_clientStackDll = "OpenSim.Region.ClientStack.LindenUDP.dll"; - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { if (m_scene == null) { @@ -70,7 +70,7 @@ public void Initialise(Scene scene, IConfigSource source) } } - public void PostInitialise() + public void PostInitialize() { if ((m_scene != null) && (m_createClientStack)) { diff --git a/OpenSim/Client/Linden/LLProxyLoginModule.cs b/OpenSim/Client/Linden/LLProxyLoginModule.cs index 38fd3a9e..9847fc5a 100644 --- a/OpenSim/Client/Linden/LLProxyLoginModule.cs +++ b/OpenSim/Client/Linden/LLProxyLoginModule.cs @@ -75,7 +75,7 @@ protected bool RegionLoginsEnabled #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { if (m_firstScene == null) { @@ -110,7 +110,7 @@ public void Initialise(Scene scene, IConfigSource source) } } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs index 71bec5ba..5ec79a63 100644 --- a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs +++ b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs @@ -73,7 +73,7 @@ public bool RegionLoginsEnabled #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { if (m_firstScene == null) { @@ -122,7 +122,7 @@ LibraryRootFolder rootFolder } } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Data/AssetDataBase.cs b/OpenSim/Data/AssetDataBase.cs index df7ea213..0ad862ad 100644 --- a/OpenSim/Data/AssetDataBase.cs +++ b/OpenSim/Data/AssetDataBase.cs @@ -51,8 +51,8 @@ public virtual AssetBase FetchAsset(UUID uuid) public abstract string Version { get; } public abstract string Name { get; } - public abstract void Initialise(string connect); - public abstract void Initialise(); + public abstract void Initialize(string connect); + public abstract void Initialize(); public abstract void Dispose(); } } diff --git a/OpenSim/Data/DataPluginFactory.cs b/OpenSim/Data/DataPluginFactory.cs index 52d77a65..e6cd1484 100644 --- a/OpenSim/Data/DataPluginFactory.cs +++ b/OpenSim/Data/DataPluginFactory.cs @@ -39,16 +39,16 @@ public static class DataPluginFactory { /// /// Based on , returns the appropriate - /// PluginInitialiserBase instance in and + /// PluginInitializerBase instance in and /// extension point path in . /// /// /// The DB connection string used when creating a new - /// PluginInitialiserBase, returned in . + /// PluginInitializerBase, returned in . /// /// - /// A reference to a PluginInitialiserBase object in which the proper - /// initialiser will be returned. + /// A reference to a PluginInitializerBase object in which the proper + /// initializer will be returned. /// /// /// A string in which the proper extension point path will be returned. @@ -60,33 +60,33 @@ public static class DataPluginFactory /// Thrown if is not one of the expected data /// interfaces. /// - private static void PluginLoaderParamFactory(string connect, out PluginInitialiserBase init, out string path) where T : IPlugin + private static void PluginLoaderParamFactory(string connect, out PluginInitializerBase init, out string path) where T : IPlugin { Type type = typeof(T); if (type == typeof(IInventoryDataPlugin)) { - init = new InventoryDataInitialiser(connect); + init = new InventoryDataInitializer(connect); path = "/OpenSim/InventoryData"; } else if (type == typeof(IUserDataPlugin)) { - init = new UserDataInitialiser(connect); + init = new UserDataInitializer(connect); path = "/OpenSim/UserData"; } else if (type == typeof(IGridDataPlugin)) { - init = new GridDataInitialiser(connect); + init = new GridDataInitializer(connect); path = "/OpenSim/GridData"; } else if (type == typeof(ILogDataPlugin)) { - init = new LogDataInitialiser(connect); + init = new LogDataInitializer(connect); path = "/OpenSim/LogData"; } else if (type == typeof(IAssetDataPlugin)) { - init = new AssetDataInitialiser(connect); + init = new AssetDataInitializer(connect); path = "/OpenSim/AssetData"; } else @@ -114,12 +114,12 @@ private static void PluginLoaderParamFactory(string connect, out PluginInitia /// public static List LoadDataPlugins(string provider, string connect) where T : IPlugin { - PluginInitialiserBase pluginInitialiser; + PluginInitializerBase pluginInitializer; string extensionPointPath; - PluginLoaderParamFactory(connect, out pluginInitialiser, out extensionPointPath); + PluginLoaderParamFactory(connect, out pluginInitializer, out extensionPointPath); - PluginLoader loader = new PluginLoader(pluginInitialiser); + PluginLoader loader = new PluginLoader(pluginInitializer); // loader will try to load all providers (MySQL, MSSQL, etc) // unless it is constrainted to the correct "Provider" entry in the addin.xml diff --git a/OpenSim/Data/GridDataBase.cs b/OpenSim/Data/GridDataBase.cs index c8d0211c..f475ba79 100644 --- a/OpenSim/Data/GridDataBase.cs +++ b/OpenSim/Data/GridDataBase.cs @@ -43,8 +43,8 @@ public abstract class GridDataBase : IGridDataPlugin public abstract DataResponse UpdateProfile(RegionProfileData profile); public abstract DataResponse DeleteProfile(string uuid); - public abstract void Initialise(); - public abstract void Initialise(string connect); + public abstract void Initialize(); + public abstract void Initialize(string connect); public abstract void Dispose(); public abstract string Name { get; } diff --git a/OpenSim/Data/IAssetData.cs b/OpenSim/Data/IAssetData.cs index f7679a52..1bb884d0 100644 --- a/OpenSim/Data/IAssetData.cs +++ b/OpenSim/Data/IAssetData.cs @@ -38,17 +38,17 @@ public interface IAssetDataPlugin : IPlugin void UpdateAsset(AssetBase asset); bool ExistsAsset(UUID uuid); List FetchAssetMetadataSet(int start, int count); - void Initialise(string connect); + void Initialize(string connect); } - public class AssetDataInitialiser : PluginInitialiserBase + public class AssetDataInitializer : PluginInitializerBase { private string connect; - public AssetDataInitialiser (string s) { connect = s; } - public override void Initialise (IPlugin plugin) + public AssetDataInitializer (string s) { connect = s; } + public override void Initialize (IPlugin plugin) { IAssetDataPlugin p = plugin as IAssetDataPlugin; - p.Initialise (connect); + p.Initialize (connect); } } } diff --git a/OpenSim/Data/IGridData.cs b/OpenSim/Data/IGridData.cs index 19801ccf..73c0598a 100644 --- a/OpenSim/Data/IGridData.cs +++ b/OpenSim/Data/IGridData.cs @@ -45,9 +45,9 @@ public enum DataResponse public interface IGridDataPlugin : IPlugin { /// - /// Initialises the interface + /// Initializes the interface /// - void Initialise(string connect); + void Initialize(string connect); /// /// Returns a sim profile from a regionHandle @@ -128,14 +128,14 @@ public interface IGridDataPlugin : IPlugin ReservationData GetReservationAtPoint(uint x, uint y); } - public class GridDataInitialiser : PluginInitialiserBase + public class GridDataInitializer : PluginInitializerBase { private string connect; - public GridDataInitialiser (string s) { connect = s; } - public override void Initialise (IPlugin plugin) + public GridDataInitializer (string s) { connect = s; } + public override void Initialize (IPlugin plugin) { IGridDataPlugin p = plugin as IGridDataPlugin; - p.Initialise (connect); + p.Initialize (connect); } } } diff --git a/OpenSim/Data/IInventoryData.cs b/OpenSim/Data/IInventoryData.cs index c125bacb..7d1a4282 100644 --- a/OpenSim/Data/IInventoryData.cs +++ b/OpenSim/Data/IInventoryData.cs @@ -37,9 +37,9 @@ namespace OpenSim.Data public interface IInventoryDataPlugin : IPlugin { /// - /// Initialises the interface + /// Initializes the interface /// - void Initialise(string connect); + void Initialize(string connect); /// @@ -194,14 +194,14 @@ public interface IInventoryDataPlugin : IPlugin List getItemsInFolders(IEnumerable folders); } - public class InventoryDataInitialiser : PluginInitialiserBase + public class InventoryDataInitializer : PluginInitializerBase { private string connect; - public InventoryDataInitialiser (string s) { connect = s; } - public override void Initialise (IPlugin plugin) + public InventoryDataInitializer (string s) { connect = s; } + public override void Initialize (IPlugin plugin) { IInventoryDataPlugin p = plugin as IInventoryDataPlugin; - p.Initialise (connect); + p.Initialize (connect); } } } diff --git a/OpenSim/Data/ILogData.cs b/OpenSim/Data/ILogData.cs index e5e97dc9..c95570fa 100644 --- a/OpenSim/Data/ILogData.cs +++ b/OpenSim/Data/ILogData.cs @@ -69,19 +69,19 @@ void saveLog(string serverDaemon, string target, string methodCall, string argum string logMessage); /// - /// Initialises the interface + /// Initializes the interface /// - void Initialise(string connect); + void Initialize(string connect); } - public class LogDataInitialiser : PluginInitialiserBase + public class LogDataInitializer : PluginInitializerBase { private string connect; - public LogDataInitialiser (string s) { connect = s; } - public override void Initialise (IPlugin plugin) + public LogDataInitializer (string s) { connect = s; } + public override void Initialize (IPlugin plugin) { ILogDataPlugin p = plugin as ILogDataPlugin; - p.Initialise (connect); + p.Initialize (connect); } } } diff --git a/OpenSim/Data/IUserData.cs b/OpenSim/Data/IUserData.cs index 9fa57e76..c25f50c6 100644 --- a/OpenSim/Data/IUserData.cs +++ b/OpenSim/Data/IUserData.cs @@ -191,9 +191,9 @@ public interface IUserDataPlugin : IPlugin bool InventoryTransferRequest(UUID from, UUID to, UUID inventory); /// - /// Initialises the plugin (artificial constructor) + /// Initializes the plugin (artificial constructor) /// - void Initialise(string connect); + void Initialize(string connect); /// /// Gets the user appearance @@ -225,14 +225,14 @@ public interface IUserDataPlugin : IPlugin UserPreferencesData RetrieveUserPreferences(UUID userId); } - public class UserDataInitialiser : PluginInitialiserBase + public class UserDataInitializer : PluginInitializerBase { private string connect; - public UserDataInitialiser (string s) { connect = s; } - public override void Initialise (IPlugin plugin) + public UserDataInitializer (string s) { connect = s; } + public override void Initialize (IPlugin plugin) { IUserDataPlugin p = plugin as IUserDataPlugin; - p.Initialise (connect); + p.Initialize (connect); } } } diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index a51f154e..b15d5b92 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs @@ -49,17 +49,17 @@ public class MySQLAssetData : AssetDataBase #region IPlugin Members /// - /// Initialises Asset interface + /// Initializes Asset interface /// /// - /// Loads and initialises the MySQL storage plugin. + /// Loads and initializes the MySQL storage plugin. /// Warns and uses the obsolete mysql_connection.ini if connect string is empty. /// Check for migration /// /// /// /// connect string - override public void Initialise(string connect) + override public void Initialize(string connect) { TicksToEpoch = new DateTime(1970,1,1).Ticks; @@ -69,7 +69,7 @@ override public void Initialise(string connect) { // This is old seperate config file m_log.Warn("no connect string, using old mysql_connection.ini instead"); - Initialise(); + Initialize(); } else { @@ -78,16 +78,16 @@ override public void Initialise(string connect) } /// - /// Initialises Asset interface + /// Initializes Asset interface /// /// - /// Loads and initialises the MySQL storage plugin + /// Loads and initializes the MySQL storage plugin /// uses the obsolete mysql_connection.ini /// /// /// /// DEPRECATED and shouldn't be used - public override void Initialise() + public override void Initialize() { IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); string hostname = GridDataMySqlFile.ParseFileReadValue("hostname"); diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs index 6abc06ca..02018bcc 100644 --- a/OpenSim/Data/MySQL/MySQLEstateData.cs +++ b/OpenSim/Data/MySQL/MySQLEstateData.cs @@ -58,7 +58,7 @@ private MySqlConnection GetConnection() return conn; } - public void Initialise(string connectionString) + public void Initialize(string connectionString) { m_connectionString = connectionString; diff --git a/OpenSim/Data/MySQL/MySQLGridData.cs b/OpenSim/Data/MySQL/MySQLGridData.cs index 25839cea..087a1967 100644 --- a/OpenSim/Data/MySQL/MySQLGridData.cs +++ b/OpenSim/Data/MySQL/MySQLGridData.cs @@ -45,24 +45,24 @@ public class MySQLGridData : GridDataBase private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private ConnectionFactory _connFactory; - override public void Initialise() + override public void Initialize() { m_log.Info("[MySQLGridData]: " + Name + " cannot be default-initialized!"); - throw new PluginNotInitialisedException (Name); + throw new PluginNotInitializedException (Name); } /// - /// Initialises Grid interface + /// Initializes Grid interface /// /// - /// Loads and initialises the MySQL storage plugin + /// Loads and initializes the MySQL storage plugin /// Warns and uses the obsolete mysql_connection.ini if connect string is empty. /// Check for migration /// /// /// /// connect string. - override public void Initialise(string connect) + override public void Initialize(string connect) { m_log.Info("[MySQLGridData.InWorldz]: Starting up"); diff --git a/OpenSim/Data/MySQL/MySQLLogData.cs b/OpenSim/Data/MySQL/MySQLLogData.cs index e0292837..2e1ff0bc 100644 --- a/OpenSim/Data/MySQL/MySQLLogData.cs +++ b/OpenSim/Data/MySQL/MySQLLogData.cs @@ -44,10 +44,10 @@ internal class MySQLLogData : ILogDataPlugin /// public MySQLManager database; - public void Initialise() + public void Initialize() { m_log.Info("[MySQLLogData]: " + Name + " cannot be default-initialized!"); - throw new PluginNotInitialisedException (Name); + throw new PluginNotInitializedException (Name); } /// @@ -55,7 +55,7 @@ public void Initialise() /// Uses the obsolete mysql_connection.ini if connect string is empty. /// /// connect string - public void Initialise(string connect) + public void Initialize(string connect) { if (connect != String.Empty) { diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index bea287e3..2092c2f6 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs @@ -74,7 +74,7 @@ public class MySQLManager private long m_lastConnectionUse; /// - /// Initialises and creates a new MySQL connection and maintains it. + /// Initializes and creates a new MySQL connection and maintains it. /// /// The MySQL server being connected to /// The name of the MySQL database being used @@ -88,23 +88,23 @@ public MySQLManager(string hostname, string database, string username, string pa string s = "Server=" + hostname + ";Port=" + port + ";Database=" + database + ";User ID=" + username + ";Password=" + password + ";Pooling=" + cpooling + ";"; - Initialise(s); + Initialize(s); } /// - /// Initialises and creates a new MySQL connection and maintains it. + /// Initializes and creates a new MySQL connection and maintains it. /// /// connectionString public MySQLManager(String connect) { - Initialise(connect); + Initialize(connect); } /// - /// Initialises and creates a new MySQL connection and maintains it. + /// Initializes and creates a new MySQL connection and maintains it. /// /// connectionString - public void Initialise(String connect) + public void Initialize(String connect) { try { @@ -125,7 +125,7 @@ public void Initialise(String connect) } catch (Exception e) { - throw new Exception("Error initialising MySql Database: " + e.ToString()); + throw new Exception("Error initializing MySql Database: " + e.ToString()); } } diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index 9fccb630..d16b5907 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs @@ -58,7 +58,7 @@ public class MySQLDataStore : IRegionDataStore private object m_PrimDBLock = new object(); - public void Initialise(string connectionString) + public void Initialize(string connectionString) { m_ConnectionString = connectionString; } diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs index eb101101..293927d9 100644 --- a/OpenSim/Data/MySQL/MySQLUserData.cs +++ b/OpenSim/Data/MySQL/MySQLUserData.cs @@ -54,20 +54,20 @@ public class MySQLUserData : UserDataBase private string m_appearanceTableName = "avatarappearance"; private string m_attachmentsTableName = "avatarattachments"; - public override void Initialise() + public override void Initialize() { m_log.Info("[MySQLUserData]: " + Name + " cannot be default-initialized!"); - throw new PluginNotInitialisedException(Name); + throw new PluginNotInitializedException(Name); } /// - /// Initialise User Interface - /// Loads and initialises the MySQL storage plugin + /// Initialize User Interface + /// Loads and initializes the MySQL storage plugin /// Warns and uses the obsolete mysql_connection.ini if connect string is empty. /// Checks for migration /// /// connect string. - public override void Initialise(string connect) + public override void Initialize(string connect) { _connFactory = new ConnectionFactory("MySQL", connect); diff --git a/OpenSim/Data/Null/NullDataStore.cs b/OpenSim/Data/Null/NullDataStore.cs index 9681d6b8..e785c69c 100644 --- a/OpenSim/Data/Null/NullDataStore.cs +++ b/OpenSim/Data/Null/NullDataStore.cs @@ -39,7 +39,7 @@ namespace OpenSim.Data.Null /// public class NullDataStore : IRegionDataStore { - public void Initialise(string dbfile) + public void Initialize(string dbfile) { return; } diff --git a/OpenSim/Data/UserDataBase.cs b/OpenSim/Data/UserDataBase.cs index 731b611d..adc21973 100644 --- a/OpenSim/Data/UserDataBase.cs +++ b/OpenSim/Data/UserDataBase.cs @@ -76,8 +76,8 @@ public virtual void RemoveTemporaryUserProfile(UUID userid) public abstract string Version {get;} public abstract string Name {get;} - public abstract void Initialise(string connect); - public abstract void Initialise(); + public abstract void Initialize(string connect); + public abstract void Initialize(); public abstract void Dispose(); public abstract void SaveUserPreferences(UserPreferencesData userPrefs); diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 14610f44..10ab072f 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs @@ -75,23 +75,23 @@ public virtual string Version get { return "1.0"; } } - public virtual void Initialise() + public virtual void Initialize() { - m_log.Debug("[ASSET CACHE]: Asset cache null initialisation"); + m_log.Debug("[ASSET CACHE]: Asset cache null initialization"); } - public virtual void Initialise(IAssetServer assetServer) + public virtual void Initialize(IAssetServer assetServer) { - m_log.InfoFormat("[ASSET CACHE]: Asset cache initialisation [{0}/{1}]", Name, Version); + m_log.InfoFormat("[ASSET CACHE]: Asset cache initialization [{0}/{1}]", Name, Version); m_assetServer = assetServer; m_assetServer.SetReceiver(this); } - public virtual void Initialise(ConfigSettings settings, IAssetServer assetServer) + public virtual void Initialize(ConfigSettings settings, IAssetServer assetServer) { - m_log.Debug("[ASSET CACHE]: Asset cache configured initialisation"); - Initialise(assetServer); + m_log.Debug("[ASSET CACHE]: Asset cache configured initialization"); + Initialize(assetServer); } public void Dispose() @@ -131,7 +131,7 @@ public AssetCache() /// public AssetCache(IAssetServer assetServer) { - Initialise(assetServer); + Initialize(assetServer); _negativeCache = new LRUCache(NEGATIVE_CACHE_SIZE); ProviderRegistry.Instance.RegisterInterface(this); } diff --git a/OpenSim/Framework/Communications/Cache/WHIPAssetClient.cs b/OpenSim/Framework/Communications/Cache/WHIPAssetClient.cs index 23d039b8..b7b672bb 100644 --- a/OpenSim/Framework/Communications/Cache/WHIPAssetClient.cs +++ b/OpenSim/Framework/Communications/Cache/WHIPAssetClient.cs @@ -68,7 +68,7 @@ public AssetClient(string url) this.SetupConnections(url); } - public void Initialise(ConfigSettings settings) + public void Initialize(ConfigSettings settings) { _settings = settings; @@ -378,7 +378,7 @@ public string Name get { return "InWorldz WHIP Asset Client"; } } - public void Initialise() + public void Initialize() { } diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDEnvironmentSettings.cs b/OpenSim/Framework/Communications/Capabilities/LLSDEnvironmentSettings.cs index efef2b32..6bb0c4ea 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDEnvironmentSettings.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDEnvironmentSettings.cs @@ -61,7 +61,7 @@ public static string EmptySettings(UUID messageID, UUID regionID) msg.messageID = messageID; msg.regionID = regionID; arr.Array.Add(msg); - return LLSDHelpers.SerialiseLLSDReply(arr); + return LLSDHelpers.SerializeLLSDReply(arr); } } diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs index e10beff6..a30e0929 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs @@ -38,7 +38,7 @@ public class LLSDHelpers // private static readonly log4net.ILog m_log // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - public static string SerialiseLLSDReply(object obj) + public static string SerializeLLSDReply(object obj) { StringWriter sw = new StringWriter(); XmlTextWriter writer = new XmlTextWriter(sw); @@ -125,7 +125,7 @@ private static void SerializeOSDType(XmlTextWriter writer, object obj) } } - public static object DeserialiseOSDMap(Hashtable llsd, object obj) + public static object DeserializeOSDMap(Hashtable llsd, object obj) { Type myType = obj.GetType(); LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false); @@ -146,16 +146,16 @@ public static object DeserialiseOSDMap(Hashtable llsd, object obj) if (enumerator.Value is Hashtable) { object fieldValue = field.GetValue(obj); - DeserialiseOSDMap((Hashtable) enumerator.Value, fieldValue); - // DeserialiseOSDMap((OpenMetaverse.StructuredData.OSDMap) enumerator.Value, fieldValue); + DeserializeOSDMap((Hashtable) enumerator.Value, fieldValue); + // DeserializeOSDMap((OpenMetaverse.StructuredData.OSDMap) enumerator.Value, fieldValue); } else if (enumerator.Value is ArrayList) { object fieldValue = field.GetValue(obj); fieldValue.GetType().GetField("Array").SetValue(fieldValue, enumerator.Value); //TODO - // the LLSD map/array types in the array need to be deserialised - // but first we need to know the right class to deserialise them into. + // the LLSD map/array types in the array need to be deserialized + // but first we need to know the right class to deserialize them into. } else { diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs index 6c83f818..7dd69dc0 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs @@ -58,13 +58,13 @@ public override byte[] Handle(string path, Stream request, Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request); TRequest llsdRequest = new TRequest(); - LLSDHelpers.DeserialiseOSDMap(hash, llsdRequest); + LLSDHelpers.DeserializeOSDMap(hash, llsdRequest); TResponse response = m_method(llsdRequest); Encoding encoding = new UTF8Encoding(false); - return encoding.GetBytes(LLSDHelpers.SerialiseLLSDReply(response)); + return encoding.GetBytes(LLSDHelpers.SerializeLLSDReply(response)); } } } diff --git a/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs b/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs index 4c74edcd..98391344 100644 --- a/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs +++ b/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs @@ -47,8 +47,8 @@ public OspInventoryWrapperPlugin(IInventoryDataPlugin wrappedPlugin, Communicati public string Name { get { return "OspInventoryWrapperPlugin"; } } public string Version { get { return "0.1"; } } - public void Initialise() {} - public void Initialise(string connect) {} + public void Initialize() {} + public void Initialize(string connect) {} public void Dispose() {} public InventoryItemBase getInventoryItem(UUID item) diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 100847ed..1c607493 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -722,7 +722,7 @@ public virtual void ClearUserAgent(UUID agentID) #region CreateAgent /// - /// Creates and initialises a new user agent - make sure to use CommitAgent when done to submit to the DB + /// Creates and initializes a new user agent - make sure to use CommitAgent when done to submit to the DB /// /// The users profile /// The users loginrequest diff --git a/OpenSim/Framework/IAssetCache.cs b/OpenSim/Framework/IAssetCache.cs index 99cd01ab..7717f141 100644 --- a/OpenSim/Framework/IAssetCache.cs +++ b/OpenSim/Framework/IAssetCache.cs @@ -48,7 +48,7 @@ public interface IAssetCache : IAssetReceiver, IPlugin /// IAssetServer AssetServer { get; } - void Initialise(ConfigSettings cs, IAssetServer server); + void Initialize(ConfigSettings cs, IAssetServer server); /// /// Report statistical data to the log. @@ -91,20 +91,20 @@ public interface IAssetCache : IAssetReceiver, IPlugin void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest); } - public class AssetCachePluginInitialiser : PluginInitialiserBase + public class AssetCachePluginInitializer : PluginInitializerBase { private ConfigSettings config; private IAssetServer server; - public AssetCachePluginInitialiser (ConfigSettings p_sv, IAssetServer p_as) + public AssetCachePluginInitializer (ConfigSettings p_sv, IAssetServer p_as) { config = p_sv; server = p_as; } - public override void Initialise (IPlugin plugin) + public override void Initialize (IPlugin plugin) { IAssetCache p = plugin as IAssetCache; - p.Initialise (config, server); + p.Initialize (config, server); } } diff --git a/OpenSim/Framework/IAssetServer.cs b/OpenSim/Framework/IAssetServer.cs index b8d796ea..1b6e1650 100644 --- a/OpenSim/Framework/IAssetServer.cs +++ b/OpenSim/Framework/IAssetServer.cs @@ -34,7 +34,7 @@ namespace OpenSim.Framework /// public interface IAssetServer : IPlugin { - void Initialise(ConfigSettings settings); + void Initialize(ConfigSettings settings); /// /// Start the asset server @@ -66,18 +66,18 @@ public interface IAssetServer : IPlugin void UpdateAsset(AssetBase asset); } - public class AssetClientPluginInitialiser : PluginInitialiserBase + public class AssetClientPluginInitializer : PluginInitializerBase { private ConfigSettings config; - public AssetClientPluginInitialiser (ConfigSettings p_sv) + public AssetClientPluginInitializer (ConfigSettings p_sv) { config = p_sv; } - public override void Initialise (IPlugin plugin) + public override void Initialize (IPlugin plugin) { IAssetServer p = plugin as IAssetServer; - p.Initialise (config); + p.Initialize (config); } } diff --git a/OpenSim/Framework/IPlugin.cs b/OpenSim/Framework/IPlugin.cs index 0cef67ea..341de9a1 100644 --- a/OpenSim/Framework/IPlugin.cs +++ b/OpenSim/Framework/IPlugin.cs @@ -30,13 +30,13 @@ namespace OpenSim.Framework { /// - /// Exception thrown if Initialise has been called, but failed. + /// Exception thrown if Initialize has been called, but failed. /// - public class PluginNotInitialisedException : Exception + public class PluginNotInitializedException : Exception { - public PluginNotInitialisedException () : base() {} - public PluginNotInitialisedException (string msg) : base(msg) {} - public PluginNotInitialisedException (string msg, Exception e) : base(msg, e) {} + public PluginNotInitializedException () : base() {} + public PluginNotInitializedException (string msg) : base(msg) {} + public PluginNotInitializedException (string msg, Exception e) : base(msg, e) {} } /// @@ -57,23 +57,23 @@ public interface IPlugin : IDisposable string Name { get; } /// - /// Default-initialises the plugin + /// Default-initializes the plugin /// - void Initialise(); + void Initialize(); } /// - /// Any plugins which need to pass parameters to their initialisers must - /// inherit this class and use it to set the PluginLoader Initialiser property + /// Any plugins which need to pass parameters to their initializers must + /// inherit this class and use it to set the PluginLoader Initializer property /// - public class PluginInitialiserBase + public class PluginInitializerBase { // this would be a lot simpler if C# supported currying or typedefs - // default initialisation - public virtual void Initialise (IPlugin plugin) + // default initialization + public virtual void Initialize (IPlugin plugin) { - plugin.Initialise(); + plugin.Initialize(); } } diff --git a/OpenSim/Framework/PluginLoader.cs b/OpenSim/Framework/PluginLoader.cs index 5b670e04..40107934 100644 --- a/OpenSim/Framework/PluginLoader.cs +++ b/OpenSim/Framework/PluginLoader.cs @@ -72,7 +72,7 @@ public class PluginLoader : IDisposable where T : IPlugin private List loaded = new List(); private List extpoints = new List(); - private PluginInitialiserBase initialiser; + private PluginInitializerBase initializer; private Dictionary constraints = new Dictionary(); @@ -83,10 +83,10 @@ private Dictionary filters private static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public PluginInitialiserBase Initialiser + public PluginInitializerBase Initializer { - set { initialiser = value; } - get { return initialiser; } + set { initializer = value; } + get { return initializer; } } public List Plugins @@ -101,20 +101,20 @@ public T Plugin public PluginLoader() { - Initialiser = new PluginInitialiserBase(); - initialise_plugin_dir_("."); + Initializer = new PluginInitializerBase(); + initialize_plugin_dir_("."); } - public PluginLoader(PluginInitialiserBase init) + public PluginLoader(PluginInitializerBase init) { - Initialiser = init; - initialise_plugin_dir_("."); + Initializer = init; + initialize_plugin_dir_("."); } - public PluginLoader(PluginInitialiserBase init, string dir) + public PluginLoader(PluginInitializerBase init, string dir) { - Initialiser = init; - initialise_plugin_dir_(dir); + Initializer = init; + initialize_plugin_dir_(dir); } public void Add(string extpoint) @@ -183,12 +183,12 @@ public void Load() loadedPlugins.Add(plugin); } - // We do Initialise() in a second loop after CreateInstance + // We do Initialize() in a second loop after CreateInstance // So that modules who need init before others can do it // Example: Script Engine Component System needs to load its components before RegionLoader starts foreach (T plugin in loadedPlugins) { - Initialiser.Initialise(plugin); + Initializer.Initialize(plugin); Plugins.Add(plugin); } } @@ -200,7 +200,7 @@ public void Dispose() plugin.Dispose(); } - private void initialise_plugin_dir_(string dir) + private void initialize_plugin_dir_(string dir) { if (AddinManager.IsInitialized == true) return; diff --git a/OpenSim/Framework/Remoting.cs b/OpenSim/Framework/Remoting.cs index 38cd409a..a725ec8e 100644 --- a/OpenSim/Framework/Remoting.cs +++ b/OpenSim/Framework/Remoting.cs @@ -49,7 +49,7 @@ internal class RemoteDigest private SHA512Managed SHA512; /// - /// Initialises a new RemoteDigest authentication mechanism + /// Initializes a new RemoteDigest authentication mechanism /// /// Needs an audit by a cryptographic professional - was not "roll your own"'d by choice but rather a serious lack of decent authentication mechanisms in .NET remoting /// The shared secret between systems (for inter-sim, this is provided in encrypted form during connection, for grid this is input manually in setup) diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 909003f6..51f86dc5 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -297,7 +297,7 @@ protected string GetUptimeReport() } /// - /// Performs initialisation of the scene, such as loading configuration from disk. + /// Performs initialization of the scene, such as loading configuration from disk. /// public virtual void Startup() { diff --git a/OpenSim/Framework/Servers/HttpServer/RestDeserialiseHandler.cs b/OpenSim/Framework/Servers/HttpServer/RestDeserializeHandler.cs similarity index 87% rename from OpenSim/Framework/Servers/HttpServer/RestDeserialiseHandler.cs rename to OpenSim/Framework/Servers/HttpServer/RestDeserializeHandler.cs index b0ddfeaf..efec28d8 100644 --- a/OpenSim/Framework/Servers/HttpServer/RestDeserialiseHandler.cs +++ b/OpenSim/Framework/Servers/HttpServer/RestDeserializeHandler.cs @@ -31,18 +31,18 @@ namespace OpenSim.Framework.Servers.HttpServer { - public delegate TResponse RestDeserialiseMethod(TRequest request); + public delegate TResponse RestDeserializeMethod(TRequest request); - public class RestDeserialiseHandler : BaseRequestHandler, IStreamHandler + public class RestDeserializeHandler : BaseRequestHandler, IStreamHandler where TRequest : new() { - private RestDeserialiseMethod m_method; + private RestDeserializeMethod m_method; - public RestDeserialiseHandler(string httpMethod, string path, RestDeserialiseMethod method) + public RestDeserializeHandler(string httpMethod, string path, RestDeserializeMethod method) : this(httpMethod, path, method, null, null) {} - public RestDeserialiseHandler( - string httpMethod, string path, RestDeserialiseMethod method, string name, string description) + public RestDeserializeHandler( + string httpMethod, string path, RestDeserializeMethod method, string name, string description) : base(httpMethod, path, name, description) { m_method = method; diff --git a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs index 606a86df..589a1427 100644 --- a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs +++ b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs @@ -192,18 +192,18 @@ private void AsyncCallback(IAsyncResult result) public delegate bool CheckIdentityMethod(string sid, string aid); - public class RestDeserialiseSecureHandler : BaseRequestHandler, IStreamHandler + public class RestDeserializeSecureHandler : BaseRequestHandler, IStreamHandler where TRequest : new() { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private RestDeserialiseMethod m_method; + private RestDeserializeMethod m_method; private CheckIdentityMethod m_smethod; - public RestDeserialiseSecureHandler( + public RestDeserializeSecureHandler( string httpMethod, string path, - RestDeserialiseMethod method, CheckIdentityMethod smethod) + RestDeserializeMethod method, CheckIdentityMethod smethod) : base(httpMethod, path) { m_smethod = smethod; @@ -246,7 +246,7 @@ public void Handle(string path, Stream request, Stream responseStream, public delegate bool CheckTrustedSourceMethod(IPEndPoint peer); - public class RestDeserialiseTrustedHandler : BaseRequestHandler, IStreamHandler + public class RestDeserializeTrustedHandler : BaseRequestHandler, IStreamHandler where TRequest : new() { private static readonly ILog m_log @@ -255,14 +255,14 @@ private static readonly ILog m_log /// /// The operation to perform once trust has been established. /// - private RestDeserialiseMethod m_method; + private RestDeserializeMethod m_method; /// /// The method used to check whether a request is trusted. /// private CheckTrustedSourceMethod m_tmethod; - public RestDeserialiseTrustedHandler(string httpMethod, string path, RestDeserialiseMethod method, CheckTrustedSourceMethod tmethod) + public RestDeserializeTrustedHandler(string httpMethod, string path, RestDeserializeMethod method, CheckTrustedSourceMethod tmethod) : base(httpMethod, path) { m_tmethod = tmethod; diff --git a/OpenSim/Grid/Framework/IGridServiceModule.cs b/OpenSim/Grid/Framework/IGridServiceModule.cs index 04001a80..05ec4ca2 100644 --- a/OpenSim/Grid/Framework/IGridServiceModule.cs +++ b/OpenSim/Grid/Framework/IGridServiceModule.cs @@ -33,8 +33,8 @@ namespace OpenSim.Grid.Framework public interface IGridServiceModule { void Close(); - void Initialise(IGridServiceCore core); - void PostInitialise(); + void Initialize(IGridServiceCore core); + void PostInitialize(); void RegisterHandlers(BaseHttpServer httpServer); } } diff --git a/OpenSim/Grid/GridServer.Modules/GridMessagingModule.cs b/OpenSim/Grid/GridServer.Modules/GridMessagingModule.cs index a8f12fef..eb48bdbd 100644 --- a/OpenSim/Grid/GridServer.Modules/GridMessagingModule.cs +++ b/OpenSim/Grid/GridServer.Modules/GridMessagingModule.cs @@ -64,7 +64,7 @@ public GridMessagingModule() { } - public void Initialise(string opensimVersion, IRegionProfileService gridDBService, IGridServiceCore gridCore, GridConfig config) + public void Initialize(string opensimVersion, IRegionProfileService gridDBService, IGridServiceCore gridCore, GridConfig config) { //m_opensimVersion = opensimVersion; m_gridDBService = gridDBService; @@ -76,7 +76,7 @@ public void Initialise(string opensimVersion, IRegionProfileService gridDBServic RegisterHandlers(); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Grid/GridServer.Modules/GridRestModule.cs b/OpenSim/Grid/GridServer.Modules/GridRestModule.cs index 96d3fae4..e0f25960 100644 --- a/OpenSim/Grid/GridServer.Modules/GridRestModule.cs +++ b/OpenSim/Grid/GridServer.Modules/GridRestModule.cs @@ -67,7 +67,7 @@ public GridRestModule() { } - public void Initialise(string opensimVersion, GridDBService gridDBService, IGridServiceCore gridCore, GridConfig config) + public void Initialize(string opensimVersion, GridDBService gridDBService, IGridServiceCore gridCore, GridConfig config) { //m_opensimVersion = opensimVersion; m_gridDBService = gridDBService; @@ -76,7 +76,7 @@ public void Initialise(string opensimVersion, GridDBService gridDBService, IGrid RegisterHandlers(); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Grid/GridServer.Modules/GridServerPlugin.cs b/OpenSim/Grid/GridServer.Modules/GridServerPlugin.cs index 20a09f40..51d6d652 100644 --- a/OpenSim/Grid/GridServer.Modules/GridServerPlugin.cs +++ b/OpenSim/Grid/GridServer.Modules/GridServerPlugin.cs @@ -57,7 +57,7 @@ public class GridServerPlugin : IGridPlugin #region IGridPlugin Members - public void Initialise(GridServerBase gridServer) + public void Initialize(GridServerBase gridServer) { m_core = gridServer; m_config = gridServer.Config; @@ -83,7 +83,7 @@ public string Name get { return "GridServerPlugin"; } } - public void Initialise() + public void Initialize() { } @@ -99,17 +99,17 @@ protected virtual void SetupGridServices() // RegisterInterface(m_gridDBService); m_gridMessageModule = new GridMessagingModule(); - m_gridMessageModule.Initialise(m_version, m_gridDBService, m_core, m_config); + m_gridMessageModule.Initialize(m_version, m_gridDBService, m_core, m_config); m_gridXmlRpcModule = new GridXmlRpcModule(); - m_gridXmlRpcModule.Initialise(m_version, m_gridDBService, m_core, m_config); + m_gridXmlRpcModule.Initialize(m_version, m_gridDBService, m_core, m_config); m_gridRestModule = new GridRestModule(); - m_gridRestModule.Initialise(m_version, m_gridDBService, m_core, m_config); + m_gridRestModule.Initialize(m_version, m_gridDBService, m_core, m_config); - m_gridMessageModule.PostInitialise(); - m_gridXmlRpcModule.PostInitialise(); - m_gridRestModule.PostInitialise(); + m_gridMessageModule.PostInitialize(); + m_gridXmlRpcModule.PostInitialize(); + m_gridRestModule.PostInitialize(); } #region Console Command Handlers diff --git a/OpenSim/Grid/GridServer.Modules/GridXmlRpcModule.cs b/OpenSim/Grid/GridServer.Modules/GridXmlRpcModule.cs index bd2c4c3b..ac066f11 100644 --- a/OpenSim/Grid/GridServer.Modules/GridXmlRpcModule.cs +++ b/OpenSim/Grid/GridServer.Modules/GridXmlRpcModule.cs @@ -71,7 +71,7 @@ public GridXmlRpcModule() { } - public void Initialise(string opensimVersion, IRegionProfileService gridDBService, IGridServiceCore gridCore, GridConfig config) + public void Initialize(string opensimVersion, IRegionProfileService gridDBService, IGridServiceCore gridCore, GridConfig config) { m_opensimVersion = opensimVersion; m_gridDBService = gridDBService; @@ -80,7 +80,7 @@ public void Initialise(string opensimVersion, IRegionProfileService gridDBServic RegisterHandlers(); } - public void PostInitialise() + public void PostInitialize() { IMessagingServerDiscovery messagingModule; if (m_gridCore.TryGet(out messagingModule)) diff --git a/OpenSim/Grid/GridServer/GridServerBase.cs b/OpenSim/Grid/GridServer/GridServerBase.cs index 13deb04a..b81b46f3 100644 --- a/OpenSim/Grid/GridServer/GridServerBase.cs +++ b/OpenSim/Grid/GridServer/GridServerBase.cs @@ -136,7 +136,7 @@ public object GridServerShutdownHandler(IList args, IPEndPoint remoteClient) protected virtual void LoadPlugins() { PluginLoader loader = - new PluginLoader(new GridPluginInitialiser(this)); + new PluginLoader(new GridPluginInitializer(this)); loader.Load("/OpenSim/GridServer"); m_plugins = loader.Plugins; diff --git a/OpenSim/Grid/GridServer/IGridPlugin.cs b/OpenSim/Grid/GridServer/IGridPlugin.cs index e2557c06..88cb50d7 100644 --- a/OpenSim/Grid/GridServer/IGridPlugin.cs +++ b/OpenSim/Grid/GridServer/IGridPlugin.cs @@ -32,17 +32,17 @@ namespace OpenSim.Grid.GridServer { public interface IGridPlugin : IPlugin { - void Initialise(GridServerBase gridServer); + void Initialize(GridServerBase gridServer); } - public class GridPluginInitialiser : PluginInitialiserBase + public class GridPluginInitializer : PluginInitializerBase { private GridServerBase server; - public GridPluginInitialiser (GridServerBase s) { server = s; } - public override void Initialise (IPlugin plugin) + public GridPluginInitializer (GridServerBase s) { server = s; } + public override void Initialize (IPlugin plugin) { IGridPlugin p = plugin as IGridPlugin; - p.Initialise (server); + p.Initialize (server); } } } diff --git a/OpenSim/Grid/MessagingServer.Modules/InterMessageUserServerModule.cs b/OpenSim/Grid/MessagingServer.Modules/InterMessageUserServerModule.cs index 3957cc18..f507993d 100644 --- a/OpenSim/Grid/MessagingServer.Modules/InterMessageUserServerModule.cs +++ b/OpenSim/Grid/MessagingServer.Modules/InterMessageUserServerModule.cs @@ -61,12 +61,12 @@ public InterMessageUserServerModule(MessageServerConfig config, IGridServiceCore reconnectTimer.Start(); } - public void Initialise() + public void Initialize() { m_messageCore.RegisterInterface(this); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Grid/MessagingServer.Modules/MessageRegionModule.cs b/OpenSim/Grid/MessagingServer.Modules/MessageRegionModule.cs index 34aca1d3..86999c56 100644 --- a/OpenSim/Grid/MessagingServer.Modules/MessageRegionModule.cs +++ b/OpenSim/Grid/MessagingServer.Modules/MessageRegionModule.cs @@ -61,12 +61,12 @@ public MessageRegionModule(MessageServerConfig config, IGridServiceCore messageC m_messageCore = messageCore; } - public void Initialise() + public void Initialize() { m_messageCore.RegisterInterface(this); } - public void PostInitialise() + public void PostInitialize() { IInterServiceUserService messageUserServer; if (m_messageCore.TryGet(out messageUserServer)) diff --git a/OpenSim/Grid/MessagingServer.Modules/MessageService.cs b/OpenSim/Grid/MessagingServer.Modules/MessageService.cs index 10759050..812a245d 100644 --- a/OpenSim/Grid/MessagingServer.Modules/MessageService.cs +++ b/OpenSim/Grid/MessagingServer.Modules/MessageService.cs @@ -73,11 +73,11 @@ public MessageService(MessageServerConfig cfg, IGridServiceCore messageCore, Use uc.DatabaseProvider = cfg.DatabaseProvider; } - public void Initialise() + public void Initialize() { } - public void PostInitialise() + public void PostInitialize() { IInterServiceUserService messageUserServer; if (m_messageCore.TryGet(out messageUserServer)) diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs index fd47129d..80facd19 100644 --- a/OpenSim/Grid/MessagingServer/Main.cs +++ b/OpenSim/Grid/MessagingServer/Main.cs @@ -195,19 +195,19 @@ protected override void StartupSpecific() // RegisterInterface(m_userDataBaseService); m_userServerModule = new InterMessageUserServerModule(Cfg, this); - m_userServerModule.Initialise(); + m_userServerModule.Initialize(); msgsvc = new MessageService(Cfg, this, m_userDataBaseService); - msgsvc.Initialise(); + msgsvc.Initialize(); m_regionModule = new MessageRegionModule(Cfg, this); - m_regionModule.Initialise(); + m_regionModule.Initialize(); registerWithUserServer(); - m_userServerModule.PostInitialise(); - msgsvc.PostInitialise(); - m_regionModule.PostInitialise(); + m_userServerModule.PostInitialize(); + msgsvc.PostInitialize(); + m_regionModule.PostInitialize(); m_log.Info("[SERVER]: Messageserver 0.5 - Startup complete"); diff --git a/OpenSim/Grid/UserServer.Modules/GridInfoServiceModule.cs b/OpenSim/Grid/UserServer.Modules/GridInfoServiceModule.cs index 3d4486e9..20d24937 100644 --- a/OpenSim/Grid/UserServer.Modules/GridInfoServiceModule.cs +++ b/OpenSim/Grid/UserServer.Modules/GridInfoServiceModule.cs @@ -42,13 +42,13 @@ public GridInfoServiceModule() { } - public void Initialise(IGridServiceCore core) + public void Initialize(IGridServiceCore core) { m_core = core; m_gridInfoService = new GridInfoService(); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs b/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs index 70976b83..36f9d7c4 100644 --- a/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs +++ b/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs @@ -92,7 +92,7 @@ public MessageServersConnector() MessageServers = new Dictionary(); } - public void Initialise(IGridServiceCore core) + public void Initialize(IGridServiceCore core) { m_core = core; m_core.RegisterInterface(this); @@ -100,7 +100,7 @@ public void Initialise(IGridServiceCore core) m_NotifyThread.Start(); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Grid/UserServer.Modules/UserDataBaseService.cs b/OpenSim/Grid/UserServer.Modules/UserDataBaseService.cs index 6cbd973c..f131b53d 100644 --- a/OpenSim/Grid/UserServer.Modules/UserDataBaseService.cs +++ b/OpenSim/Grid/UserServer.Modules/UserDataBaseService.cs @@ -49,7 +49,7 @@ public UserDataBaseService(CommunicationsManager commsManager) { } - public void Initialise(IGridServiceCore core) + public void Initialize(IGridServiceCore core) { m_core = core; @@ -62,7 +62,7 @@ public void Initialise(IGridServiceCore core) m_core.RegisterInterface(this); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Grid/UserServer.Modules/UserManager.cs b/OpenSim/Grid/UserServer.Modules/UserManager.cs index a2cbc962..ad0486f1 100644 --- a/OpenSim/Grid/UserServer.Modules/UserManager.cs +++ b/OpenSim/Grid/UserServer.Modules/UserManager.cs @@ -63,12 +63,12 @@ public UserManager(UserDataBaseService userDataBaseService) m_userDataBaseService = userDataBaseService; } - public void Initialise(IGridServiceCore core) + public void Initialize(IGridServiceCore core) { } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Grid/UserServer.Modules/UserServerAvatarAppearanceModule.cs b/OpenSim/Grid/UserServer.Modules/UserServerAvatarAppearanceModule.cs index 886ed751..f1a5db74 100644 --- a/OpenSim/Grid/UserServer.Modules/UserServerAvatarAppearanceModule.cs +++ b/OpenSim/Grid/UserServer.Modules/UserServerAvatarAppearanceModule.cs @@ -53,12 +53,12 @@ public UserServerAvatarAppearanceModule(UserDataBaseService userDataBaseService) m_userDataBaseService = userDataBaseService; } - public void Initialise(IGridServiceCore core) + public void Initialize(IGridServiceCore core) { } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Grid/UserServer.Modules/UserServerFriendsModule.cs b/OpenSim/Grid/UserServer.Modules/UserServerFriendsModule.cs index 9702b6ff..026fbd86 100644 --- a/OpenSim/Grid/UserServer.Modules/UserServerFriendsModule.cs +++ b/OpenSim/Grid/UserServer.Modules/UserServerFriendsModule.cs @@ -57,12 +57,12 @@ public UserServerFriendsModule(UserDataBaseService userDataBaseService) m_userDataBaseService = userDataBaseService; } - public void Initialise(IGridServiceCore core) + public void Initialize(IGridServiceCore core) { } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 4182f7ee..3e2d9212 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs @@ -123,8 +123,8 @@ protected override void StartupSpecific() StartOtherComponents(); - //PostInitialise the modules - PostInitialiseModules(); + //PostInitialize the modules + PostInitializeModules(); //register http handlers and start http server m_log.Info("[STARTUP]: Starting HTTP process"); @@ -181,26 +181,26 @@ protected virtual void StartupUserServerModules() //setup database access service, for now this has to be created before the other modules. m_userDataBaseService = new UserDataBaseService(commsManager); - m_userDataBaseService.Initialise(this); + m_userDataBaseService.Initialize(this); - //TODO: change these modules so they fetch the databaseService class in the PostInitialise method + //TODO: change these modules so they fetch the databaseService class in the PostInitialize method m_userManager = new UserManager(m_userDataBaseService); - m_userManager.Initialise(this); + m_userManager.Initialize(this); m_avatarAppearanceModule = new UserServerAvatarAppearanceModule(m_userDataBaseService); - m_avatarAppearanceModule.Initialise(this); + m_avatarAppearanceModule.Initialize(this); m_friendsModule = new UserServerFriendsModule(m_userDataBaseService); - m_friendsModule.Initialise(this); + m_friendsModule.Initialize(this); m_consoleCommandModule = new UserServerCommandModule(); - m_consoleCommandModule.Initialise(this); + m_consoleCommandModule.Initialize(this); m_messagesService = new MessageServersConnector(); - m_messagesService.Initialise(this); + m_messagesService.Initialize(this); m_gridInfoService = new GridInfoServiceModule(); - m_gridInfoService.Initialise(this); + m_gridInfoService.Initialize(this); } protected virtual void StartOtherComponents() @@ -214,7 +214,7 @@ protected virtual void StartOtherComponents() RegisterInterface(m_loginService); //TODO: should be done in the login service m_eventDispatcher = new UserServerEventDispatchModule(m_userManager, m_messagesService, m_loginService); - m_eventDispatcher.Initialise(this); + m_eventDispatcher.Initialize(this); } /// @@ -227,16 +227,16 @@ protected virtual void StartupLoginService() m_userDataBaseService, new LibraryRootFolder(Cfg.LibraryXmlfile), Cfg.MapServerURI, Cfg, Cfg.DefaultStartupMsg, new RegionProfileServiceProxy()); } - protected virtual void PostInitialiseModules() + protected virtual void PostInitializeModules() { - m_consoleCommandModule.PostInitialise(); //it will register its Console command handlers in here - m_userDataBaseService.PostInitialise(); - m_messagesService.PostInitialise(); - m_eventDispatcher.PostInitialise(); //it will register event handlers in here - m_gridInfoService.PostInitialise(); - m_userManager.PostInitialise(); - m_avatarAppearanceModule.PostInitialise(); - m_friendsModule.PostInitialise(); + m_consoleCommandModule.PostInitialize(); //it will register its Console command handlers in here + m_userDataBaseService.PostInitialize(); + m_messagesService.PostInitialize(); + m_eventDispatcher.PostInitialize(); //it will register event handlers in here + m_gridInfoService.PostInitialize(); + m_userManager.PostInitialize(); + m_avatarAppearanceModule.PostInitialize(); + m_friendsModule.PostInitialize(); } protected virtual void RegisterHttpHandlers() diff --git a/OpenSim/Grid/UserServer/UserServerCommandModule.cs b/OpenSim/Grid/UserServer/UserServerCommandModule.cs index 2a5f85ff..56e2dd5f 100644 --- a/OpenSim/Grid/UserServer/UserServerCommandModule.cs +++ b/OpenSim/Grid/UserServer/UserServerCommandModule.cs @@ -56,12 +56,12 @@ public UserServerCommandModule() { } - public void Initialise(IGridServiceCore core) + public void Initialize(IGridServiceCore core) { m_core = core; } - public void PostInitialise() + public void PostInitialize() { UserConfig cfg; if (m_core.TryGet(out cfg)) diff --git a/OpenSim/Grid/UserServer/UserServerEventDispatchModule.cs b/OpenSim/Grid/UserServer/UserServerEventDispatchModule.cs index 42585bd5..f8f54929 100644 --- a/OpenSim/Grid/UserServer/UserServerEventDispatchModule.cs +++ b/OpenSim/Grid/UserServer/UserServerEventDispatchModule.cs @@ -47,11 +47,11 @@ public UserServerEventDispatchModule(UserManager userManager, MessageServersConn m_loginService = loginService; } - public void Initialise(IGridServiceCore core) + public void Initialize(IGridServiceCore core) { } - public void PostInitialise() + public void PostInitialize() { m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation; m_userManager.OnLogOffUser += NotifyMessageServersUserLoggOff; diff --git a/OpenSim/Region/ClientStack/ClientStackManager.cs b/OpenSim/Region/ClientStack/ClientStackManager.cs index 0f881d7d..f06bb5e4 100644 --- a/OpenSim/Region/ClientStack/ClientStackManager.cs +++ b/OpenSim/Region/ClientStack/ClientStackManager.cs @@ -114,7 +114,7 @@ public IClientNetworkServer CreateServer( IClientNetworkServer server = (IClientNetworkServer)Activator.CreateInstance(pluginAssembly.GetType(plugin.ToString())); - server.Initialise( + server.Initialize( _listenIP, ref port, proxyPortOffset, allow_alternate_port, configSource); diff --git a/OpenSim/Region/ClientStack/IClientNetworkServer.cs b/OpenSim/Region/ClientStack/IClientNetworkServer.cs index 48c444cb..89e9e60f 100644 --- a/OpenSim/Region/ClientStack/IClientNetworkServer.cs +++ b/OpenSim/Region/ClientStack/IClientNetworkServer.cs @@ -34,7 +34,7 @@ namespace OpenSim.Region.ClientStack { public interface IClientNetworkServer { - void Initialise( + void Initialize( IPAddress _listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource); void NetworkStop(); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs index c06821e6..f29ca30d 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs @@ -187,15 +187,15 @@ public bool UploadComplete public XferUploadHandler(IClientAPI pRemoteClient, string pClientFilename) { - Initialise(UUID.Zero, pClientFilename); + Initialize(UUID.Zero, pClientFilename); } public XferUploadHandler(IClientAPI pRemoteClient, UUID fileID) { - Initialise(fileID, String.Empty); + Initialize(fileID, String.Empty); } - private void Initialise(UUID fileID, string fileName) + private void Initialize(UUID fileID, string fileName) { m_asset = new AssetBase(fileID, fileName, type, UUID.Zero.ToString()); m_asset.Data = new byte[0]; diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 3838cf92..2fc53218 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -55,7 +55,7 @@ public LLUDPServerShim() { } - public void Initialise(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource) + public void Initialize(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource) { m_udpServer = new LLUDPServer(listenIP, ref port, proxyPortOffsetParm, allow_alternate_port, configSource); } diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs b/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs index ca24deb9..692e386e 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs @@ -76,9 +76,9 @@ public OGS1UserDataPlugin(CommunicationsManager commsManager, ConfigSettings set public string Version { get { return "0.1"; } } public string Name { get { return "Open Grid Services 1 (OGS1) User Data Plugin"; } } - public void Initialise() {} + public void Initialize() {} - public void Initialise(string connect) {} + public void Initialize(string connect) {} public void Dispose() {} diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs index ecdbae3f..d171c07e 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs @@ -63,11 +63,11 @@ public AssetTransactionModule() #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID)) { - // m_log.Debug("initialising AgentAssetTransactionModule"); + // m_log.Debug("initializing AgentAssetTransactionModule"); RegisteredScenes.Add(scene.RegionInfo.RegionID, scene); scene.RegisterModuleInterface(this); @@ -93,7 +93,7 @@ public void Initialise(Scene scene, IConfigSource config) } } - public void PostInitialise() + public void PostInitialize() { } @@ -266,10 +266,10 @@ public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID t remoteClient.SendAgentAlertMessage("Server error uploading asset. Could not allocate uploader.", false); return; } -// m_log.Debug("HandleUDPUploadRequest(Initialise) - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile); +// m_log.Debug("HandleUDPUploadRequest(Initialize) - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile); // Okay, start the upload. - uploader.Initialise(remoteClient, assetID, transaction, type, data, storeLocal, tempFile); + uploader.Initialize(remoteClient, assetID, transaction, type, data, storeLocal, tempFile); } /// diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs index c885b9df..a1aac897 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs @@ -149,13 +149,13 @@ public bool HandleXferPacket(ulong xferID, uint packetID, byte[] data) } /// - /// Initialise asset transfer from the client + /// Initialize asset transfer from the client /// /// /// /// /// True if the transfer is complete, false otherwise - public bool Initialise(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, byte[] data, bool storeLocal, bool tempFile) + public bool Initialize(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, byte[] data, bool storeLocal, bool tempFile) { ourClient = remoteClient; m_asset = new AssetBase(); diff --git a/OpenSim/Region/CoreModules/Agent/BotManager/BotManager.cs b/OpenSim/Region/CoreModules/Agent/BotManager/BotManager.cs index 5a5c1559..84be90e0 100644 --- a/OpenSim/Region/CoreModules/Agent/BotManager/BotManager.cs +++ b/OpenSim/Region/CoreModules/Agent/BotManager/BotManager.cs @@ -60,7 +60,7 @@ public class BotManager : IRegionModule, IBotManager #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { scene.RegisterModuleInterface(this); m_scene = scene; @@ -73,7 +73,7 @@ public void Initialise(Scene scene, IConfigSource source) } } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs index 0872097b..038cfb8b 100644 --- a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs +++ b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs @@ -45,7 +45,7 @@ public class IPBanModule : IRegionModule private List m_bans = new List(); - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { new SceneBanner(scene, m_bans); @@ -61,7 +61,7 @@ public void Initialise(Scene scene, IConfigSource source) } } - public void PostInitialise() + public void PostInitialize() { if(File.Exists("bans.txt")) { diff --git a/OpenSim/Region/CoreModules/Agent/SceneView/SceneView.cs b/OpenSim/Region/CoreModules/Agent/SceneView/SceneView.cs index da04776d..6014d6f7 100644 --- a/OpenSim/Region/CoreModules/Agent/SceneView/SceneView.cs +++ b/OpenSim/Region/CoreModules/Agent/SceneView/SceneView.cs @@ -81,7 +81,7 @@ public Type ReplaceableInterface get { return null; } } - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { IConfig config = source.Configs["SceneView"]; if (config != null) @@ -714,7 +714,7 @@ public void SendPrimUpdates() { NeedsFullSceneUpdate = false; if (UseCulling == false)//Send the entire heightmap - m_presence.ControllingClient.SendLayerData(m_presence.Scene.Heightmap.GetFloatsSerialised()); + m_presence.ControllingClient.SendLayerData(m_presence.Scene.Heightmap.GetFloatsSerialized()); if (UseCulling == true && !m_presence.IsChildAgent) m_timeBeforeChildAgentUpdate = Environment.TickCount; @@ -1019,14 +1019,14 @@ public void SendKillObjects(SceneObjectGroup grp, List localIds) /// /// Informs the SceneView that the given patch has been modified and must be resent /// - /// + /// /// /// - public void TerrainPatchUpdated(float[] serialised, int x, int y) + public void TerrainPatchUpdated(float[] serialized, int x, int y) { //Check to make sure that we only send it if we can see it or culling is disabled if ((UseCulling == false) || ShowTerrainPatchToClient(x, y)) - m_presence.ControllingClient.SendLayerData(x, y, serialised); + m_presence.ControllingClient.SendLayerData(x, y, serialized); else if (UseCulling == true) m_TerrainCulling[x, y] = false;//Resend it next time it comes back into draw distance } @@ -1047,7 +1047,7 @@ private void CheckForDistantTerrainToShow() (((int)(m_presence.CameraPosition.X + m_presence.DrawDistance)) / Constants.TerrainPatchSize) + FUDGE_FACTOR); int endY = Math.Max((((int)(m_presence.AbsolutePosition.Y + m_presence.DrawDistance)) / Constants.TerrainPatchSize) + FUDGE_FACTOR, (((int)(m_presence.CameraPosition.Y + m_presence.DrawDistance)) / Constants.TerrainPatchSize) + FUDGE_FACTOR); - float[] serializedMap = m_presence.Scene.Heightmap.GetFloatsSerialised(); + float[] serializedMap = m_presence.Scene.Heightmap.GetFloatsSerialized(); if (startX < 0) startX = 0; if (startY < 0) startY = 0; diff --git a/OpenSim/Region/CoreModules/Agent/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/CoreModules/Agent/TextureDownload/TextureDownloadModule.cs index 2724c55b..7423c946 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureDownload/TextureDownloadModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureDownload/TextureDownloadModule.cs @@ -68,7 +68,7 @@ public TextureDownloadModule() #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { if (m_scene == null) { @@ -90,7 +90,7 @@ public void Initialise(Scene scene, IConfigSource config) } } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/CSJ2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/CSJ2KDecoderModule.cs index 7654bdad..5b371012 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/CSJ2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/CSJ2KDecoderModule.cs @@ -64,7 +64,7 @@ public CSJ2KDecoderModule() public string Name { get { return "CSJ2KDecoderModule"; } } public bool IsSharedModule { get { return true; } } - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { if (m_scene == null) m_scene = scene; @@ -92,7 +92,7 @@ public void Initialise(Scene scene, IConfigSource source) scene.RegisterModuleInterface(this); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs index ff890eea..0b743eac 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs @@ -63,7 +63,7 @@ public J2KDecoderModule() { } - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { bool useFileCache = true; IConfig myConfig = source.Configs["J2KDecoder"]; @@ -83,7 +83,7 @@ public void Initialise(Scene scene, IConfigSource source) scene.RegisterModuleInterface(this); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs index 34dc785e..e6dda475 100644 --- a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs +++ b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs @@ -58,7 +58,7 @@ private class FileData #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { m_scene = scene; m_scene.EventManager.OnNewClient += NewClient; @@ -70,7 +70,7 @@ public void Initialise(Scene scene, IConfigSource config) _timeoutTimer.Start(); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs index d02458eb..43dc0401 100644 --- a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs @@ -59,7 +59,7 @@ public Type ReplaceableInterface get { return null; } } - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { IConfig moduleConfig = source.Configs["Modules"]; if (moduleConfig != null) @@ -83,7 +83,7 @@ public void Initialise(IConfigSource source) } } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index fa90d865..551132e6 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -321,7 +321,7 @@ private AvatarAppearance CreateDefault(UUID avatarId) return (new AvatarAppearance(avatarId)); } - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { scene.RegisterModuleInterface(this); scene.EventManager.OnNewClient += NewClient; @@ -342,7 +342,7 @@ public void Initialise(Scene scene, IConfigSource source) _appearanceUpdateTimer.Start(); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index 2dfb2260..d5c381e1 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs @@ -53,7 +53,7 @@ public class ChatModule : IRegionModule, IChatModule internal object m_syncInit = new object(); #region IRegionModule Members - public virtual void Initialise(Scene scene, IConfigSource config) + public virtual void Initialize(Scene scene, IConfigSource config) { // wrap this in a try block so that defaults will work if // the config file doesn't specify otherwise. @@ -86,7 +86,7 @@ public virtual void Initialise(Scene scene, IConfigSource config) m_whisperdistance, m_saydistance, m_shoutdistance); } - public virtual void PostInitialise() + public virtual void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 06505c6a..155ad625 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs @@ -52,7 +52,7 @@ public class CombatModule : IRegionModule /// /// /// - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { lock (m_scenel) { @@ -69,7 +69,7 @@ public void Initialise(Scene scene, IConfigSource config) scene.EventManager.OnAvatarKilled += KillAvatar; } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Avatar/Currency/AvatarCurrency.cs b/OpenSim/Region/CoreModules/Avatar/Currency/AvatarCurrency.cs index d378ed58..874991f0 100644 --- a/OpenSim/Region/CoreModules/Avatar/Currency/AvatarCurrency.cs +++ b/OpenSim/Region/CoreModules/Avatar/Currency/AvatarCurrency.cs @@ -100,7 +100,7 @@ public class AvatarCurrency : IMoneyModule, IRegionModule public event ObjectPaid OnObjectPaid; - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { IConfig economyConfig = config.Configs["Economy"]; // Adding the line from Profile in order to get the connection string @@ -284,7 +284,7 @@ public UUID ApplyCharge(UUID agentID, int transCode, int transAmount, string tra return transID; } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs index 69fbb9b6..f31b7dbf 100644 --- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs @@ -42,7 +42,7 @@ public class DialogModule : IRegionModule, IDialogModule protected Scene m_scene; - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { m_scene = scene; m_scene.RegisterModuleInterface(this); @@ -54,7 +54,7 @@ public void Initialise(Scene scene, IConfigSource source) this, "alert general", "alert general ", "Send an alert to everyone", HandleAlertConsoleCommand); } - public void PostInitialise() {} + public void PostInitialize() {} public void Close() {} public string Name { get { return "Dialog Module"; } } public bool IsSharedModule { get { return false; } } diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 6dc9d075..d1ce4a70 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -121,7 +121,7 @@ public Transaction(UUID agentID, string agentName) #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { IConfig profileConfig = config.Configs["Profile"]; @@ -157,7 +157,7 @@ public void Initialise(Scene scene, IConfigSource config) scene.EventManager.OnClientClosed += ClientClosed; } - public void PostInitialise() + public void PostInitialize() { if (m_scenes.Count > 0) { diff --git a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs index 9be67af2..323cc07f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs @@ -44,14 +44,14 @@ public class GesturesModule : IRegionModule protected Scene m_scene; - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { m_scene = scene; m_scene.EventManager.OnNewClient += OnNewClient; } - public void PostInitialise() {} + public void PostInitialize() {} public void Close() {} public string Name { get { return "Gestures Module"; } } public bool IsSharedModule { get { return false; } } diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs index b06ff93a..a9d4209f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs @@ -39,14 +39,14 @@ public class GodsModule : IRegionModule, IGodsModule protected Scene m_scene; protected IDialogModule m_dialogModule; - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { m_scene = scene; m_dialogModule = m_scene.RequestModuleInterface(); m_scene.RegisterModuleInterface(this); } - public void PostInitialise() {} + public void PostInitialize() {} public void Close() {} public string Name { get { return "Gods Module"; } } public bool IsSharedModule { get { return false; } } diff --git a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs index fa67134f..4bb94aeb 100644 --- a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs @@ -57,7 +57,7 @@ public class GroupsModule : IRegionModule #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { IConfig groupsConfig = config.Configs["Groups"]; @@ -99,7 +99,7 @@ public void Initialise(Scene scene, IConfigSource config) scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs index b8d05679..34b8f4ff 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs @@ -51,7 +51,7 @@ public class InstantMessageModule : IRegionModule private IMessageTransferModule m_TransferModule = null; - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { if (config.Configs["Messaging"] != null) { @@ -83,7 +83,7 @@ void OnClientConnect(IClientCore client) } } - public void PostInitialise() + public void PostInitialize() { if (!m_enabled) return; diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index 9e3473f3..26ec22cd 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs @@ -54,7 +54,7 @@ public class MessageTransferModule : IRegionModule, IMessageTransferModule private int m_DebugLevel = 0; - public virtual void Initialise(Scene scene, IConfigSource config) + public virtual void Initialize(Scene scene, IConfigSource config) { IConfig cnf = config.Configs["Messaging"]; if (cnf != null) @@ -87,7 +87,7 @@ public virtual void Initialise(Scene scene, IConfigSource config) } } - public virtual void PostInitialise() + public virtual void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs index c7778bf7..64af9fc8 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs @@ -69,7 +69,7 @@ public MuteListEntry(int type, string name, uint flags) }; Dictionary> MuteListCache = new Dictionary>(); - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { if (!enabled) return; @@ -113,7 +113,7 @@ public void Initialise(Scene scene, IConfigSource config) } } - public void PostInitialise() + public void PostInitialize() { if (!enabled) return; diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index 0e46eebe..29e30713 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs @@ -58,7 +58,7 @@ public class OfflineMessageModule : IRegionModule private List m_SceneList = new List(); private string m_RestURL = String.Empty; - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { if (!enabled) return; @@ -96,7 +96,7 @@ public void Initialise(Scene scene, IConfigSource config) } } - public void PostInitialise() + public void PostInitialize() { if (!enabled) return; diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs index caa75d65..421edc48 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs @@ -55,11 +55,11 @@ public class PresenceModule : IRegionModule, IPresenceModule public event PresenceChange OnPresenceChange; public event BulkPresenceData OnBulkPresenceData; - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { lock (m_Scenes) { - // This is a shared module; Initialise will be called for every region on this server. + // This is a shared module; Initialize will be called for every region on this server. // Only check config once for the first region. if (m_Scenes.Count == 0) { @@ -89,7 +89,7 @@ public void Initialise(Scene scene, IConfigSource config) scene.EventManager.OnMakeChildAgent += OnMakeChildAgent; } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 4485ce23..2a7eb991 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs @@ -323,7 +323,7 @@ int identicalNameIdentifierIndex /// true if asset was successfully loaded, false otherwise private bool LoadAsset(string assetPath, byte[] data) { - //IRegionSerialiser serialiser = scene.RequestModuleInterface(); + //IRegionSerializer serializer = scene.RequestModuleInterface(); // Right now we're nastily obtaining the UUID from the filename string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length); int i = filename.LastIndexOf(ArchiveConstants.ASSET_EXTENSION_SEPARATOR); diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index aa65fdd5..9d3a834b 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs @@ -68,7 +68,7 @@ public class InventoryArchiverModule : IRegionModule, IInventoryArchiverModule /// protected internal CommunicationsManager CommsManager; - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { if (m_scenes.Count == 0) { @@ -90,7 +90,7 @@ public void Initialise(Scene scene, IConfigSource source) m_scenes[scene.RegionInfo.RegionID] = scene; } - public void PostInitialise() {} + public void PostInitialize() {} public void Close() {} diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 3eb28d9a..e8571aa7 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs @@ -52,7 +52,7 @@ private static readonly ILog m_log #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { if (config.Configs["Messaging"] != null) { @@ -85,7 +85,7 @@ public void Initialise(Scene scene, IConfigSource config) } } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs index 3d38f82c..9b7c9e2a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs @@ -45,7 +45,7 @@ public class LureModule : IRegionModule private IMessageTransferModule m_TransferModule = null; - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { if (config.Configs["Messaging"] != null) { @@ -74,7 +74,7 @@ void OnNewClient(IClientAPI client) client.OnTeleportLureRequest += OnTeleportLureRequest; } - public void PostInitialise() + public void PostInitialize() { m_TransferModule = m_scenes[0].RequestModuleInterface(); diff --git a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs index adf2c527..c3bb7ee3 100644 --- a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs @@ -49,13 +49,13 @@ public AvatarProfilesModule() #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { m_scene = scene; m_scene.EventManager.OnNewClient += NewClient; } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Avatar/Search/AvatarSearchModule.cs b/OpenSim/Region/CoreModules/Avatar/Search/AvatarSearchModule.cs index 72e27538..bd6c53d4 100644 --- a/OpenSim/Region/CoreModules/Avatar/Search/AvatarSearchModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Search/AvatarSearchModule.cs @@ -108,7 +108,7 @@ public class AvatarSearchModule : IRegionModule private const uint STATUS_SEARCH_CLASSIFIEDS_FOUNDNONE = 0x1 << 2; private const uint STATUS_SEARCH_CLASSIFIEDS_SEARCHDISABLED = 0x1 << 3; - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { if (!m_Enabled) return; @@ -359,7 +359,7 @@ private string[] CheckAndRetrieveRdbHostList(ISimpleDB coreDb) } // NOTE: END OF RDB-related code copied in LandManagementModule (for now). - public void PostInitialise() + public void PostInitialize() { if (!m_Enabled) return; diff --git a/OpenSim/Region/CoreModules/Capabilities/AssetCapsModule.cs b/OpenSim/Region/CoreModules/Capabilities/AssetCapsModule.cs index 424e99c4..beec2c80 100644 --- a/OpenSim/Region/CoreModules/Capabilities/AssetCapsModule.cs +++ b/OpenSim/Region/CoreModules/Capabilities/AssetCapsModule.cs @@ -77,7 +77,7 @@ public Type ReplaceableInterface get { return null; } } - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { m_useAperture = false; IConfig startupConfig = source.Configs["Startup"]; @@ -354,7 +354,7 @@ public string UploadBakedTexture( LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse(); uploadResponse.uploader = uploaderURL; uploadResponse.state = "upload"; - return LLSDHelpers.SerialiseLLSDReply(uploadResponse); + return LLSDHelpers.SerializeLLSDReply(uploadResponse); } catch (Exception e) { @@ -407,7 +407,7 @@ public string BakedTextureUploaded(byte[] data, string path, string param) Hashtable badReply = new Hashtable(); badReply["state"] = "error"; badReply["new_asset"] = UUID.Zero; - result = LLSDHelpers.SerialiseLLSDReply(badReply); + result = LLSDHelpers.SerializeLLSDReply(badReply); } else { @@ -423,7 +423,7 @@ public string BakedTextureUploaded(byte[] data, string path, string param) uploadComplete.new_inventory_item = UUID.Zero; uploadComplete.state = "complete"; - result = LLSDHelpers.SerialiseLLSDReply(uploadComplete); + result = LLSDHelpers.SerializeLLSDReply(uploadComplete); // m_log.DebugFormat("[BAKED TEXTURE UPLOADER]: baked texture upload completed for {0}", newAssetID); } diff --git a/OpenSim/Region/CoreModules/Capabilities/AssortedCapsModule.cs b/OpenSim/Region/CoreModules/Capabilities/AssortedCapsModule.cs index de5177b4..77547048 100644 --- a/OpenSim/Region/CoreModules/Capabilities/AssortedCapsModule.cs +++ b/OpenSim/Region/CoreModules/Capabilities/AssortedCapsModule.cs @@ -59,7 +59,7 @@ public Type ReplaceableInterface get { return null; } } - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { } diff --git a/OpenSim/Region/CoreModules/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Capabilities/CapabilitiesModule.cs index 7da5183d..8f460d04 100644 --- a/OpenSim/Region/CoreModules/Capabilities/CapabilitiesModule.cs +++ b/OpenSim/Region/CoreModules/Capabilities/CapabilitiesModule.cs @@ -62,7 +62,7 @@ public class CapabilitiesModule : INonSharedRegionModule, ICapabilitiesModule private object m_syncRoot = new object(); - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { } @@ -89,7 +89,7 @@ public void RemoveRegion(Scene scene) m_scene.UnregisterModuleInterface(this); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Capabilities/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/CoreModules/Capabilities/EventQueue/EventQueueGetModule.cs index c3c512b8..789c6681 100644 --- a/OpenSim/Region/CoreModules/Capabilities/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/CoreModules/Capabilities/EventQueue/EventQueueGetModule.cs @@ -67,7 +67,7 @@ public class EventQueueGetModule : IEventQueue, INonSharedRegionModule #region INonSharedRegionModule methods - public virtual void Initialise(IConfigSource config) + public virtual void Initialize(IConfigSource config) { MainConsole.Instance.Commands.AddCommand( "Comms", @@ -80,7 +80,7 @@ public virtual void Initialise(IConfigSource config) HandleDebugEq); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Capabilities/GroupCapsModule.cs b/OpenSim/Region/CoreModules/Capabilities/GroupCapsModule.cs index a9aa2910..2d40f12a 100644 --- a/OpenSim/Region/CoreModules/Capabilities/GroupCapsModule.cs +++ b/OpenSim/Region/CoreModules/Capabilities/GroupCapsModule.cs @@ -53,7 +53,7 @@ public class GroupCapsModule : INonSharedRegionModule private Scene m_scene; protected IGroupsModule m_groupService; - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { } @@ -87,7 +87,7 @@ public Type ReplaceableInterface get { return null; } } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Capabilities/InventoryCapsModule.cs b/OpenSim/Region/CoreModules/Capabilities/InventoryCapsModule.cs index 659070a2..9bd52e65 100644 --- a/OpenSim/Region/CoreModules/Capabilities/InventoryCapsModule.cs +++ b/OpenSim/Region/CoreModules/Capabilities/InventoryCapsModule.cs @@ -88,7 +88,7 @@ public Type ReplaceableInterface get { return null; } } - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { } @@ -113,7 +113,7 @@ public void RegionLoaded(Scene scene) m_Scene.EventManager.OnDeregisterCaps += OnDeregisterCaps; } - public void PostInitialise() + public void PostInitialize() { } @@ -269,7 +269,7 @@ public string ScriptTaskInventory( Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request)); LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate(); - LLSDHelpers.DeserialiseOSDMap(hash, llsdUpdateRequest); + LLSDHelpers.DeserializeOSDMap(hash, llsdUpdateRequest); TaskInventoryScriptUpdater uploader = new TaskInventoryScriptUpdater( @@ -288,9 +288,9 @@ public string ScriptTaskInventory( uploadResponse.uploader = uploaderURL; uploadResponse.state = "upload"; - // m_log.InfoFormat("[CAPS]: " +"ScriptTaskInventory response: {0}", LLSDHelpers.SerialiseLLSDReply(uploadResponse))); + // m_log.InfoFormat("[CAPS]: " +"ScriptTaskInventory response: {0}", LLSDHelpers.SerializeLLSDReply(uploadResponse))); - return LLSDHelpers.SerialiseLLSDReply(uploadResponse); + return LLSDHelpers.SerializeLLSDReply(uploadResponse); } catch (Exception e) @@ -329,7 +329,7 @@ public string NoteCardAgentInventory(string request, string path, string param, //OpenMetaverse.StructuredData.OSDMap hash = (OpenMetaverse.StructuredData.OSDMap)OpenMetaverse.StructuredData.LLSDParser.DeserializeBinary(Utils.StringToBytes(request)); Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request)); LLSDItemUpdate llsdRequest = new LLSDItemUpdate(); - LLSDHelpers.DeserialiseOSDMap(hash, llsdRequest); + LLSDHelpers.DeserializeOSDMap(hash, llsdRequest); string capsBase = m_Caps.CapsBase; string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); @@ -348,9 +348,9 @@ public string NoteCardAgentInventory(string request, string path, string param, // m_log.InfoFormat("[CAPS]: " + // "NoteCardAgentInventory response: {0}", - // LLSDHelpers.SerialiseLLSDReply(uploadResponse))); + // LLSDHelpers.SerializeLLSDReply(uploadResponse))); - return LLSDHelpers.SerialiseLLSDReply(uploadResponse); + return LLSDHelpers.SerializeLLSDReply(uploadResponse); } /// @@ -1227,7 +1227,7 @@ public string FetchInventoryRequest(string request, string path, string param, O } } - reply = LLSDHelpers.SerialiseLLSDReply(llsdReply); + reply = LLSDHelpers.SerializeLLSDReply(llsdReply); return reply; } @@ -1265,7 +1265,7 @@ public string FetchLibraryRequest(string request, string path, string param, OSH } } - reply = LLSDHelpers.SerialiseLLSDReply(llsdReply); + reply = LLSDHelpers.SerializeLLSDReply(llsdReply); return reply; } @@ -1286,7 +1286,7 @@ public string CopyInventoryFromNotecard(string request, string path, string para IClientAPI client = null; m_Scene.TryGetClient(m_Caps.AgentID, out client); if (client == null) - return LLSDHelpers.SerialiseLLSDReply(response); + return LLSDHelpers.SerializeLLSDReply(response); try { @@ -1363,7 +1363,7 @@ public string CopyInventoryFromNotecard(string request, string path, string para // m_log.InfoFormat("[CAPS]: CopyInventoryFromNotecard, ItemID:{0}, FolderID:{1}", copyItem.ID, copyItem.Folder); client.SendInventoryItemCreateUpdate(item,0); response["int_response_code"] = 200; - return LLSDHelpers.SerialiseLLSDReply(response); + return LLSDHelpers.SerializeLLSDReply(response); } } } @@ -1375,7 +1375,7 @@ public string CopyInventoryFromNotecard(string request, string path, string para // Failure case client.SendAlertMessage("Failed to retrieve item"); - return LLSDHelpers.SerialiseLLSDReply(response); + return LLSDHelpers.SerializeLLSDReply(response); } @@ -1415,7 +1415,7 @@ public string CreateInventoryCategory(string request, string path, string param, "[CAPS/INVENTORY] Could not create requested folder {0} in parent {1}: {2}", folder_id, m_Caps.AgentID, e); } - return LLSDHelpers.SerialiseLLSDReply(response); + return LLSDHelpers.SerializeLLSDReply(response); } /// @@ -1501,7 +1501,7 @@ public string uploaderCaps(byte[] data, string path, string param) uploadComplete.new_inventory_item = inv; uploadComplete.state = "complete"; - res = LLSDHelpers.SerialiseLLSDReply(uploadComplete); + res = LLSDHelpers.SerializeLLSDReply(uploadComplete); httpListener.RemoveStreamHandler("POST", uploaderPath); @@ -1569,7 +1569,7 @@ public string uploaderCaps(byte[] data, string path, string param) compFail.errors.Array.Add(str); } - res = LLSDHelpers.SerialiseLLSDReply(compFail); + res = LLSDHelpers.SerializeLLSDReply(compFail); } else { @@ -1578,7 +1578,7 @@ public string uploaderCaps(byte[] data, string path, string param) compSuccess.new_inventory_item = inv; compSuccess.state = "complete"; - res = LLSDHelpers.SerialiseLLSDReply(compSuccess); + res = LLSDHelpers.SerializeLLSDReply(compSuccess); } } else @@ -1588,7 +1588,7 @@ public string uploaderCaps(byte[] data, string path, string param) uploadComplete.new_inventory_item = inv; uploadComplete.state = "complete"; - res = LLSDHelpers.SerialiseLLSDReply(uploadComplete); + res = LLSDHelpers.SerializeLLSDReply(uploadComplete); } httpListener.RemoveStreamHandler("POST", uploaderPath); @@ -1666,7 +1666,7 @@ public string uploaderCaps(byte[] data, string path, string param) compFail.errors.Array.Add(str); } - res = LLSDHelpers.SerialiseLLSDReply(compFail); + res = LLSDHelpers.SerializeLLSDReply(compFail); } else { @@ -1674,7 +1674,7 @@ public string uploaderCaps(byte[] data, string path, string param) compSuccess.new_asset = response.AssetId.ToString(); compSuccess.state = "complete"; - res = LLSDHelpers.SerialiseLLSDReply(compSuccess); + res = LLSDHelpers.SerializeLLSDReply(compSuccess); } } else @@ -1683,7 +1683,7 @@ public string uploaderCaps(byte[] data, string path, string param) uploadComplete.new_asset = response.AssetId.ToString(); uploadComplete.state = "complete"; - res = LLSDHelpers.SerialiseLLSDReply(uploadComplete); + res = LLSDHelpers.SerializeLLSDReply(uploadComplete); } httpListener.RemoveStreamHandler("POST", uploaderPath); diff --git a/OpenSim/Region/CoreModules/Capabilities/MeshUploadFlagModule.cs b/OpenSim/Region/CoreModules/Capabilities/MeshUploadFlagModule.cs index 316c8ae7..cb7e25fe 100644 --- a/OpenSim/Region/CoreModules/Capabilities/MeshUploadFlagModule.cs +++ b/OpenSim/Region/CoreModules/Capabilities/MeshUploadFlagModule.cs @@ -63,7 +63,7 @@ public MeshUploadFlagModule() Enabled = false; } - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { IConfig config = source.Configs["Mesh"]; if (config == null) @@ -93,7 +93,7 @@ public void RegionLoaded(Scene s) { } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Capabilities/ObjectAddModule.cs b/OpenSim/Region/CoreModules/Capabilities/ObjectAddModule.cs index 5606ece9..565e5bbb 100644 --- a/OpenSim/Region/CoreModules/Capabilities/ObjectAddModule.cs +++ b/OpenSim/Region/CoreModules/Capabilities/ObjectAddModule.cs @@ -48,13 +48,13 @@ public class ObjectAddModule : IRegionModule #region IRegionModule Members - public void Initialise(Scene pScene, IConfigSource pSource) + public void Initialize(Scene pScene, IConfigSource pSource) { m_scene = pScene; m_scene.EventManager.OnRegisterCaps += RegisterCaps; } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Capabilities/RegionConsoleModule.cs b/OpenSim/Region/CoreModules/Capabilities/RegionConsoleModule.cs index 359a9aab..28fa0624 100644 --- a/OpenSim/Region/CoreModules/Capabilities/RegionConsoleModule.cs +++ b/OpenSim/Region/CoreModules/Capabilities/RegionConsoleModule.cs @@ -56,7 +56,7 @@ public ICommands Commands get { return m_commands; } } - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { m_commands.AddCommand("Help", false, "help", "help []", "Display help on a particular command or on a list of commands in a category", Help); @@ -119,7 +119,7 @@ public void AddCommand(string module, bool shared, string command, string help, m_commands.AddCommand(module, shared, command, help, longhelp, fn); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Capabilities/SeedCapModule.cs b/OpenSim/Region/CoreModules/Capabilities/SeedCapModule.cs index 2dbd409a..16eb4898 100644 --- a/OpenSim/Region/CoreModules/Capabilities/SeedCapModule.cs +++ b/OpenSim/Region/CoreModules/Capabilities/SeedCapModule.cs @@ -60,7 +60,7 @@ public class SeedCapModule : ISharedRegionModule #region ISharedRegionModule Members - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { } @@ -79,7 +79,7 @@ public void RegionLoaded(Scene s) { } - public void PostInitialise() + public void PostInitialize() { } @@ -136,7 +136,7 @@ public string SeedCapRequest(string request, string path, string param, Hashtable capsDetails = m_Caps.CapsHandlers.GetCapsDetails(true); - string result = LLSDHelpers.SerialiseLLSDReply(capsDetails); + string result = LLSDHelpers.SerializeLLSDReply(capsDetails); // m_log.DebugFormat("[CAPS] CapsRequest {0}", result); diff --git a/OpenSim/Region/CoreModules/Capabilities/SimulatorFeaturesModule.cs b/OpenSim/Region/CoreModules/Capabilities/SimulatorFeaturesModule.cs index 3fbb7a58..e850af54 100644 --- a/OpenSim/Region/CoreModules/Capabilities/SimulatorFeaturesModule.cs +++ b/OpenSim/Region/CoreModules/Capabilities/SimulatorFeaturesModule.cs @@ -79,7 +79,7 @@ public class SimulatorFeaturesModule : ISharedRegionModule, ISimulatorFeaturesMo private int m_shoutdistance = 100; #region ISharedRegionModule Members - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { IConfig config = source.Configs["SimulatorFeatures"]; if (config != null) @@ -127,7 +127,7 @@ public void RegionLoaded(Scene s) { } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Plus/PlusModule.cs b/OpenSim/Region/CoreModules/Plus/PlusModule.cs index dea5ac26..e99cc994 100644 --- a/OpenSim/Region/CoreModules/Plus/PlusModule.cs +++ b/OpenSim/Region/CoreModules/Plus/PlusModule.cs @@ -105,11 +105,11 @@ public enum PlusModuleResponse #region INonSharedRegionModule members - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index accd3e8e..3b049445 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs @@ -186,7 +186,7 @@ public void GetDrawStringSize(string contentType, string text, string fontName, #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID)) { @@ -195,7 +195,7 @@ public void Initialise(Scene scene, IConfigSource config) } } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs b/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs index 3fde259f..382b8346 100644 --- a/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs @@ -67,7 +67,7 @@ public class EmailModule : IEmailModule private bool m_Enabled = false; - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { m_Config = config; IConfig SMTPConfig; @@ -133,7 +133,7 @@ public void Initialise(Scene scene, IConfigSource config) } } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Scripting/EMailModules/GetEmailModule.cs b/OpenSim/Region/CoreModules/Scripting/EMailModules/GetEmailModule.cs index 7e0c6241..0671d895 100644 --- a/OpenSim/Region/CoreModules/Scripting/EMailModules/GetEmailModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/EMailModules/GetEmailModule.cs @@ -91,7 +91,7 @@ public void InsertEmail(UUID to, Email email) } } - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { m_Config = config; IConfig SMTPConfig; @@ -167,7 +167,7 @@ public void Initialise(Scene scene, IConfigSource config) } } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index bfae90b1..d16be1f2 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs @@ -171,7 +171,7 @@ public HttpRequestModule() #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { m_scene = scene; m_scene.RegisterModuleInterface(this); @@ -210,7 +210,7 @@ public void Initialise(Scene scene, IConfigSource config) HttpRequestConsoleCommand); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index 0e270393..124c350b 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs @@ -89,14 +89,14 @@ public string Name get { return "UrlModule"; } } - public void Initialise(IConfigSource config) + public void Initialize(IConfigSource config) { bool ssl_enabled = config.Configs["Network"].GetBoolean("http_listener_ssl", false); if (ssl_enabled) https_port = (uint)config.Configs["Network"].GetInt("http_listener_sslport", ((int)ConfigSettings.DefaultRegionHttpPort + 1)); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs index 0296c8de..e8a6abd3 100644 --- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs @@ -99,7 +99,7 @@ public void GetDrawStringSize(string text, string fontName, int fontSize, #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { if (m_scene == null) { @@ -110,7 +110,7 @@ public void Initialise(Scene scene, IConfigSource config) m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions"); } - public void PostInitialise() + public void PostInitialize() { m_textureManager = m_scene.RequestModuleInterface(); if (m_textureManager != null) diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index cfc96e44..da629f33 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs @@ -111,7 +111,7 @@ public void GetDrawStringSize(string text, string fontName, int fontSize, #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { if (m_scene == null) { @@ -119,7 +119,7 @@ public void Initialise(Scene scene, IConfigSource config) } } - public void PostInitialise() + public void PostInitialize() { m_textureManager = m_scene.RequestModuleInterface(); if (m_textureManager != null) diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs index df97a533..485820f6 100644 --- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs @@ -101,7 +101,7 @@ public class WorldCommModule : IRegionModule, IWorldComm private WorkArrivedDelegate _workArrivedDelegate; #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { // wrap this in a try block so that defaults will work if // the config file doesn't specify otherwise. @@ -128,7 +128,7 @@ public void Initialise(Scene scene, IConfigSource config) m_pending = Queue.Synchronized(m_pendingQ); } - public void PostInitialise() + public void PostInitialize() { } @@ -681,15 +681,15 @@ public class ListenerInfo: IWorldCommListenerInfo public ListenerInfo(int handle, uint localID, UUID ItemID, UUID hostID, int channel, string name, UUID id, string message) { - Initialise(handle, localID, ItemID, hostID, channel, name, id, message); + Initialize(handle, localID, ItemID, hostID, channel, name, id, message); } public ListenerInfo(ListenerInfo li, string name, UUID id, string message) { - Initialise(li.m_handle, li.m_localID, li.m_itemID, li.m_hostID, li.m_channel, name, id, message); + Initialize(li.m_handle, li.m_localID, li.m_itemID, li.m_hostID, li.m_channel, name, id, message); } - private void Initialise(int handle, uint localID, UUID ItemID, UUID hostID, int channel, string name, + private void Initialize(int handle, uint localID, UUID ItemID, UUID hostID, int channel, string name, UUID id, string message) { m_active = true; diff --git a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs index 4e3df847..e71c1146 100644 --- a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs @@ -96,7 +96,7 @@ public class XMLRPCModule : IRegionModule, IXMLRPC #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { // We need to create these early because the scripts might be calling // But since this gets called for every region, we need to make sure they @@ -125,7 +125,7 @@ public void Initialise(Scene scene, IConfigSource config) } } - public void PostInitialise() + public void PostInitialize() { if (IsEnabled()) { diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/LocalInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/LocalInterregionComms.cs index 24579f5d..68b5f2d4 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/LocalInterregionComms.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/LocalInterregionComms.cs @@ -50,7 +50,7 @@ public class LocalInterregionComms : IRegionModule, IInterregionCommsOut, IInter #region IRegionModule - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { if (m_sceneList.Count == 0) { @@ -69,7 +69,7 @@ public void Initialise(Scene scene, IConfigSource config) Init(scene); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs index a95e2e00..9d1fc8aa 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs @@ -69,14 +69,14 @@ public class RESTInterregionComms : IRegionModule, IInterregionCommsOut #region IRegionModule - public void Initialise_Unittest(Scene scene) + public void Initialize_Unittest(Scene scene) { _gridSendKey = "key"; InitOnce(scene); } - public virtual void Initialise(Scene scene, IConfigSource config) + public virtual void Initialize(Scene scene, IConfigSource config) { if (!initialized) { @@ -112,7 +112,7 @@ public virtual void Initialise(Scene scene, IConfigSource config) } - public virtual void PostInitialise() + public virtual void PostInitialize() { if (m_enabled) AddHTTPHandlers(); diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs index 8865808a..1185945c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs @@ -56,7 +56,7 @@ public Type ReplaceableInterface get { return null; } } - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { IConfig moduleConfig = source.Configs["Modules"]; if (moduleConfig != null) @@ -96,7 +96,7 @@ public void Initialise(IConfigSource source) } } - public void PostInitialise() + public void PostInitialize() { if (!m_Enabled) return; diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/User/RemoteUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectors/User/RemoteUserServiceConnector.cs index 1c48af3c..81e8e199 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/User/RemoteUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/User/RemoteUserServiceConnector.cs @@ -47,7 +47,7 @@ public Type ReplaceableInterface get { return null; } } - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { IConfig moduleConfig = source.Configs["Modules"]; if (moduleConfig != null) @@ -60,7 +60,7 @@ public void Initialise(IConfigSource source) } } - public void PostInitialise() + public void PostInitialize() { if (!m_Enabled) return; diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index cedbc53f..34a7da7b 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -125,7 +125,7 @@ private void DearchiveRegion0DotStar() { int successfulAssetRestores = 0; int failedAssetRestores = 0; - List serialisedSceneObjects = new List(); + List serializedSceneObjects = new List(); string filePath = "NONE"; try @@ -145,7 +145,7 @@ private void DearchiveRegion0DotStar() if (filePath.StartsWith(ArchiveConstants.OBJECTS_PATH)) { - serialisedSceneObjects.Add(Encoding.UTF8.GetString(data)); + serializedSceneObjects.Add(Encoding.UTF8.GetString(data)); } else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) { @@ -186,9 +186,9 @@ private void DearchiveRegion0DotStar() } // Reload serialized prims - m_log.InfoFormat("[ARCHIVER]: Preparing {0} scene objects. Please wait.", serialisedSceneObjects.Count); + m_log.InfoFormat("[ARCHIVER]: Preparing {0} scene objects. Please wait.", serializedSceneObjects.Count); - IRegionSerialiserModule serialiser = m_scene.RequestModuleInterface(); + IRegionSerializerModule serializer = m_scene.RequestModuleInterface(); int sceneObjectsLoadedCount = 0; List backupObjects = new List(); @@ -196,12 +196,12 @@ private void DearchiveRegion0DotStar() bool objectFixingFailed = false; - foreach (string serialisedSceneObject in serialisedSceneObjects) + foreach (string serializedSceneObject in serializedSceneObjects) { SceneObjectGroup sceneObject; try { - sceneObject = serialiser.DeserializeGroupFromXml2(serialisedSceneObject); + sceneObject = serializer.DeserializeGroupFromXml2(serializedSceneObject); } catch (Exception e) { @@ -306,7 +306,7 @@ private void DearchiveRegion0DotStar() }); } - m_log.InfoFormat("[ARCHIVER]: Loading {0} scene objects. Please wait.", serialisedSceneObjects.Count); + m_log.InfoFormat("[ARCHIVER]: Loading {0} scene objects. Please wait.", serializedSceneObjects.Count); // sceneObject is the one from backup to restore to the scene foreach (SceneObjectGroup backupObject in backupObjects) @@ -339,7 +339,7 @@ private void DearchiveRegion0DotStar() m_log.InfoFormat("[ARCHIVER]: Restored {0} scene objects to the scene", sceneObjectsLoadedCount); - int ignoredObjects = serialisedSceneObjects.Count - sceneObjectsLoadedCount; + int ignoredObjects = serializedSceneObjects.Count - sceneObjectsLoadedCount; if (ignoredObjects > 0) m_log.WarnFormat("[ARCHIVER]: Ignored {0} scene objects that already existed in the scene", ignoredObjects); diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs index edec2cac..d8300e37 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs @@ -55,7 +55,7 @@ public class ArchiveWriteRequestExecution private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected ITerrainModule m_terrainModule; - protected IRegionSerialiserModule m_serialiser; + protected IRegionSerializerModule m_serializer; protected List m_sceneObjects; protected Scene m_scene; protected TarArchiveWriter m_archiveWriter; @@ -64,14 +64,14 @@ public class ArchiveWriteRequestExecution public ArchiveWriteRequestExecution( List sceneObjects, ITerrainModule terrainModule, - IRegionSerialiserModule serialiser, + IRegionSerializerModule serializer, Scene scene, TarArchiveWriter archiveWriter, Guid requestId) { m_sceneObjects = sceneObjects; m_terrainModule = terrainModule; - m_serialiser = serialiser; + m_serializer = serializer; m_scene = scene; m_archiveWriter = archiveWriter; m_requestId = requestId; @@ -121,7 +121,7 @@ string terrainPath Vector3 position = sceneObject.AbsolutePosition; - string serializedObject = m_serialiser.SaveGroupToXml2(sceneObject); + string serializedObject = m_serializer.SaveGroupToXml2(sceneObject); string filename = string.Format( "{0}{1}_{2:000}-{3:000}-{4:000}__{5}.xml", diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index 77c130d7..a9f23897 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs @@ -217,7 +217,7 @@ ArchiveWriteRequestExecution awre = new ArchiveWriteRequestExecution( sceneObjects, m_scene.RequestModuleInterface(), - m_scene.RequestModuleInterface(), + m_scene.RequestModuleInterface(), m_scene, archiveWriter, m_requestId); diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index 5195c8f8..6a2b2591 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs @@ -50,13 +50,13 @@ public class ArchiverModule : IRegionModule, IRegionArchiverModule public bool IsSharedModule { get { return false; } } - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { m_scene = scene; m_scene.RegisterModuleInterface(this); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs b/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs index de427e1f..56fd6994 100644 --- a/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs +++ b/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs @@ -48,7 +48,7 @@ public class CloudModule : ICloudModule private float m_cloudDensity = 1.0F; private float[] cloudCover = new float[16 * 16]; - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { IConfig cloudConfig = config.Configs["Cloud"]; @@ -76,7 +76,7 @@ public void Initialise(Scene scene, IConfigSource config) } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/World/Environment/EnvironmentModule.cs b/OpenSim/Region/CoreModules/World/Environment/EnvironmentModule.cs index 3a42099a..779046f0 100644 --- a/OpenSim/Region/CoreModules/World/Environment/EnvironmentModule.cs +++ b/OpenSim/Region/CoreModules/World/Environment/EnvironmentModule.cs @@ -57,7 +57,7 @@ public class EnvironmentModule : INonSharedRegionModule, IEnvironmentModule private static readonly string capsBase = "/CAPS/0020/"; #region INonSharedRegionModule - public void Initialise(IConfigSource source) + public void Initialize(IConfigSource source) { m_isEnabled = true; IConfig config = source.Configs["Environment"]; @@ -191,7 +191,7 @@ private string SetEnvironmentSettings(string request, string path, string param, if (!m_scene.Permissions.CanIssueEstateCommand(agentID, false)) { setResponse.fail_reason = "Insufficient estate permissions, settings has not been saved."; - return LLSDHelpers.SerialiseLLSDReply(setResponse); + return LLSDHelpers.SerializeLLSDReply(setResponse); } try @@ -211,7 +211,7 @@ private string SetEnvironmentSettings(string request, string path, string param, setResponse.fail_reason = String.Format("Environment Set for region {0} has failed, settings has not been saved.", caps.RegionName); } - string response = LLSDHelpers.SerialiseLLSDReply(setResponse); + string response = LLSDHelpers.SerializeLLSDReply(setResponse); return response; } } diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 97ae19bd..b83d8529 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs @@ -1144,7 +1144,7 @@ public void SimWideDeletes(IClientAPI client, int flags, UUID targetID) #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { m_scene = scene; m_scene.RegisterModuleInterface(this); @@ -1153,7 +1153,7 @@ public void Initialise(Scene scene, IConfigSource source) } - public void PostInitialise() + public void PostInitialize() { // Sets up the sun module based no the saved Estate and Region Settings // DO NOT REMOVE or the sun will stop working diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index c614c0f6..8c7f755f 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -88,7 +88,7 @@ public class LandManagementModule : IRegionModule private DateTime _rdbCacheTime; private List _rdbHostCache = new List(); - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { m_scene = scene; m_landIDList.Initialize(); @@ -228,7 +228,7 @@ void EventManager_OnNewClient(IClientAPI client) } } - public void PostInitialise() + public void PostInitialize() { } @@ -1558,7 +1558,7 @@ private string ProcessPropertiesUpdate(string request, string path, string param if (!m_scene.TryGetClient(agentID, out client)) { m_log.WarnFormat("[LAND MANAGEMENT MODULE]: Unable to retrieve IClientAPI for {0}", agentID); - return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); + return LLSDHelpers.SerializeLLSDReply(new LLSDEmpty()); } ParcelPropertiesUpdateMessage properties = new ParcelPropertiesUpdateMessage(); @@ -1609,7 +1609,7 @@ private string ProcessPropertiesUpdate(string request, string path, string param { m_log.WarnFormat("[LAND MANAGEMENT MODULE]: Unable to find parcelID {0}", parcelID); } - return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); + return LLSDHelpers.SerializeLLSDReply(new LLSDEmpty()); } @@ -1687,7 +1687,7 @@ private string RemoteParcelRequest(string request, string path, string param, UU response.parcel_id = parcelID; m_log.DebugFormat("[LAND]: got parcelID {0}", parcelID); - return LLSDHelpers.SerialiseLLSDReply(response); + return LLSDHelpers.SerializeLLSDReply(response); } #endregion diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index 5401a0e1..9dc5ca0c 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs @@ -98,7 +98,7 @@ public Type ReplaceableInterface /// protected Dictionary m_omuCapUrls = new Dictionary(); - public void Initialise(IConfigSource configSource) + public void Initialize(IConfigSource configSource) { m_isEnabled = true; IConfig config = configSource.Configs["MediaOnAPrim"]; diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 41afa234..7a00b05e 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -112,7 +112,7 @@ enum UserSet #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { m_scene = scene; @@ -273,7 +273,7 @@ public void HandleDebugPermissions(string module, string[] args) } } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/World/Serialiser/IFileSerialiser.cs b/OpenSim/Region/CoreModules/World/Serializer/IFileSerializer.cs similarity index 94% rename from OpenSim/Region/CoreModules/World/Serialiser/IFileSerialiser.cs rename to OpenSim/Region/CoreModules/World/Serializer/IFileSerializer.cs index 4a3bf8cb..bafd8bfc 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/IFileSerialiser.cs +++ b/OpenSim/Region/CoreModules/World/Serializer/IFileSerializer.cs @@ -27,9 +27,9 @@ using OpenSim.Region.Framework.Scenes; -namespace OpenSim.Region.CoreModules.World.Serialiser +namespace OpenSim.Region.CoreModules.World.Serializer { - internal interface IFileSerialiser + internal interface IFileSerializer { string WriteToFile(Scene scene, string dir); } diff --git a/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs b/OpenSim/Region/CoreModules/World/Serializer/SerializeObjects.cs similarity index 94% rename from OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs rename to OpenSim/Region/CoreModules/World/Serializer/SerializeObjects.cs index 830ba945..8d19a98b 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs +++ b/OpenSim/Region/CoreModules/World/Serializer/SerializeObjects.cs @@ -33,24 +33,24 @@ using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes.Serialization; -namespace OpenSim.Region.CoreModules.World.Serialiser +namespace OpenSim.Region.CoreModules.World.Serializer { - internal class SerialiseObjects : IFileSerialiser + internal class SerializeObjects : IFileSerializer { - #region IFileSerialiser Members + #region IFileSerializer Members public string WriteToFile(Scene scene, string dir) { string targetFileName = dir + "objects.xml"; - SaveSerialisedToFile(targetFileName, scene); + SaveSerializedToFile(targetFileName, scene); return "objects.xml"; } #endregion - public void SaveSerialisedToFile(string fileName, Scene scene) + public void SaveSerializedToFile(string fileName, Scene scene) { string xmlstream = GetObjectXml(scene); diff --git a/OpenSim/Region/CoreModules/World/Serialiser/SerialiseTerrain.cs b/OpenSim/Region/CoreModules/World/Serializer/SerializeTerrain.cs similarity index 93% rename from OpenSim/Region/CoreModules/World/Serialiser/SerialiseTerrain.cs rename to OpenSim/Region/CoreModules/World/Serializer/SerializeTerrain.cs index bf59fbb0..b4685470 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/SerialiseTerrain.cs +++ b/OpenSim/Region/CoreModules/World/Serializer/SerializeTerrain.cs @@ -29,11 +29,11 @@ using OpenSim.Region.CoreModules.World.Terrain.FileLoaders; using OpenSim.Region.Framework.Scenes; -namespace OpenSim.Region.CoreModules.World.Serialiser +namespace OpenSim.Region.CoreModules.World.Serializer { - internal class SerialiseTerrain : IFileSerialiser + internal class SerializeTerrain : IFileSerializer { - #region IFileSerialiser Members + #region IFileSerializer Members public string WriteToFile(Scene scene, string dir) { diff --git a/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs b/OpenSim/Region/CoreModules/World/Serializer/SerializerModule.cs similarity index 82% rename from OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs rename to OpenSim/Region/CoreModules/World/Serializer/SerializerModule.cs index 8b0709b3..d556bc8e 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs +++ b/OpenSim/Region/CoreModules/World/Serializer/SerializerModule.cs @@ -35,22 +35,22 @@ using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes.Serialization; -namespace OpenSim.Region.CoreModules.World.Serialiser +namespace OpenSim.Region.CoreModules.World.Serializer { - public class SerialiserModule : IRegionModule, IRegionSerialiserModule + public class SerializerModule : IRegionModule, IRegionSerializerModule { private Commander m_commander = new Commander("export"); private List m_regions = new List(); private string m_savedir = "exports" + "/"; - private List m_serialisers = new List(); + private List m_serializers = new List(); #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { scene.RegisterModuleCommander(m_commander); scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; - scene.RegisterModuleInterface(this); + scene.RegisterModuleInterface(this); lock (m_regions) { @@ -58,12 +58,12 @@ public void Initialise(Scene scene, IConfigSource source) } } - public void PostInitialise() + public void PostInitialize() { - lock (m_serialisers) + lock (m_serializers) { - m_serialisers.Add(new SerialiseTerrain()); - m_serialisers.Add(new SerialiseObjects()); + m_serializers.Add(new SerializeTerrain()); + m_serializers.Add(new SerializeObjects()); } LoadCommanderCommands(); @@ -76,7 +76,7 @@ public void Close() public string Name { - get { return "ExportSerialisationModule"; } + get { return "ExportSerializationModule"; } } public bool IsSharedModule @@ -86,7 +86,7 @@ public bool IsSharedModule #endregion - #region IRegionSerialiser Members + #region IRegionSerializer Members public void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset) { @@ -143,7 +143,7 @@ public void SavePrimListToXml2(List entityList, TextWriter stream, V SceneXmlLoader.SavePrimListToXml2(entityList, stream, min, max); } - public List SerialiseRegion(Scene scene, string saveDir) + public List SerializeRegion(Scene scene, string saveDir) { List results = new List(); @@ -152,11 +152,11 @@ public List SerialiseRegion(Scene scene, string saveDir) Directory.CreateDirectory(saveDir); } - lock (m_serialisers) + lock (m_serializers) { - foreach (IFileSerialiser serialiser in m_serialisers) + foreach (IFileSerializer serializer in m_serializers) { - results.Add(serialiser.WriteToFile(scene, saveDir)); + results.Add(serializer.WriteToFile(scene, saveDir)); } } @@ -164,7 +164,7 @@ public List SerialiseRegion(Scene scene, string saveDir) regionInfoWriter.WriteLine("Region Name: " + scene.RegionInfo.RegionName); regionInfoWriter.WriteLine("Region ID: " + scene.RegionInfo.RegionID.ToString()); regionInfoWriter.WriteLine("Backup Time: UTC " + DateTime.UtcNow.ToString()); - regionInfoWriter.WriteLine("Serialise Version: 0.1"); + regionInfoWriter.WriteLine("Serialize Version: 0.1"); regionInfoWriter.Close(); TextWriter manifestWriter = new StreamWriter(saveDir + "region.manifest"); @@ -198,8 +198,8 @@ private void InterfaceSaveRegion(Object[] args) { if (region.RegionInfo.RegionName == (string) args[0]) { - // List results = SerialiseRegion(region, m_savedir + region.RegionInfo.RegionID.ToString() + "/"); - SerialiseRegion(region, m_savedir + region.RegionInfo.RegionID.ToString() + "/"); + // List results = SerializeRegion(region, m_savedir + region.RegionInfo.RegionID.ToString() + "/"); + SerializeRegion(region, m_savedir + region.RegionInfo.RegionID.ToString() + "/"); } } } @@ -208,20 +208,20 @@ private void InterfaceSaveAllRegions(Object[] args) { foreach (Scene region in m_regions) { - // List results = SerialiseRegion(region, m_savedir + region.RegionInfo.RegionID.ToString() + "/"); - SerialiseRegion(region, m_savedir + region.RegionInfo.RegionID.ToString() + "/"); + // List results = SerializeRegion(region, m_savedir + region.RegionInfo.RegionID.ToString() + "/"); + SerializeRegion(region, m_savedir + region.RegionInfo.RegionID.ToString() + "/"); } } private void LoadCommanderCommands() { - Command serialiseSceneCommand = new Command("save", CommandIntentions.COMMAND_NON_HAZARDOUS, InterfaceSaveRegion, "Saves the named region into the exports directory."); - serialiseSceneCommand.AddArgument("region-name", "The name of the region you wish to export", "String"); + Command serializeSceneCommand = new Command("save", CommandIntentions.COMMAND_NON_HAZARDOUS, InterfaceSaveRegion, "Saves the named region into the exports directory."); + serializeSceneCommand.AddArgument("region-name", "The name of the region you wish to export", "String"); - Command serialiseAllScenesCommand = new Command("save-all",CommandIntentions.COMMAND_NON_HAZARDOUS, InterfaceSaveAllRegions, "Saves all regions into the exports directory."); + Command serializeAllScenesCommand = new Command("save-all",CommandIntentions.COMMAND_NON_HAZARDOUS, InterfaceSaveAllRegions, "Saves all regions into the exports directory."); - m_commander.RegisterCommand("save", serialiseSceneCommand); - m_commander.RegisterCommand("save-all", serialiseAllScenesCommand); + m_commander.RegisterCommand("save", serializeSceneCommand); + m_commander.RegisterCommand("save-all", serializeAllScenesCommand); } } } diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs index 2cb9258c..7b7700aa 100644 --- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs +++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs @@ -40,7 +40,7 @@ public class SoundModule : IRegionModule, ISoundModule protected Scene m_scene; - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { m_scene = scene; @@ -49,7 +49,7 @@ public void Initialise(Scene scene, IConfigSource source) m_scene.RegisterModuleInterface(this); } - public void PostInitialise() {} + public void PostInitialize() {} public void Close() {} public string Name { get { return "Sound Module"; } } public bool IsSharedModule { get { return false; } } diff --git a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs index a5fd4526..c9ff7495 100644 --- a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs +++ b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs @@ -282,7 +282,7 @@ private float GetCurrentTimeAsLindenSunHour() // Called immediately after the module is loaded for a given region // i.e. Immediately after instance creation. - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { m_scene = scene; m_frame = 0; @@ -408,7 +408,7 @@ public void Initialise(Scene scene, IConfigSource config) } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index 6daac2f4..8e92a80f 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs @@ -99,11 +99,11 @@ public ICommander CommandInterface #region INonSharedRegionModule Members /// - /// Creates and initialises a terrain module for a region + /// Creates and initializes a terrain module for a region /// - /// Region initialising + /// Region initializing /// Config for the region - public void Initialise(IConfigSource config) + public void Initialize(IConfigSource config) { } @@ -508,7 +508,7 @@ private void EventManager_OnTerrainTick() if (m_tainted) { m_tainted = false; - m_scene.PhysicsScene.SetTerrain(m_channel.GetFloatsSerialised(), m_channel.IncrementRevisionNumber()); + m_scene.PhysicsScene.SetTerrain(m_channel.GetFloatsSerialized(), m_channel.IncrementRevisionNumber()); m_scene.SaveTerrain(); // Clients who look at the map will never see changes after they looked at the map, so i've commented this out. @@ -570,7 +570,7 @@ private void CheckForTerrainUpdates() private void CheckForTerrainUpdates(bool respectEstateSettings) { bool shouldTaint = false; - float[] serialised = m_channel.GetFloatsSerialised(); + float[] serialized = m_channel.GetFloatsSerialized(); int x; for (x = 0; x < m_channel.Width; x += Constants.TerrainPatchSize) { @@ -585,10 +585,10 @@ private void CheckForTerrainUpdates(bool respectEstateSettings) { // this has been vetoed, so update // what we are going to send to the client - serialised = m_channel.GetFloatsSerialised(); + serialized = m_channel.GetFloatsSerialized(); } - UpdateClientsSceneView(serialised, x, y); + UpdateClientsSceneView(serialized, x, y); shouldTaint = true; } } @@ -637,13 +637,13 @@ private bool LimitChannelChanges(int xStart, int yStart) return changesLimited; } - private void UpdateClientsSceneView(float[] serialised, int regionx, int regiony) + private void UpdateClientsSceneView(float[] serialized, int regionx, int regiony) { m_scene.ForEachScenePresence( delegate(ScenePresence presence) { if (presence.SceneView != null) - presence.SceneView.TerrainPatchUpdated(serialised, + presence.SceneView.TerrainPatchUpdated(serialized, regionx / Constants.TerrainPatchSize, regiony / Constants.TerrainPatchSize); }); diff --git a/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs b/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs index a9b9008b..40d0a4ad 100644 --- a/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs +++ b/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs @@ -45,13 +45,13 @@ public class VegetationModule : IRegionModule, IVegetationModule protected static readonly PCode[] creationCapabilities = new PCode[] { PCode.Grass, PCode.NewTree, PCode.Tree }; public PCode[] CreationCapabilities { get { return creationCapabilities; } } - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { m_scene = scene; m_scene.RegisterModuleInterface(this); } - public void PostInitialise() {} + public void PostInitialize() {} public void Close() {} public string Name { get { return "Vegetation Module"; } } public bool IsSharedModule { get { return false; } } diff --git a/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs b/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs index 89231a87..03a2b215 100644 --- a/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs +++ b/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs @@ -66,7 +66,7 @@ public string Name get { return "ConfigurableWind"; } } - public void Initialise() + public void Initialize() { } diff --git a/OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs b/OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs index f588de06..ac420778 100644 --- a/OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs +++ b/OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs @@ -52,7 +52,7 @@ public string Name get { return "SimpleRandomWind"; } } - public void Initialise() + public void Initialize() { } diff --git a/OpenSim/Region/CoreModules/World/Wind/Plugins/ZephyrWind.cs b/OpenSim/Region/CoreModules/World/Wind/Plugins/ZephyrWind.cs index 32e0af8d..0bfc1e33 100644 --- a/OpenSim/Region/CoreModules/World/Wind/Plugins/ZephyrWind.cs +++ b/OpenSim/Region/CoreModules/World/Wind/Plugins/ZephyrWind.cs @@ -83,7 +83,7 @@ public string Name get { return "ZephyrWind"; } } - public void Initialise() + public void Initialize() { } diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index 11257006..0ff71bb9 100644 --- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs +++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs @@ -64,7 +64,7 @@ public class WindModule : IWindModule #region IRegion Methods - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { IConfig windConfig = config.Configs["Wind"]; string desiredWindPlugin = m_dWindPluginName; @@ -105,7 +105,7 @@ public void Initialise(Scene scene, IConfigSource config) if (windConfig != null) { - m_activeWindPlugin.Initialise(); + m_activeWindPlugin.Initialize(); m_activeWindPlugin.WindConfig(m_scene, windConfig); } } @@ -154,7 +154,7 @@ public void Initialise(Scene scene, IConfigSource config) } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/World/WorldMap/IMapTileTerrainRenderer.cs b/OpenSim/Region/CoreModules/World/WorldMap/IMapTileTerrainRenderer.cs index cc38f338..f5f458bc 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/IMapTileTerrainRenderer.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/IMapTileTerrainRenderer.cs @@ -33,7 +33,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap { public interface IMapTileTerrainRenderer { - void Initialise(Scene scene, IConfigSource config); + void Initialize(Scene scene, IConfigSource config); void TerrainToBitmap(Bitmap mapbmp); } } diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs index 095857d2..3231514f 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs @@ -96,7 +96,7 @@ public byte[] WriteJpeg2000Image(string gradientmap) { terrainRenderer = new ShadedMapTileRenderer(); } - terrainRenderer.Initialise(m_scene, m_config); + terrainRenderer.Initialize(m_scene, m_config); Bitmap mapbmp = new Bitmap(256, 256); //long t = System.Environment.TickCount; @@ -128,7 +128,7 @@ public byte[] WriteJpeg2000Image(string gradientmap) #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { m_scene = scene; m_config = source; @@ -141,7 +141,7 @@ public void Initialise(Scene scene, IConfigSource source) m_scene.RegisterModuleInterface(this); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index 76bf5e5a..6c0b3c80 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs @@ -44,7 +44,7 @@ public class MapSearchModule : IRegionModule List m_scenes = new List(); #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { if (m_scene == null) { @@ -55,7 +55,7 @@ public void Initialise(Scene scene, IConfigSource source) scene.EventManager.OnNewClient += OnNewClient; } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs b/OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs index e465f2ed..803f59f1 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs @@ -42,7 +42,7 @@ public class ShadedMapTileRenderer : IMapTileTerrainRenderer private Scene m_scene; //private IConfigSource m_config; // not used currently - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { m_scene = scene; // m_config = config; // not used currently diff --git a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs index 11b1b953..33a0a19a 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs @@ -149,7 +149,7 @@ public class TexturedMapTileRenderer : IMapTileTerrainRenderer private Dictionary m_mapping; - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { m_scene = scene; // m_config = source; // not used currently diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 12ec40b2..b6be3df0 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -82,7 +82,7 @@ public class WorldMapModule : INonSharedRegionModule, IWorldMapModule //private int CacheRegionsDistance = 256; #region INonSharedRegionModule Members - public virtual void Initialise (IConfigSource config) + public virtual void Initialize(IConfigSource config) { IConfig startupConfig = config.Configs["Startup"]; if (startupConfig.GetString("WorldMapModule", "WorldMap") == "WorldMap") diff --git a/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs b/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs index 6dfffbbf..29b15967 100644 --- a/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs +++ b/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs @@ -33,7 +33,7 @@ namespace OpenSim.Region.Framework.Interfaces { public interface IEstateDataStore { - void Initialise(string connectstring); + void Initialize(string connectstring); EstateSettings LoadEstateSettings(UUID regionID, string regionName, UUID masterAvatarID, bool writable); // during startup EstateSettings LoadEstateSettings(UUID regionID); // only used after startup diff --git a/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs b/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs index a0a33cbc..bcde4d1a 100644 --- a/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs +++ b/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs @@ -36,11 +36,11 @@ namespace OpenSim.Region.Framework.Interfaces public interface IRegionDataStore { /// - /// Initialises the data storage engine + /// Initializes the data storage engine /// /// The file to save the database to (may not be applicable). Alternatively, /// a connection string for the database - void Initialise(string filename); + void Initialize(string filename); /// /// Dispose the database diff --git a/OpenSim/Region/Framework/Interfaces/IRegionModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionModule.cs index 300b548b..3b82bade 100644 --- a/OpenSim/Region/Framework/Interfaces/IRegionModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IRegionModule.cs @@ -47,9 +47,9 @@ public interface IRegionModule /// /// /// Configuration information. For a shared module this will be identical on every scene call - void Initialise(Scene scene, IConfigSource source); + void Initialize(Scene scene, IConfigSource source); - void PostInitialise(); + void PostInitialize(); void Close(); string Name { get; } bool IsSharedModule { get; } diff --git a/OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs b/OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs index 97d79ed2..5bd0d1cb 100644 --- a/OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs +++ b/OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs @@ -61,16 +61,16 @@ public interface IRegionModuleBase /// /// A /// - void Initialise(IConfigSource source); + void Initialize(IConfigSource source); /// - /// This is the inverse to . After a Close(), this instance won't be usable anymore. + /// This is the inverse to . After a Close(), this instance won't be usable anymore. /// void Close(); /// /// This is called whenever a is added. For shared modules, this can happen several times. - /// For non-shared modules, this happens exactly once, after has been called. + /// For non-shared modules, this happens exactly once, after has been called. /// /// /// A diff --git a/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionSerializerModule.cs similarity index 97% rename from OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs rename to OpenSim/Region/Framework/Interfaces/IRegionSerializerModule.cs index 876dfa43..64b60738 100644 --- a/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IRegionSerializerModule.cs @@ -32,9 +32,9 @@ namespace OpenSim.Region.Framework.Interfaces { - public interface IRegionSerialiserModule + public interface IRegionSerializerModule { - List SerialiseRegion(Scene scene, string saveDir); + List SerializeRegion(Scene scene, string saveDir); /// /// Load prims from the xml format diff --git a/OpenSim/Region/Framework/Interfaces/ISceneView.cs b/OpenSim/Region/Framework/Interfaces/ISceneView.cs index c4cf3795..703e23aa 100644 --- a/OpenSim/Region/Framework/Interfaces/ISceneView.cs +++ b/OpenSim/Region/Framework/Interfaces/ISceneView.cs @@ -105,10 +105,10 @@ public interface ISceneView /// /// Informs the SceneView that the given patch has been modified and must be resent /// - /// + /// /// /// - void TerrainPatchUpdated(float[] serialised, int x, int y); + void TerrainPatchUpdated(float[] serialized, int x, int y); /// /// Whether the client requires the entire scene to be sent to them once they have fully loaded diff --git a/OpenSim/Region/Framework/Interfaces/ISharedRegionModule.cs b/OpenSim/Region/Framework/Interfaces/ISharedRegionModule.cs index c8f42205..4987f069 100644 --- a/OpenSim/Region/Framework/Interfaces/ISharedRegionModule.cs +++ b/OpenSim/Region/Framework/Interfaces/ISharedRegionModule.cs @@ -33,8 +33,8 @@ public interface ISharedRegionModule : IRegionModuleBase { /// /// This is called exactly once after all the shared region-modules have been instanciated and - /// d. + /// d. /// - void PostInitialise(); + void PostInitialize(); } } diff --git a/OpenSim/Region/Framework/ModuleLoader.cs b/OpenSim/Region/Framework/ModuleLoader.cs index 3301c807..ef0d3837 100644 --- a/OpenSim/Region/Framework/ModuleLoader.cs +++ b/OpenSim/Region/Framework/ModuleLoader.cs @@ -86,24 +86,24 @@ public void LoadDefaultSharedModule(IRegionModule module) } - public void InitialiseSharedModules(Scene scene) + public void InitializeSharedModules(Scene scene) { foreach (IRegionModule module in m_loadedSharedModules.Values) { - module.Initialise(scene, m_config); + module.Initialize(scene, m_config); scene.AddModule(module.Name, module); //should be doing this? } } public void InitializeModule(IRegionModule module, Scene scene) { - module.Initialise(scene, m_config); + module.Initialize(scene, m_config); scene.AddModule(module.Name, module); m_loadedModules.Add(module); } /// - /// Loads/initialises a Module instance that can be used by multiple Regions + /// Loads/initializes a Module instance that can be used by multiple Regions /// /// /// @@ -116,7 +116,7 @@ public void LoadSharedModule(string dllName, string moduleName) } /// - /// Loads/initialises a Module instance that can be used by multiple Regions + /// Loads/initializes a Module instance that can be used by multiple Regions /// /// public void LoadSharedModule(IRegionModule module) @@ -234,16 +234,16 @@ public IRegionModule[] LoadModules(string dllName) return modules.ToArray(); } - public void PostInitialise() + public void PostInitialize() { foreach (IRegionModule module in m_loadedSharedModules.Values) { - module.PostInitialise(); + module.PostInitialize(); } foreach (IRegionModule module in m_loadedModules) { - module.PostInitialise(); + module.PostInitialize(); } } diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index f0dae717..d60470a3 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -236,7 +236,7 @@ public IAssetService AssetService protected IWorldComm m_worldCommModule; protected IAvatarFactory m_AvatarFactory; protected IConfigSource m_config; - protected IRegionSerialiserModule m_serialiser; + protected IRegionSerializerModule m_serializer; private IInterregionCommsOut m_interregionCommsOut; public IInterregionCommsOut InterregionComms { @@ -1194,7 +1194,7 @@ public void SetModuleInterfaces() m_worldCommModule = RequestModuleInterface(); XferManager = RequestModuleInterface(); m_AvatarFactory = RequestModuleInterface(); - m_serialiser = RequestModuleInterface(); + m_serializer = RequestModuleInterface(); m_interregionCommsOut = RequestModuleInterface(); m_interregionCommsIn = RequestModuleInterface(); m_dialogModule = RequestModuleInterface(); @@ -2475,7 +2475,7 @@ public void DeleteSceneObject(SceneObjectGroup group, bool silent, bool fromCros } } - // Serialise calls to RemoveScriptInstances to avoid + // Serialize calls to RemoveScriptInstances to avoid // deadlocking on m_parts inside SceneObjectGroup lock (m_deleting_scene_object) { @@ -5177,7 +5177,7 @@ public void RegionHandleRequest(IClientAPI client, UUID regionID) public void TerrainUnAcked(IClientAPI client, int patchX, int patchY) { //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); - client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised()); + client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialized()); } public void SetRootAgentScene(UUID agentID) diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index f0312e33..49dac320 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs @@ -200,9 +200,9 @@ public void SendSimOnlineNotification(ulong regionHandle) /// public void SaveCurrentSceneToXml(string filename) { - IRegionSerialiserModule serialiser = CurrentOrFirstScene.RequestModuleInterface(); - if (serialiser != null) - serialiser.SavePrimsToXml(CurrentOrFirstScene, filename); + IRegionSerializerModule serializer = CurrentOrFirstScene.RequestModuleInterface(); + if (serializer != null) + serializer.SavePrimsToXml(CurrentOrFirstScene, filename); } /// @@ -213,9 +213,9 @@ public void SaveCurrentSceneToXml(string filename) /// public void LoadCurrentSceneFromXml(string filename, bool generateNewIDs, Vector3 loadOffset) { - IRegionSerialiserModule serialiser = CurrentOrFirstScene.RequestModuleInterface(); - if (serialiser != null) - serialiser.LoadPrimsFromXml(CurrentOrFirstScene, filename, generateNewIDs, loadOffset); + IRegionSerializerModule serializer = CurrentOrFirstScene.RequestModuleInterface(); + if (serializer != null) + serializer.LoadPrimsFromXml(CurrentOrFirstScene, filename, generateNewIDs, loadOffset); } /// @@ -224,16 +224,16 @@ public void LoadCurrentSceneFromXml(string filename, bool generateNewIDs, Vector /// public void SaveCurrentSceneToXml2(string filename) { - IRegionSerialiserModule serialiser = CurrentOrFirstScene.RequestModuleInterface(); - if (serialiser != null) - serialiser.SavePrimsToXml2(CurrentOrFirstScene, filename); + IRegionSerializerModule serializer = CurrentOrFirstScene.RequestModuleInterface(); + if (serializer != null) + serializer.SavePrimsToXml2(CurrentOrFirstScene, filename); } public void SaveNamedPrimsToXml2(string primName, string filename) { - IRegionSerialiserModule serialiser = CurrentOrFirstScene.RequestModuleInterface(); - if (serialiser != null) - serialiser.SaveNamedPrimsToXml2(CurrentOrFirstScene, primName, filename); + IRegionSerializerModule serializer = CurrentOrFirstScene.RequestModuleInterface(); + if (serializer != null) + serializer.SaveNamedPrimsToXml2(CurrentOrFirstScene, primName, filename); } /// @@ -241,9 +241,9 @@ public void SaveNamedPrimsToXml2(string primName, string filename) /// public void LoadCurrentSceneFromXml2(string filename) { - IRegionSerialiserModule serialiser = CurrentOrFirstScene.RequestModuleInterface(); - if (serialiser != null) - serialiser.LoadPrimsFromXml2(CurrentOrFirstScene, filename); + IRegionSerializerModule serializer = CurrentOrFirstScene.RequestModuleInterface(); + if (serializer != null) + serializer.LoadPrimsFromXml2(CurrentOrFirstScene, filename); } /// diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs index 30fe721d..7f0fff47 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs @@ -219,7 +219,7 @@ public static void SavePrimsToXml2(Scene scene, TextWriter stream, Vector3 min, public static void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName) { m_log.InfoFormat( - "[SERIALISER]: Saving prims with name {0} in xml2 format for region {1} to {2}", + "[SERIALIZER]: Saving prims with name {0} in xml2 format for region {1} to {2}", primName, scene.RegionInfo.RegionName, fileName); List entityList = scene.GetEntities(); diff --git a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs index 69903f2c..5b8377cb 100644 --- a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs +++ b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs @@ -115,7 +115,7 @@ public ITerrainChannel MakeCopy() return copy; } - public float[] GetFloatsSerialised() + public float[] GetFloatsSerialized() { // Move the member variables into local variables, calling // member variables 256*256 times gets expensive @@ -238,7 +238,7 @@ private void ReadXml(XmlReader reader) private void ToXml(XmlWriter xmlWriter) { - float[] mapData = GetFloatsSerialised(); + float[] mapData = GetFloatsSerialized(); byte[] buffer = new byte[mapData.Length * 4]; for (int i = 0; i < mapData.Length; i++) { diff --git a/OpenSim/Region/Framework/StorageManager.cs b/OpenSim/Region/Framework/StorageManager.cs index 1e758be1..327cc282 100644 --- a/OpenSim/Region/Framework/StorageManager.cs +++ b/OpenSim/Region/Framework/StorageManager.cs @@ -70,7 +70,7 @@ public StorageManager(string dllName, string connectionstring, string estateconn { IRegionDataStore plug = (IRegionDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); - plug.Initialise(connectionstring); + plug.Initialize(connectionstring); m_dataStore = plug; @@ -83,14 +83,14 @@ public StorageManager(string dllName, string connectionstring, string estateconn { IEstateDataStore estPlug = (IEstateDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); - estPlug.Initialise(estateconnectionstring); + estPlug.Initialize(estateconnectionstring); m_estateDataStore = estPlug; } } } - //TODO: Add checking and warning to make sure it initialised. + //TODO: Add checking and warning to make sure it initialized. } } } diff --git a/OpenSim/Region/Interfaces/ITerrainChannel.cs b/OpenSim/Region/Interfaces/ITerrainChannel.cs index c46b4a4d..058d361d 100644 --- a/OpenSim/Region/Interfaces/ITerrainChannel.cs +++ b/OpenSim/Region/Interfaces/ITerrainChannel.cs @@ -52,7 +52,7 @@ public interface ITerrainChannel /// Squash the entire heightmap into a single dimensioned array /// /// - float[] GetFloatsSerialised(); + float[] GetFloatsSerialized(); double[,] GetDoubles(); bool Tainted(int x, int y); diff --git a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs index a72aa628..a8d782c7 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs @@ -78,7 +78,7 @@ public class ConciergeModule : ChatModule, IRegionModule internal object m_syncy = new object(); #region IRegionModule Members - public override void Initialise(Scene scene, IConfigSource config) + public override void Initialize(Scene scene, IConfigSource config) { try { @@ -175,7 +175,7 @@ public override void Initialise(Scene scene, IConfigSource config) m_log.InfoFormat("[Concierge]: initialized for {0}", scene.RegionInfo.RegionName); } - public override void PostInitialise() + public override void PostInitialize() { } diff --git a/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/FlexiGroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/FlexiGroupsModule.cs index dea38469..bed6ef7e 100644 --- a/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/FlexiGroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/FlexiGroupsModule.cs @@ -96,7 +96,7 @@ public class FlexiGroupsModule : ISharedRegionModule, IGroupsModule #region IRegionModuleBase Members - public void Initialise(IConfigSource config) + public void Initialize(IConfigSource config) { IConfig groupsConfig = config.Configs["Groups"]; @@ -207,7 +207,7 @@ public Type ReplaceableInterface #region ISharedRegionModule Members - public void PostInitialise() + public void PostInitialize() { // NoOp } diff --git a/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/XmlRpcGroupsMessaging.cs b/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/XmlRpcGroupsMessaging.cs index 50bf8bb0..35708e21 100644 --- a/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/XmlRpcGroupsMessaging.cs +++ b/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/XmlRpcGroupsMessaging.cs @@ -66,7 +66,7 @@ public class XmlRpcGroupsMessaging : ISharedRegionModule #region IRegionModuleBase Members - public void Initialise(IConfigSource config) + public void Initialize(IConfigSource config) { IConfig groupsConfig = config.Configs["Groups"]; @@ -190,7 +190,7 @@ public Type ReplaceableInterface #region ISharedRegionModule Members - public void PostInitialise() + public void PostInitialize() { // NoOp } diff --git a/OpenSim/Region/OptionalModules/Avatar/FriendPermissions/FriendPermissionsModule.cs b/OpenSim/Region/OptionalModules/Avatar/FriendPermissions/FriendPermissionsModule.cs index ba158ea0..025cd893 100644 --- a/OpenSim/Region/OptionalModules/Avatar/FriendPermissions/FriendPermissionsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/FriendPermissions/FriendPermissionsModule.cs @@ -35,7 +35,7 @@ public Type ReplaceableInterface get { return null; } } - public void Initialise(Nini.Config.IConfigSource source) + public void Initialize(Nini.Config.IConfigSource source) { //read our connection string IConfig userConfig = source.Configs["UserService"]; diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index b7798147..df227227 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs @@ -104,7 +104,7 @@ public class FreeSwitchVoiceModule : IRegionModule private IConfig m_config; - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { m_config = config.Configs["FreeSwitchVoice"]; @@ -251,7 +251,7 @@ public void Initialise(Scene scene, IConfigSource config) } } - public void PostInitialise() + public void PostInitialize() { } @@ -286,7 +286,7 @@ public bool IsSharedModule // // Note that OnRegisterCaps is called here via a closure // delegate containing the scene of the respective region (see - // Initialise()). + // Initialize()). // public void OnRegisterCaps(Scene scene, UUID agentID, Caps caps) { @@ -376,7 +376,7 @@ public string ProvisionVoiceAccountRequest(Scene scene, string request, string p String.Format("http://{0}:{1}{2}/", m_openSimWellKnownHTTPAddress, m_freeSwitchServicePort, m_freeSwitchAPIPrefix)); - string r = LLSDHelpers.SerialiseLLSDReply(voiceAccountResponse); + string r = LLSDHelpers.SerializeLLSDReply(voiceAccountResponse); m_log.DebugFormat("[FreeSwitchVoice][PROVISIONVOICE]: avatar \"{0}\": {1}", avatarName, r); @@ -457,7 +457,7 @@ public string ParcelVoiceInfoRequest(Scene scene, string request, string path, s creds["channel_uri"] = channelUri; parcelVoiceInfo = new LLSDParcelVoiceInfoResponse(scene.RegionInfo.RegionName, land.LocalID, creds); - string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo); + string r = LLSDHelpers.SerializeLLSDReply(parcelVoiceInfo); m_log.DebugFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}", scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, r); @@ -737,9 +737,9 @@ public Hashtable FreeSwitchConfigHTTPHandler(Hashtable request) // XXX: re-generate dialplan: // - conf == region UUID // - conf number = region port - // -> TODO Initialise(): keep track of regions via events + // -> TODO Initialize(): keep track of regions via events // re-generate accounts for all avatars - // -> TODO Initialise(): keep track of avatars via events + // -> TODO Initialize(): keep track of avatars via events Regex normalizeEndLines = new Regex(@"\r\n", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.Multiline); m_log.DebugFormat("[FreeSwitchVoice] FreeSwitchConfigHTTPHandler return {0}",normalizeEndLines.Replace(((string)response["str_response_string"]), "")); diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsMessaging.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsMessaging.cs index 6f53f774..4b520d50 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsMessaging.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsMessaging.cs @@ -66,7 +66,7 @@ public class XmlRpcGroupsMessaging : ISharedRegionModule #region IRegionModuleBase Members - public void Initialise(IConfigSource config) + public void Initialize(IConfigSource config) { IConfig groupsConfig = config.Configs["Groups"]; @@ -189,7 +189,7 @@ public Type ReplaceableInterface #region ISharedRegionModule Members - public void PostInitialise() + public void PostInitialize() { // NoOp } diff --git a/OpenSim/Region/OptionalModules/Grid/Interregion/InterregionModule.cs b/OpenSim/Region/OptionalModules/Grid/Interregion/InterregionModule.cs index df3b4ee3..b222e6db 100644 --- a/OpenSim/Region/OptionalModules/Grid/Interregion/InterregionModule.cs +++ b/OpenSim/Region/OptionalModules/Grid/Interregion/InterregionModule.cs @@ -61,8 +61,6 @@ public enum Direction private readonly Dictionary m_neighbourInterfaces = new Dictionary(); private readonly Dictionary m_neighbourRemote = new Dictionary(); - // private IConfigSource m_config; - private const bool m_enabled = false; private RemotingObject m_myRemote; private TcpChannel m_tcpChannel; @@ -141,30 +139,16 @@ public void RegisterRemoteRegion(string uri) #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource source) + public void Initialize(Scene scene, IConfigSource source) { m_myLocations.Add(new Location((int) scene.RegionInfo.RegionLocX, (int) scene.RegionInfo.RegionLocY)); - // m_config = source; scene.RegisterModuleInterface(this); } - public void PostInitialise() + public void PostInitialize() { - // Commenting out to remove 'unreachable code' warning since m_enabled is never true -// if (m_enabled) -// { -// try -// { -// m_tcpPort = m_config.Configs["Comms"].GetInt("remoting_port", m_tcpPort); -// } -// catch -// { -// } -// -// internal_CreateRemotingObjects(); -// } } public void Close() diff --git a/OpenSim/Region/OptionalModules/Grid/Interregion/RemotingObject.cs b/OpenSim/Region/OptionalModules/Grid/Interregion/RemotingObject.cs index 85e11792..6bff82a4 100644 --- a/OpenSim/Region/OptionalModules/Grid/Interregion/RemotingObject.cs +++ b/OpenSim/Region/OptionalModules/Grid/Interregion/RemotingObject.cs @@ -65,7 +65,7 @@ public string[] GetInterfaces() /// /// The type of interface you wish to request /// A MarshalByRefObject inherited from this region inheriting the interface requested. - /// All registered interfaces MUST inherit from MarshalByRefObject and use only serialisable types. + /// All registered interfaces MUST inherit from MarshalByRefObject and use only serializable types. public T RequestInterface() { if (m_interfaces.ContainsKey(typeof (T))) diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReady/RegionReady.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReady/RegionReady.cs index bd4addcb..ab61a83d 100644 --- a/OpenSim/Region/OptionalModules/Scripting/RegionReady/RegionReady.cs +++ b/OpenSim/Region/OptionalModules/Scripting/RegionReady/RegionReady.cs @@ -53,9 +53,9 @@ public class RegionReady : IRegionModule #region IRegionModule interface - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { - m_log.Info("[RegionReady] Initialising"); + m_log.Info("[RegionReady] Initializing"); m_scene = scene; m_firstEmptyCompileQueue = true; m_oarFileLoading = false; @@ -72,7 +72,7 @@ public void Initialise(Scene scene, IConfigSource config) } } - public void PostInitialise() + public void PostInitialize() { if (m_enabled) { diff --git a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs index 04d9d1c1..ccc30d18 100644 --- a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs @@ -59,7 +59,7 @@ public class XmlRpcGridRouter : IRegionModule, IXmlRpcRouter private bool m_Enabled = false; private string m_ServerURI = String.Empty; - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { IConfig startupConfig = config.Configs["Startup"]; if (startupConfig == null) @@ -80,7 +80,7 @@ public void Initialise(Scene scene, IConfigSource config) } } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs index e9efebe1..464ca202 100644 --- a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs @@ -43,7 +43,7 @@ public class XmlRpcRouter : IRegionModule, IXmlRpcRouter { //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { IConfig startupConfig = config.Configs["Startup"]; if (startupConfig == null) @@ -56,7 +56,7 @@ public void Initialise(Scene scene, IConfigSource config) } } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index 5dda0649..bb6827e8 100644 --- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs @@ -54,7 +54,7 @@ public class TreePopulatorModule : IRegionModule #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { m_scene = scene; m_scene.RegisterModuleInterface(this); @@ -79,10 +79,10 @@ public void Initialise(Scene scene, IConfigSource config) if (m_active_trees) activeizeTreeze(true); - m_log.Debug("[TREES]: Initialised tree module"); + m_log.Debug("[TREES]: Initialized tree module"); } - public void PostInitialise() + public void PostInitialize() { } diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs index ff170f21..1895acce 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs @@ -110,7 +110,7 @@ public SurfaceTouchEventArgs SurfaceTouchArgs { if (value == null) { - // Initialise to defaults if no value + // Initialize to defaults if no value initializeSurfaceTouch(); } else diff --git a/OpenSim/ScriptEngine/Shared/IScriptEngine.cs b/OpenSim/ScriptEngine/Shared/IScriptEngine.cs index 89d67d94..5ac9d856 100644 --- a/OpenSim/ScriptEngine/Shared/IScriptEngine.cs +++ b/OpenSim/ScriptEngine/Shared/IScriptEngine.cs @@ -38,8 +38,8 @@ public interface IScriptEngine //string[] ComponentNames { get; } //Dictionary Components { get; } //void InitializeComponents(); - void Initialise(Scene scene, IConfigSource source); - void PostInitialise(); + void Initialize(Scene scene, IConfigSource source); + void PostInitialize(); void Close(); string Name { get; } // string Name { get; } diff --git a/OpenSim/Servers/Base/HttpServerBase.cs b/OpenSim/Servers/Base/HttpServerBase.cs index 70cef937..8be86d49 100644 --- a/OpenSim/Servers/Base/HttpServerBase.cs +++ b/OpenSim/Servers/Base/HttpServerBase.cs @@ -139,7 +139,7 @@ protected override void ReadConfig() #endif } - protected override void Initialise() + protected override void Initialize() { foreach (BaseHttpServer s in MainServer.Servers.Values) s.Start(); diff --git a/OpenSim/Servers/Base/ServicesServerBase.cs b/OpenSim/Servers/Base/ServicesServerBase.cs index 56032c52..68e47361 100644 --- a/OpenSim/Servers/Base/ServicesServerBase.cs +++ b/OpenSim/Servers/Base/ServicesServerBase.cs @@ -266,7 +266,7 @@ public ServicesServerBase(string prompt, string[] args) // Allow derived classes to perform initialization that // needs to be done after the console has opened // - Initialise(); + Initialize(); } public bool Running @@ -338,7 +338,7 @@ protected virtual void ReadConfig() { } - protected virtual void Initialise() + protected virtual void Initialize() { } diff --git a/OpenSim/Services/AssetService/AssetServiceBase.cs b/OpenSim/Services/AssetService/AssetServiceBase.cs index 3b3e85c3..ad1d0812 100644 --- a/OpenSim/Services/AssetService/AssetServiceBase.cs +++ b/OpenSim/Services/AssetService/AssetServiceBase.cs @@ -86,7 +86,7 @@ public AssetServiceBase(IConfigSource config, string configName) : base(config) if (m_Database == null) throw new Exception("Could not find a storage interface in the given module"); - m_Database.Initialise(connString); + m_Database.Initialize(connString); string loaderName = assetConfig.GetString("DefaultAssetLoader", String.Empty); diff --git a/OpenSim/Services/UserService/UserServiceBase.cs b/OpenSim/Services/UserService/UserServiceBase.cs index 24a9372a..84c818d3 100644 --- a/OpenSim/Services/UserService/UserServiceBase.cs +++ b/OpenSim/Services/UserService/UserServiceBase.cs @@ -58,7 +58,7 @@ public UserServiceBase(IConfigSource config) : base(config) if (m_Database == null) throw new Exception("Could not find a storage interface in the given module"); - m_Database.Initialise(connString); + m_Database.Initialize(connString); } } } diff --git a/OpenSimProfile/Modules/OpenProfile.cs b/OpenSimProfile/Modules/OpenProfile.cs index 2ec89652..13f60205 100644 --- a/OpenSimProfile/Modules/OpenProfile.cs +++ b/OpenSimProfile/Modules/OpenProfile.cs @@ -44,7 +44,7 @@ public class OpenProfileModule : IRegionModule private ConnectionFactory _connFactory; private ConnectionFactory _regionConnFactory; - public void Initialise(Scene scene, IConfigSource config) + public void Initialize(Scene scene, IConfigSource config) { if (!m_Enabled) return; @@ -72,7 +72,7 @@ public void Initialise(Scene scene, IConfigSource config) scene.EventManager.OnNewClient += OnNewClient; } - public void PostInitialise() + public void PostInitialize() { if (!m_Enabled) return; From 63ed70371a0d0ac3c67b8d106e069b2d7d66aa03 Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Thu, 15 Oct 2015 20:46:51 -0700 Subject: [PATCH 3/6] Whitespace cleanup. While I'm a fan of tabs, it's either spaces or tabs, never both in a hodgepodge mix like this had. How I cleaned up: find InWorldz OpenSim -iname '*.cs' -exec sed -i 's/\t/ /g' '{}' \; find InWorldz OpenSim -iname '*.cs' -exec sed -i 's/\t/ /g' '{}' \; --- .../AvatarRemoteCommandModule.cs | 30 +- .../ChatLogMessageCassandra12Backend.cs | 14 +- .../ExecutionScheduler.cs | 2 +- .../InWorldz.Phlox.Engine/LSLSystemAPI.cs | 96 +-- .../InWorldz.Phlox.Engine/StateManager.cs | 4 +- InWorldz/InWorldz.PhysxPhysics/PhysxPrim.cs | 14 +- InWorldz/InWorldz.PhysxPhysics/PhysxScene.cs | 4 +- .../Tests/PhysXtest/PhysXtest/Form1.cs | 2 +- .../InWorldz.RemoteAdmin/RemoteAdminPlugin.cs | 2 +- .../ScriptEngine/RegionEngineLoader.cs | 4 +- OpenSim/Base/OpenSim.cs | 2 +- OpenSim/Data/MySQL/MySQLGridData.cs | 2 +- OpenSim/Data/MySQL/MySQLRegionData.cs | 4 +- OpenSim/Framework/AvatarAppearance.cs | 4 +- .../Capabilities/CapsHandlers.cs | 18 +- .../Communications/Services/LoginService.cs | 86 +-- .../Communications/UserManagerBase.cs | 6 +- OpenSim/Framework/IClientAPI.cs | 8 +- OpenSim/Framework/IConsole.cs | 4 +- OpenSim/Framework/IndexedPriorityQueue.cs | 2 +- OpenSim/Framework/InventoryFolderBase.cs | 2 +- OpenSim/Framework/PrimitiveBaseShape.cs | 2 +- OpenSim/Framework/RenderMaterials.cs | 74 +- .../Framework/Servers/BaseOpenSimServer.cs | 20 +- .../HttpServer/Interfaces/IHttpServer.cs | 6 +- .../Servers/HttpServer/XmlRpcStreamHandler.cs | 114 +-- OpenSim/Framework/TaskInventoryItem.cs | 2 +- .../Framework/Tests/RenderMaterialsTests.cs | 16 +- .../UserDataBaseService.cs | 2 +- .../MessageServersConnector.cs | 2 +- .../ClientStack/LindenUDP/LLClientView.cs | 46 +- .../ClientStack/LindenUDP/LLUDPServer.cs | 2 +- .../AgentAssetsTransactions.cs | 16 +- .../AssetTransactionModule.cs | 10 +- .../TextureSender/J2KDecoderFileCache.cs | 12 +- .../Agent/TextureSender/J2KDecoderModule.cs | 22 +- .../CoreModules/Avatar/Chat/ChatModule.cs | 10 +- .../Avatar/Currency/AvatarCurrency.cs | 42 +- .../Archiver/InventoryArchiveReadRequest.cs | 128 ++-- .../Avatar/Search/AvatarSearchModule.cs | 24 +- OpenSim/Region/CoreModules/Plus/PlusModule.cs | 22 +- .../HttpRequest/ScriptsHttpRequests.cs | 88 +-- .../CoreModules/World/Land/LandChannel.cs | 2 +- .../World/Land/LandManagementModule.cs | 12 +- .../CoreModules/World/Land/LandObject.cs | 10 +- .../World/Permissions/PermissionsModule.cs | 210 +++--- .../Interfaces/IAgentAssetTransactions.cs | 2 +- .../Framework/Interfaces/IEntityInventory.cs | 2 +- .../Framework/Interfaces/IJ2KDecoder.cs | 2 +- .../Region/Framework/Scenes/AnimationSet.cs | 26 +- .../Framework/Scenes/Scene.Inventory.cs | 248 +++--- OpenSim/Region/Framework/Scenes/Scene.cs | 4 +- .../Scenes/SceneCommunicationService.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- .../Scenes/SceneObjectGroup.Inventory.cs | 6 +- .../Framework/Scenes/SceneObjectGroup.cs | 4 +- .../Framework/Scenes/SceneObjectPart.cs | 28 +- .../Scenes/SceneObjectPartInventory.cs | 70 +- .../Region/Framework/Scenes/ScenePresence.cs | 548 +++++++------- .../Region/Framework/Scenes/TerrainChannel.cs | 4 +- OpenSim/Region/Framework/Scenes/UndoState.cs | 2 +- .../Modules/ProfileModule/OpenProfile.cs | 708 +++++++++--------- .../Avatar/FlexiGroups/FlexiGroupsModule.cs | 16 +- .../Physics/ConvexDecompositionDotNet/CTri.cs | 14 +- .../ConvexDecompositionDotNet/HullUtils.cs | 10 +- .../ConvexDecompositionDotNet/Quaternion.cs | 6 +- .../ConvexDecompositionDotNet/float4x4.cs | 158 ++-- .../Shared/Api/Runtime/LSL_Constants.cs | 4 +- OpenSim/TestSuite/PhysicsBot.cs | 2 +- OpenSim/Tools/OpenSim.32BitLaunch/Program.cs | 2 +- 70 files changed, 1537 insertions(+), 1537 deletions(-) diff --git a/InWorldz/InWorldz.ApplicationPlugins/AvatarRemoteCommandModule/AvatarRemoteCommandModule.cs b/InWorldz/InWorldz.ApplicationPlugins/AvatarRemoteCommandModule/AvatarRemoteCommandModule.cs index 5e09b897..3ef5450b 100644 --- a/InWorldz/InWorldz.ApplicationPlugins/AvatarRemoteCommandModule/AvatarRemoteCommandModule.cs +++ b/InWorldz/InWorldz.ApplicationPlugins/AvatarRemoteCommandModule/AvatarRemoteCommandModule.cs @@ -55,17 +55,17 @@ namespace InWorldz.ApplicationPlugins.AvatarRemoteCommandModule /// Command [ app -> regionhost ] (HTTP POST) /// /// { - /// “id”:”[command_id]” - /// “userId”:”[user_uuid]” - /// “sessionId”:”[session_uuid]” - /// ”regionId”:”[region_uuid]” - /// } - /// + /// “id”:”[command_id]” + /// “userId”:”[user_uuid]” + /// “sessionId”:”[session_uuid]” + /// ”regionId”:”[region_uuid]” + /// } + /// /// the command type (RemoteCommandType) /// the user’s ID /// the user's current grid session id to verify this is a legitimate message /// the user’s current regionID - /// + /// /// More info can be added on, as shown below for the AvatarChatCommand. /// /// The response to this request will be in the following format: @@ -73,9 +73,9 @@ namespace InWorldz.ApplicationPlugins.AvatarRemoteCommandModule /// CommandReply [ regionhost -> app ] (REPLY TO HTTP POST) /// /// { - /// "status":"OK|MOVED|NOTFOUND|UNAUTHORIZED" - /// "data":"[new_region_hostname/ip]" - /// "newRegionId":"[new region id if set]" + /// "status":"OK|MOVED|NOTFOUND|UNAUTHORIZED" + /// "data":"[new_region_hostname/ip]" + /// "newRegionId":"[new region id if set]" /// } /// /// The status of the command (RemoteCommandResponse) @@ -87,12 +87,12 @@ namespace InWorldz.ApplicationPlugins.AvatarRemoteCommandModule /// AvatarChatCommand [ app -> regionhost ] (HTTP POST) /// /// { - /// “id”:”[command_id]” - /// “userId”:”[user_uuid]” - /// “sessionId”:”[session_uuid]” - /// ”regionId”:”[region_uuid]” + /// “id”:”[command_id]” + /// “userId”:”[user_uuid]” + /// “sessionId”:”[session_uuid]” + /// ”regionId”:”[region_uuid]” /// “channel”:”[chat_channel]” - /// “text”:”[text to be said]” + /// “text”:”[text to be said]” /// } /// /// the channel number to say the chat on diff --git a/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageCassandra12Backend.cs b/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageCassandra12Backend.cs index 50933b6c..aac3e6cb 100644 --- a/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageCassandra12Backend.cs +++ b/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageCassandra12Backend.cs @@ -159,13 +159,13 @@ public void LogChatMessage(ChatMessageLog log) { /* * CREATE TABLE messages ( - * message_id uuid PRIMARY KEY, - * from_agent uuid, - * to_agent uuid, - * region_id uuid, - * chat_type int, - * sent_on int, - * sent_on_day timestamp, + * message_id uuid PRIMARY KEY, + * from_agent uuid, + * to_agent uuid, + * region_id uuid, + * chat_type int, + * sent_on int, + * sent_on_day timestamp, * message text * ); */ diff --git a/InWorldz/InWorldz.Phlox.Engine/ExecutionScheduler.cs b/InWorldz/InWorldz.Phlox.Engine/ExecutionScheduler.cs index b3c75dde..4b1ffd7a 100644 --- a/InWorldz/InWorldz.Phlox.Engine/ExecutionScheduler.cs +++ b/InWorldz/InWorldz.Phlox.Engine/ExecutionScheduler.cs @@ -363,7 +363,7 @@ internal void FinishedLoading(LoadUnloadRequest loadRequest, VM.CompiledScript s //no state means we need to fire state entry interp.ScriptState.RunState = VM.RuntimeState.Status.Running; - sysApi.OnScriptReset(); // there is no state, initialize LSL (reset) as a new script (e.g. runtime perms) + sysApi.OnScriptReset(); // there is no state, initialize LSL (reset) as a new script (e.g. runtime perms) this.PostEvent(interp.ItemId, new VM.PostedEvent { EventType = Types.SupportedEventList.Events.STATE_ENTRY, Args = new object[0] }); } } diff --git a/InWorldz/InWorldz.Phlox.Engine/LSLSystemAPI.cs b/InWorldz/InWorldz.Phlox.Engine/LSLSystemAPI.cs index 60a98142..9edcb6ac 100644 --- a/InWorldz/InWorldz.Phlox.Engine/LSLSystemAPI.cs +++ b/InWorldz/InWorldz.Phlox.Engine/LSLSystemAPI.cs @@ -14452,7 +14452,7 @@ public string iwReverseString(string src) public LSL_List iwListRemoveDuplicates(LSL_List src) { - if(src.Length <= 1) return src; + if(src.Length <= 1) return src; //yarrr... return new LSL_List( src.Data.Distinct().ToList() ); } @@ -14496,11 +14496,11 @@ public LSL_List iwListRemoveElements(LSL_List src, LSL_List elements, int count, { if(elements.Data.Contains(src.Data[i]) == false) { - if(count == -1 || counted < count) - { - ret.Add(src.Data[i]); - counted++; - } + if(count == -1 || counted < count) + { + ret.Add(src.Data[i]); + counted++; + } } } } @@ -15162,9 +15162,9 @@ public static string AsciiToString(string str) }); } - //Helper function for Ascii Compression - // Adapted from public domain code by Becky Pippen - // http://wiki.secondlife.com/wiki/User:Becky_Pippen/Text_Storage + //Helper function for Ascii Compression + // Adapted from public domain code by Becky Pippen + // http://wiki.secondlife.com/wiki/User:Becky_Pippen/Text_Storage private static string encode15BitsToChar(int num) { if (num < 0 || num >= 0x8000) return "�"; num += 0x1000; @@ -15176,19 +15176,19 @@ private static string encode15BitsToChar(int num) { )); } - //Helper function for Ascii Compression - // Adapted from public domain code by Becky Pippen - // http://wiki.secondlife.com/wiki/User:Becky_Pippen/Text_Storage + //Helper function for Ascii Compression + // Adapted from public domain code by Becky Pippen + // http://wiki.secondlife.com/wiki/User:Becky_Pippen/Text_Storage private static int charToInt(string src, int index) { if (index < 0) index = src.Length + index; if (Math.Abs(index) >= src.Length) return 0; char c = src[index]; return (int)c; } - - //Helper function for Ascii Compression - // Adapted from public domain code by Becky Pippen - // http://wiki.secondlife.com/wiki/User:Becky_Pippen/Text_Storage + + //Helper function for Ascii Compression + // Adapted from public domain code by Becky Pippen + // http://wiki.secondlife.com/wiki/User:Becky_Pippen/Text_Storage private static int decodeCharTo15Bits(string ch) { int t = Convert.ToChar(ch); @@ -15198,8 +15198,8 @@ private static int decodeCharTo15Bits(string ch) } //Compress an ascii string by encoding two characters into a single 15bit character. - // Adapted from public domain code by Becky Pippen - // http://wiki.secondlife.com/wiki/User:Becky_Pippen/Text_Storage + // Adapted from public domain code by Becky Pippen + // http://wiki.secondlife.com/wiki/User:Becky_Pippen/Text_Storage public static string AsciiCompress(string str) { if (str == "") return str; @@ -15227,8 +15227,8 @@ public static string AsciiCompress(string str) } //Decompress an ascii string from 15bit encoding. - // Adapted from public domain code by Becky Pippen - // http://wiki.secondlife.com/wiki/User:Becky_Pippen/Text_Storage + // Adapted from public domain code by Becky Pippen + // http://wiki.secondlife.com/wiki/User:Becky_Pippen/Text_Storage public static string AsciiDecompress(string str) { if (str == "") return str; @@ -16117,34 +16117,34 @@ public void botSearchBotOutfits(string pattern, int matchType, int start, int en try { - - if(matchType > 2) - { - if (matchType == 3) LSLError("IW_MATCH_COUNT is not a valid matching type for botSearchBotOutfits"); - else if (matchType == 4) LSLError("IW_MATCH_COUNT_REGEX is not a valid matching type for botSearchBotOutfits"); - } - else - { - IBotManager manager = World.RequestModuleInterface(); - if (manager != null) - { - List itms = manager.GetBotOutfitsByOwner(m_host.OwnerID); - int count=0; - foreach(string outfit in itms) - { - if(pattern == "" || iwMatchString(outfit, pattern, matchType) == 1) - { - if (count >= start && (end == -1 || count <= end)) - { - retVal.Add(outfit); - } - count++; - if (end != -1 && count > end) - break; - } - } - } - } + + if(matchType > 2) + { + if (matchType == 3) LSLError("IW_MATCH_COUNT is not a valid matching type for botSearchBotOutfits"); + else if (matchType == 4) LSLError("IW_MATCH_COUNT_REGEX is not a valid matching type for botSearchBotOutfits"); + } + else + { + IBotManager manager = World.RequestModuleInterface(); + if (manager != null) + { + List itms = manager.GetBotOutfitsByOwner(m_host.OwnerID); + int count=0; + foreach(string outfit in itms) + { + if(pattern == "" || iwMatchString(outfit, pattern, matchType) == 1) + { + if (count >= start && (end == -1 || count <= end)) + { + retVal.Add(outfit); + } + count++; + if (end != -1 && count > end) + break; + } + } + } + } } finally { diff --git a/InWorldz/InWorldz.Phlox.Engine/StateManager.cs b/InWorldz/InWorldz.Phlox.Engine/StateManager.cs index 39f32f9e..bee08393 100644 --- a/InWorldz/InWorldz.Phlox.Engine/StateManager.cs +++ b/InWorldz/InWorldz.Phlox.Engine/StateManager.cs @@ -146,8 +146,8 @@ private void SetupAndOpenDatabase() _connection.Open(); const string INITIALIZED_QUERY = "SELECT COUNT(*) AS tbl_count " + - "FROM sqlite_master " + - "WHERE type = 'table' AND tbl_name='StateData';"; + "FROM sqlite_master " + + "WHERE type = 'table' AND tbl_name='StateData';"; using (SQLiteCommand cmd = new SQLiteCommand(INITIALIZED_QUERY, _connection)) { diff --git a/InWorldz/InWorldz.PhysxPhysics/PhysxPrim.cs b/InWorldz/InWorldz.PhysxPhysics/PhysxPrim.cs index 8135b3ef..ac962a25 100644 --- a/InWorldz/InWorldz.PhysxPhysics/PhysxPrim.cs +++ b/InWorldz/InWorldz.PhysxPhysics/PhysxPrim.cs @@ -2406,15 +2406,15 @@ private void SetTouchNotificationOnGivenShapes(uint flags, IEnumerable _DefaultRegionsList = new List(); - /// - /// LoadStringListFromFile - /// - /// - /// - /// - private void LoadStringListFromFile(List theList, string fn, string desc) - { - if (File.Exists(fn)) - { - using (System.IO.StreamReader file = new System.IO.StreamReader(fn)) - { - string line; - while ((line = file.ReadLine()) != null) - { - line = line.Trim(); - if ((line != "") && !line.StartsWith(";") && !line.StartsWith("//")) - { - theList.Add(line); - m_log.InfoFormat("[LOGINSERVICE] Added {0} {1}", desc, line); - } - } - } - } - - } - - /// + /// + /// LoadStringListFromFile + /// + /// + /// + /// + private void LoadStringListFromFile(List theList, string fn, string desc) + { + if (File.Exists(fn)) + { + using (System.IO.StreamReader file = new System.IO.StreamReader(fn)) + { + string line; + while ((line = file.ReadLine()) != null) + { + line = line.Trim(); + if ((line != "") && !line.StartsWith(";") && !line.StartsWith("//")) + { + theList.Add(line); + m_log.InfoFormat("[LOGINSERVICE] Added {0} {1}", desc, line); + } + } + } + } + + } + + /// /// Constructor /// /// @@ -122,7 +122,7 @@ public LoginService(UserManagerBase userManager, LibraryRootFolder libraryRootFo // For returning users' where the preferred region is down LoadDefaultRegionsFromFile(DEFAULT_REGIONS_FILE); LoadStringListFromFile(_badViewerStrings, BAD_VIEWERS_FILE, "blacklisted viewer"); - } + } /// /// If the user is already logged in, try to notify the region that the user they've got is dead. @@ -283,7 +283,7 @@ public virtual XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request, IPEndPoin if (userProfile.CurrentAgent != null && userProfile.CurrentAgent.AgentOnline) { // Force a refresh for this due to Commit below - UUID userID = userProfile.ID; + UUID userID = userProfile.ID; m_userManager.PurgeUserFromCaches(userID); userProfile = m_userManager.GetUserProfile(userID); // on an error, return the former error we returned before recovery was supported. @@ -433,7 +433,7 @@ private bool IsViewerBlacklisted(string clientVersion) return false; } - protected virtual bool TryAuthenticateXmlRpcLogin( + protected virtual bool TryAuthenticateXmlRpcLogin( XmlRpcRequest request, string firstname, string lastname, out UserProfileData userProfile) { Hashtable requestData = (Hashtable)request.Params[0]; @@ -851,13 +851,13 @@ protected void SniffLoginKey(Uri uri, Hashtable requestData) protected bool PrepareLoginToREURI(Regex reURI, LoginResponse response, UserProfileData theUser, string startLocationRequest, string StartLocationType, string desc, string clientVersion) { - string region; - RegionInfo regionInfo = null; + string region; + RegionInfo regionInfo = null; Match uriMatch = reURI.Match(startLocationRequest); if (uriMatch == null) { m_log.InfoFormat("[LOGIN]: Got {0} {1}, but can't process it", desc, startLocationRequest); - return false; + return false; } region = uriMatch.Groups["region"].ToString(); @@ -865,15 +865,15 @@ protected bool PrepareLoginToREURI(Regex reURI, LoginResponse response, UserProf if (regionInfo == null) { m_log.InfoFormat("[LOGIN]: Got {0} {1}, can't locate region {2}", desc, startLocationRequest, region); - return false; + return false; } theUser.CurrentAgent.Position = new Vector3(float.Parse(uriMatch.Groups["x"].Value), float.Parse(uriMatch.Groups["y"].Value), float.Parse(uriMatch.Groups["z"].Value)); response.LookAt = "[r0,r1,r0]"; // can be: last, home, safe, url - response.StartLocation = StartLocationType; - return PrepareLoginToRegion(regionInfo, theUser, response, clientVersion); - } + response.StartLocation = StartLocationType; + return PrepareLoginToRegion(regionInfo, theUser, response, clientVersion); + } protected bool PrepareNextRegion(LoginResponse response, UserProfileData theUser, List theList, string startLocationRequest, string clientVersion) { @@ -891,15 +891,15 @@ protected bool PrepareNextRegion(LoginResponse response, UserProfileData theUser // For new users' first-time logins protected bool PrepareNextDefaultLogin(LoginResponse response, UserProfileData theUser, string startLocationRequest, string clientVersion) - { + { return PrepareNextRegion(response, theUser, _DefaultLoginsList, startLocationRequest, clientVersion); - } + } // For returning users' where the preferred region is down protected bool PrepareNextDefaultRegion(LoginResponse response, UserProfileData theUser, string clientVersion) - { + { return PrepareNextRegion(response, theUser, _DefaultRegionsList, "safe", clientVersion); - } + } /// /// Customises the login response and fills in missing values. This method also tells the login region to @@ -1008,7 +1008,7 @@ public bool CustomiseResponse(LoginResponse response, UserProfileData theUser, s } // No default regions available either. - // Send him to global default region home location instead (e.g. 1000,1000) + // Send him to global default region home location instead (e.g. 1000,1000) ulong defaultHandle = (((ulong)m_defaultHomeX * Constants.RegionSize) << 32) | ((ulong)m_defaultHomeY * Constants.RegionSize); diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 1c607493..2da594a2 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -50,7 +50,7 @@ public abstract class UserManagerBase : IUserService, IUserAdminService, IAvatar { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private bool m_isUserServer = false; + private bool m_isUserServer = false; /// /// List of plugins to search for user data @@ -153,8 +153,8 @@ private UserProfileData _GetUserProfile(string fname, string lname) if (profile != null) { - // We're forcing an update above, of the profile via the plugin, - // need to also force an update of the current agent data. + // We're forcing an update above, of the profile via the plugin, + // need to also force an update of the current agent data. profile.CurrentAgent = GetUserAgent(profile.ID, true); return profile; } diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index ead969a3..6e9ea838 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -256,11 +256,11 @@ public delegate void CreateNewInventoryItem( IClientAPI remoteClient, UUID transActionID, UUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask, int creationDate); - public delegate void LinkInventoryItem( + public delegate void LinkInventoryItem( IClientAPI remoteClient, UUID transActionID, UUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, UUID olditemID); - public delegate void FetchInventoryDescendents( + public delegate void FetchInventoryDescendents( IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder); public delegate void PurgeInventoryDescendents( @@ -285,7 +285,7 @@ public delegate void MoveInventoryItem( IClientAPI remoteClient, UUID folderID, UUID itemID, int length, string newName); public delegate void RemoveInventoryItem( - IClientAPI remoteClient, UUID itemID, bool forceDelete); + IClientAPI remoteClient, UUID itemID, bool forceDelete); public delegate void RemoveInventoryFolder( IClientAPI remoteClient, UUID folderID); @@ -740,7 +740,7 @@ public interface IClientAPI event CreateNewInventoryItem OnCreateNewInventoryItem; event LinkInventoryItem OnLinkInventoryItem; - event CreateInventoryFolder OnCreateNewInventoryFolder; + event CreateInventoryFolder OnCreateNewInventoryFolder; event UpdateInventoryFolder OnUpdateInventoryFolder; event MoveInventoryFolder OnMoveInventoryFolder; event FetchInventoryDescendents OnFetchInventoryDescendents; diff --git a/OpenSim/Framework/IConsole.cs b/OpenSim/Framework/IConsole.cs index a81cb5bc..90ea2333 100644 --- a/OpenSim/Framework/IConsole.cs +++ b/OpenSim/Framework/IConsole.cs @@ -68,7 +68,7 @@ public interface IConsole /// WriteLine-style message arguments void Notice(string sender, string format, params object[] args); - /// + /// /// Sends an error to the current console output /// /// The message to send @@ -103,7 +103,7 @@ public interface IConsole void Debug(string sender, string format, params object[] args); void LockOutput(); - void UnlockOutput(); + void UnlockOutput(); void Output(string text); void Output(string text, string level); diff --git a/OpenSim/Framework/IndexedPriorityQueue.cs b/OpenSim/Framework/IndexedPriorityQueue.cs index 8feb50c1..f8943b67 100644 --- a/OpenSim/Framework/IndexedPriorityQueue.cs +++ b/OpenSim/Framework/IndexedPriorityQueue.cs @@ -51,7 +51,7 @@ private struct IndexedItem : IComparable public int CompareTo(IndexedItem other) { - return Value.CompareTo(other.Value); + return Value.CompareTo(other.Value); } #endregion diff --git a/OpenSim/Framework/InventoryFolderBase.cs b/OpenSim/Framework/InventoryFolderBase.cs index a79a814a..c097ab58 100644 --- a/OpenSim/Framework/InventoryFolderBase.cs +++ b/OpenSim/Framework/InventoryFolderBase.cs @@ -151,5 +151,5 @@ public InventoryFolderBase(UUID id, string name, UUID owner, short type, UUID pa ParentID = parent; Version = version; } - } + } } diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index 9d447e7e..35db808e 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs @@ -272,7 +272,7 @@ public Primitive.TextureEntry Textures { get { - return m_textures; + return m_textures; } set { diff --git a/OpenSim/Framework/RenderMaterials.cs b/OpenSim/Framework/RenderMaterials.cs index 3206c7e0..ae105da4 100644 --- a/OpenSim/Framework/RenderMaterials.cs +++ b/OpenSim/Framework/RenderMaterials.cs @@ -12,7 +12,7 @@ namespace OpenSim.Framework /// A single textured face. Don't instantiate this class yourself, use the /// methods in RenderMaterials /// - [ProtoContract] + [ProtoContract] public class RenderMaterial : ICloneable { public enum eDiffuseAlphaMode : byte @@ -68,31 +68,31 @@ public Guid SerializableNormalID { set { NormalID = new UUID(value); } } - [ProtoMember(2)] + [ProtoMember(2)] public float NormalOffsetX { get; set; } - [ProtoMember(3)] + [ProtoMember(3)] public float NormalOffsetY { get; set; } - [ProtoMember(4)] + [ProtoMember(4)] public float NormalRepeatX { get; set; } - [ProtoMember(5)] + [ProtoMember(5)] public float NormalRepeatY { get; set; } - [ProtoMember(6)] + [ProtoMember(6)] public float NormalRotation { get; set; @@ -109,31 +109,31 @@ public Guid SerializableSpecularID { set { SpecularID = new UUID(value); } } - [ProtoMember(8)] + [ProtoMember(8)] public float SpecularOffsetX { get; set; } - [ProtoMember(9)] + [ProtoMember(9)] public float SpecularOffsetY { get; set; } - [ProtoMember(10)] + [ProtoMember(10)] public float SpecularRepeatX { get; set; } - [ProtoMember(11)] + [ProtoMember(11)] public float SpecularRepeatY { get; set; } - [ProtoMember(12)] + [ProtoMember(12)] public float SpecularRotation { get; set; @@ -151,25 +151,25 @@ public byte[] SerializableSpecularLightColor set { SpecularLightColor.FromBytes(value, 0, false); } } - [ProtoMember(14)] + [ProtoMember(14)] public byte SpecularLightExponent { get; set; } - [ProtoMember(15)] + [ProtoMember(15)] public byte EnvironmentIntensity { get; set; } - [ProtoMember(16)] + [ProtoMember(16)] public byte DiffuseAlphaMode { get; set; } - [ProtoMember(17)] + [ProtoMember(17)] public byte AlphaMaskCutoff { get; set; @@ -251,7 +251,7 @@ public override int GetHashCode () public override string ToString () { - return string.Format ("NormalID : {0}, NormalOffsetX : {1}, NormalOffsetY : {2}, NormalRepeatX : {3}, NormalRepeatY : {4}, NormalRotation : {5}, SpecularID : {6}, SpecularOffsetX : {7}, SpecularOffsetY : {8}, SpecularRepeatX : {9}, SpecularRepeatY : {10}, SpecularRotation : {11}, SpecularLightColor : {12}, SpecularLightExponent : {13}, EnvironmentIntensity : {14}, DiffuseAlphaMode : {15}, AlphaMaskCutoff : {16}", + return string.Format ("NormalID : {0}, NormalOffsetX : {1}, NormalOffsetY : {2}, NormalRepeatX : {3}, NormalRepeatY : {4}, NormalRotation : {5}, SpecularID : {6}, SpecularOffsetX : {7}, SpecularOffsetY : {8}, SpecularRepeatX : {9}, SpecularRepeatY : {10}, SpecularRotation : {11}, SpecularLightColor : {12}, SpecularLightExponent : {13}, EnvironmentIntensity : {14}, DiffuseAlphaMode : {15}, AlphaMaskCutoff : {16}", NormalID, NormalOffsetX, NormalOffsetY, NormalRepeatX, NormalRepeatY, NormalRotation, SpecularID, SpecularOffsetX, SpecularOffsetY, SpecularRepeatX, SpecularRepeatY, SpecularRotation, SpecularLightColor, SpecularLightExponent, EnvironmentIntensity, DiffuseAlphaMode, AlphaMaskCutoff); } @@ -329,17 +329,17 @@ public static RenderMaterial FromOSD (OSD osd) /// has a texture UUID of Y, every face would be textured with X except for /// face 18 that uses Y. In practice however, primitives utilize a maximum /// of nine faces. The values in this dictionary are linked through a UUID - /// key to the textures in a TextureEntry via MaterialID there. - [ProtoContract] + /// key to the textures in a TextureEntry via MaterialID there. + [ProtoContract] public class RenderMaterials - { + { #region Properties - [ProtoMember(1)] + [ProtoMember(1)] public Dictionary Materials { - get; - private set; - } + get; + private set; + } #endregion public RenderMaterials() @@ -374,25 +374,25 @@ public byte[] ToBytes() public override int GetHashCode () { - lock (Materials) { - int hashcode = 0; - foreach (var mat in Materials.Values) - hashcode ^= mat.GetHashCode (); + lock (Materials) { + int hashcode = 0; + foreach (var mat in Materials.Values) + hashcode ^= mat.GetHashCode (); - return hashcode; - } + return hashcode; + } } public override string ToString () { - lock (Materials) { - StringBuilder builder = new StringBuilder (); - builder.Append ("[ "); - foreach (KeyValuePair entry in Materials) - builder.AppendFormat (" MaterialId : {0}, RenderMaterial : {{ {1} }} ", entry.Key, entry.Value.ToString ()); - builder.Append(" ]"); - return builder.ToString(); - }; + lock (Materials) { + StringBuilder builder = new StringBuilder (); + builder.Append ("[ "); + foreach (KeyValuePair entry in Materials) + builder.AppendFormat (" MaterialId : {0}, RenderMaterial : {{ {1} }} ", entry.Key, entry.Value.ToString ()); + builder.Append(" ]"); + return builder.ToString(); + }; } } } diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 51f86dc5..e30345de 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -483,16 +483,16 @@ public string osSecret { } public string StatReport(OSHttpRequest httpRequest) - { - // If we catch a request for "callback", wrap the response in the value for jsonp - if( httpRequest.QueryString["callback"] != null) - { - return httpRequest.QueryString["callback"] + "(" + m_stats.XReport((DateTime.Now - m_startuptime).ToString() , m_version ) + ");"; - } - else - { - return m_stats.XReport((DateTime.Now - m_startuptime).ToString() , m_version ); - } + { + // If we catch a request for "callback", wrap the response in the value for jsonp + if( httpRequest.QueryString["callback"] != null) + { + return httpRequest.QueryString["callback"] + "(" + m_stats.XReport((DateTime.Now - m_startuptime).ToString() , m_version ) + ");"; + } + else + { + return m_stats.XReport((DateTime.Now - m_startuptime).ToString() , m_version ); + } } protected void RemovePIDFile() diff --git a/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs index 079d6b7a..37a02aac 100644 --- a/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs @@ -125,14 +125,14 @@ public interface IHttpServer void AddStreamHandler(IRequestHandler handler); bool AddXmlRPCHandler(string method, XmlRpcMethod handler); - bool AddXmlRPCHandler(string method, XmlRpcMethod handler, bool keepAlive); - + bool AddXmlRPCHandler(string method, XmlRpcMethod handler, bool keepAlive); + /// /// Gets the XML RPC handler for given method name /// /// Name of the method /// Returns null if not found - XmlRpcMethod GetXmlRPCHandler(string method); + XmlRpcMethod GetXmlRPCHandler(string method); /// /// Remove an HTTP handler diff --git a/OpenSim/Framework/Servers/HttpServer/XmlRpcStreamHandler.cs b/OpenSim/Framework/Servers/HttpServer/XmlRpcStreamHandler.cs index aef692a6..d7dc0a3a 100644 --- a/OpenSim/Framework/Servers/HttpServer/XmlRpcStreamHandler.cs +++ b/OpenSim/Framework/Servers/HttpServer/XmlRpcStreamHandler.cs @@ -57,7 +57,7 @@ public XmlRpcMethod Method public override byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) { XmlRpcRequest xmlRpcRequest = null; - XmlRpcResponse xmlRpcResponse = null; + XmlRpcResponse xmlRpcResponse = null; string requestBody = null; byte[] response; @@ -70,67 +70,67 @@ public override byte[] Handle(string path, Stream request, OSHttpRequest httpReq { xmlRpcRequest = (XmlRpcRequest)(new XmlRpcRequestDeserializer()).Deserialize(requestBody); } - catch (XmlException e) - { + catch (XmlException e) + { m_log.ErrorFormat("[XMLRPC STREAM HANDLER]: XmlRpc request failed to deserialize: {0} -> {1}", e, requestBody); xmlRpcRequest = null; } - if (xmlRpcRequest != null) + if (xmlRpcRequest != null) { - string methodName = xmlRpcRequest.MethodName; + string methodName = xmlRpcRequest.MethodName; if (methodName != null) - { - xmlRpcRequest.Params.Add(httpRequest.RemoteIPEndPoint); // Param[1] - xmlRpcRequest.Params.Add(httpRequest.Url); // Param[2] - xmlRpcRequest.Params.Add(getForwardedFor(httpRequest)); // Param[3] - - try - { - xmlRpcResponse = m_xmlrpcMethod(xmlRpcRequest, httpRequest.RemoteIPEndPoint); - } - catch(Exception e) - { - string errorMessage = + { + xmlRpcRequest.Params.Add(httpRequest.RemoteIPEndPoint); // Param[1] + xmlRpcRequest.Params.Add(httpRequest.Url); // Param[2] + xmlRpcRequest.Params.Add(getForwardedFor(httpRequest)); // Param[3] + + try + { + xmlRpcResponse = m_xmlrpcMethod(xmlRpcRequest, httpRequest.RemoteIPEndPoint); + } + catch(Exception e) + { + string errorMessage = String.Format( - "Requested method [{0}] from {1} threw exception: {2} {3}", - methodName, httpRequest.RemoteIPEndPoint.Address, e.Message, e.StackTrace); + "Requested method [{0}] from {1} threw exception: {2} {3}", + methodName, httpRequest.RemoteIPEndPoint.Address, e.Message, e.StackTrace); m_log.ErrorFormat("[XMLRPC STREAM HANDLER]: {0}", errorMessage); - - // if the registered XmlRpc method threw an exception, we pass a fault-code along - xmlRpcResponse = new XmlRpcResponse(); - - // Code probably set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php - xmlRpcResponse.SetFault(-32603, errorMessage); - } - } - else - { - xmlRpcResponse = new XmlRpcResponse(); - - // Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php - xmlRpcResponse.SetFault( - XmlRpcErrorCodes.SERVER_ERROR_METHOD, - String.Format("Requested method [{0}] not found", methodName)); - } - - response = Encoding.UTF8.GetBytes(XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse)); - httpResponse.ContentType = "text/xml"; + + // if the registered XmlRpc method threw an exception, we pass a fault-code along + xmlRpcResponse = new XmlRpcResponse(); + + // Code probably set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php + xmlRpcResponse.SetFault(-32603, errorMessage); + } + } + else + { + xmlRpcResponse = new XmlRpcResponse(); + + // Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php + xmlRpcResponse.SetFault( + XmlRpcErrorCodes.SERVER_ERROR_METHOD, + String.Format("Requested method [{0}] not found", methodName)); + } + + response = Encoding.UTF8.GetBytes(XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse)); + httpResponse.ContentType = "text/xml"; } else - { - response = Encoding.UTF8.GetBytes("Not found"); + { + response = Encoding.UTF8.GetBytes("Not found"); httpResponse.ContentType = "text/plain"; - httpResponse.StatusCode = 404; - httpResponse.StatusDescription = "Not Found"; - httpResponse.ProtocolVersion = new System.Version("1.0"); - - m_log.ErrorFormat( + httpResponse.StatusCode = 404; + httpResponse.StatusDescription = "Not Found"; + httpResponse.ProtocolVersion = new System.Version("1.0"); + + m_log.ErrorFormat( "[XMLRPC STREAM HANDLER]: Handler not found for http request {0} {1}", - httpRequest.HttpMethod, httpRequest.Url.PathAndQuery); + httpRequest.HttpMethod, httpRequest.Url.PathAndQuery); } httpResponse.ContentLength64 = response.LongLength; @@ -142,17 +142,17 @@ public override byte[] Handle(string path, Stream request, OSHttpRequest httpReq private static string getForwardedFor(OSHttpRequest httpRequest) { - string xff = "X-Forwarded-For"; - string xfflower = xff.ToLower(); + string xff = "X-Forwarded-For"; + string xfflower = xff.ToLower(); - foreach (string s in httpRequest.Headers.AllKeys) - { - if ((s != null) && s.Equals(xfflower)) - { - xff = xfflower; - break; - } - } + foreach (string s in httpRequest.Headers.AllKeys) + { + if ((s != null) && s.Equals(xfflower)) + { + xff = xfflower; + break; + } + } return (xff); } diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs index 53bcfead..857c897e 100644 --- a/OpenSim/Framework/TaskInventoryItem.cs +++ b/OpenSim/Framework/TaskInventoryItem.cs @@ -121,7 +121,7 @@ public class TaskInventoryItem : IInventoryItem, ICloneable private int _permsMask; private int _type = 0; private UUID _oldID; - private bool _hasControls = false; // does not need to be serialized, reassigned on startup/rez + private bool _hasControls = false; // does not need to be serialized, reassigned on startup/rez public bool ContainsMultipleItems { diff --git a/OpenSim/Framework/Tests/RenderMaterialsTests.cs b/OpenSim/Framework/Tests/RenderMaterialsTests.cs index 91c9d345..cc3f78d1 100644 --- a/OpenSim/Framework/Tests/RenderMaterialsTests.cs +++ b/OpenSim/Framework/Tests/RenderMaterialsTests.cs @@ -41,19 +41,19 @@ public void T000_OSDFromToTest() Assert.That (matFromOSD.AlphaMaskCutoff, Is.EqualTo(0)); } - [Test] - public void T001_ToFromBinaryTest() - { - RenderMaterial mat = new RenderMaterial (); - RenderMaterials mats = new RenderMaterials (); + [Test] + public void T001_ToFromBinaryTest() + { + RenderMaterial mat = new RenderMaterial (); + RenderMaterials mats = new RenderMaterials (); String key = UUID.Random().ToString(); mats.Materials.Add(key, mat); - byte[] bytes = mats.ToBytes (); + byte[] bytes = mats.ToBytes (); RenderMaterials newmats = RenderMaterials.FromBytes(bytes, 0); RenderMaterial newmat = newmats.Materials[key]; - Assert.That (mat, Is.EqualTo(newmat)); - } + Assert.That (mat, Is.EqualTo(newmat)); + } } } diff --git a/OpenSim/Grid/MessagingServer.Modules/UserDataBaseService.cs b/OpenSim/Grid/MessagingServer.Modules/UserDataBaseService.cs index fdba1f14..ff74fa46 100644 --- a/OpenSim/Grid/MessagingServer.Modules/UserDataBaseService.cs +++ b/OpenSim/Grid/MessagingServer.Modules/UserDataBaseService.cs @@ -44,7 +44,7 @@ public UserDataBaseService() public UserAgentData GetUserAgentData(UUID AgentID) { - // This is the user DATABASE service, it expects a fresh read. Force a refresh. + // This is the user DATABASE service, it expects a fresh read. Force a refresh. return GetUserAgent(AgentID, true); } diff --git a/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs b/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs index 36f9d7c4..ddfd9f58 100644 --- a/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs +++ b/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs @@ -109,7 +109,7 @@ public void RegisterHandlers(BaseHttpServer httpServer) m_httpServer = httpServer; m_httpServer.AddXmlRPCHandler("region_startup", RegionStartup); - m_httpServer.AddXmlRPCHandler("region_shutdown", RegionShutdown); + m_httpServer.AddXmlRPCHandler("region_shutdown", RegionShutdown); m_httpServer.AddXmlRPCHandler("agent_location", AgentLocation); m_httpServer.AddXmlRPCHandler("agent_leaving", AgentLeaving); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 2bc57055..20560444 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -955,8 +955,8 @@ protected virtual bool ProcessPacketMethod(Packet packet) else { //there is not a local handler so see if there is a Global handler -// m_log.DebugFormat("Packet(Global): {0}", packet.ToString()); - bool found; +// m_log.DebugFormat("Packet(Global): {0}", packet.ToString()); + bool found; PacketMethod method; lock (PacketHandlers) { @@ -1207,7 +1207,7 @@ private void EmptyQueueProcessUpdates(ThrottleOutPacketTypeFlags categories) public event UpdateAvatarProperties OnUpdateAvatarProperties; public event CreateNewInventoryItem OnCreateNewInventoryItem; public event LinkInventoryItem OnLinkInventoryItem; - public event CreateInventoryFolder OnCreateNewInventoryFolder; + public event CreateInventoryFolder OnCreateNewInventoryFolder; public event UpdateInventoryFolder OnUpdateInventoryFolder; public event MoveInventoryFolder OnMoveInventoryFolder; public event FetchInventoryDescendents OnFetchInventoryDescendents; @@ -3872,11 +3872,11 @@ public void SendSimStats(SimStats stats) //pack.Region = //stats.RegionBlock; pack.Stat = stats.StatsBlock; pack.RegionInfo = - new SimStatsPacket.RegionInfoBlock[1] + new SimStatsPacket.RegionInfoBlock[1] { - new SimStatsPacket.RegionInfoBlock() + new SimStatsPacket.RegionInfoBlock() { - RegionFlagsExtended = stats.RegionFlags + RegionFlagsExtended = stats.RegionFlags } }; @@ -3967,20 +3967,20 @@ public void SendObjectPropertiesReply( if (OwnerUUID == this.AgentId) { if ((FoldedOwnerMask & (uint)PermissionMask.Copy) == (uint)PermissionMask.Copy) - aggregatePerms |= 0x00000003; // 00000011b Copy + aggregatePerms |= 0x00000003; // 00000011b Copy if ((FoldedOwnerMask & (uint)PermissionMask.Modify) == (uint)PermissionMask.Modify) - aggregatePerms |= 0x0000000C; // 00001100b Modify + aggregatePerms |= 0x0000000C; // 00001100b Modify if ((FoldedOwnerMask & (uint)PermissionMask.Transfer) == (uint)PermissionMask.Transfer) - aggregatePerms |= 0x00000030; // 00110000b Transfer + aggregatePerms |= 0x00000030; // 00110000b Transfer } else { if ((FoldedNextOwnerMask & (uint)PermissionMask.Copy) == (uint)PermissionMask.Copy) - aggregatePerms |= 0x00000003; // 00000011b Copy + aggregatePerms |= 0x00000003; // 00000011b Copy if ((FoldedNextOwnerMask & (uint)PermissionMask.Modify) == (uint)PermissionMask.Modify) - aggregatePerms |= 0x0000000C; // 00001100b Modify + aggregatePerms |= 0x0000000C; // 00001100b Modify if ((FoldedNextOwnerMask & (uint)PermissionMask.Transfer) == (uint)PermissionMask.Transfer) - aggregatePerms |= 0x00000030; // 00110000b Transfer + aggregatePerms |= 0x00000030; // 00110000b Transfer } proper.ObjectData[0].AggregatePerms = aggregatePerms; // proper.ObjectData[0].AggregatePerms = 53; @@ -5729,7 +5729,7 @@ protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType LLUDPServer.LogPacketHeader(false, m_circuitCode, 0, packet.Type, (ushort)packet.Length); #endregion BinaryStats - DebugPacket("<<< OUT <<<", packet); + DebugPacket("<<< OUT <<<", packet); OutPacket(packet, throttlePacketType, true); } @@ -5806,8 +5806,8 @@ public void DecipherGenericMessage(string gmMethod, UUID gmInvoice, GenericMessa /// OpenMetaverse.packet public void ProcessInPacket(Packet Pack) { - DebugPacket(">>> IN >>>", Pack); - if (IsActive) + DebugPacket(">>> IN >>>", Pack); + if (IsActive) { if (m_debugPacketLevel >= 255) m_log.DebugFormat("[CLIENT]: Packet IN {0}", Pack.Type); @@ -9716,7 +9716,7 @@ private bool HandleCreateInventoryItem(IClientAPI sender, Packet Pack) } return true; } - + private bool HandleLinkInventoryItem(IClientAPI sender, Packet Pack) { LinkInventoryItemPacket createLink = (LinkInventoryItemPacket)Pack; @@ -9747,8 +9747,8 @@ private bool HandleLinkInventoryItem(IClientAPI sender, Packet Pack) } return true; - } - + } + private bool HandleFetchInventory(IClientAPI sender, Packet Pack) { if (OnFetchInventory != null) @@ -11928,7 +11928,7 @@ private bool HandleTransferRequest(IClientAPI sender, Packet Pack) "[CLIENT]: {0} requested asset {1} in prim {2} but prim does not exist", Name, requestID, taskID); return true; } - // m_log.DebugFormat("HandleTransferRequest: Request for {0} in {1}", itemID, taskID); + // m_log.DebugFormat("HandleTransferRequest: Request for {0} in {1}", itemID, taskID); TaskInventoryItem tii = part.Inventory.GetInventoryItem(itemID); if (tii == null) { @@ -11961,13 +11961,13 @@ private bool HandleTransferRequest(IClientAPI sender, Packet Pack) if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) { - // m_log.WarnFormat( "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but modify permissions are not set", Name, requestID, itemID, taskID); + // m_log.WarnFormat( "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but modify permissions are not set", Name, requestID, itemID, taskID); return true; } if (tii.OwnerID != AgentId) { - // m_log.WarnFormat( "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the item is owned by {4}", Name, requestID, itemID, taskID, tii.OwnerID); + // m_log.WarnFormat( "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the item is owned by {4}", Name, requestID, itemID, taskID, tii.OwnerID); return true; } @@ -11975,13 +11975,13 @@ private bool HandleTransferRequest(IClientAPI sender, Packet Pack) tii.CurrentPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) { - // m_log.WarnFormat( "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item permissions are not modify/copy/transfer", Name, requestID, itemID, taskID); + // m_log.WarnFormat( "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item permissions are not modify/copy/transfer", Name, requestID, itemID, taskID); return true; } if (tii.AssetID != requestID) { - // m_log.WarnFormat("[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but this does not match item's asset {4}", Name, requestID, itemID, taskID, tii.AssetID); + // m_log.WarnFormat("[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but this does not match item's asset {4}", Name, requestID, itemID, taskID, tii.AssetID); return true; } } diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 2fc53218..ce648831 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -753,7 +753,7 @@ protected override void PacketReceived(UDPPacketBuffer buffer) IClientAPI client; if (!m_scene.TryGetClient(address, out client) || !(client is LLClientView)) { -// m_log.Warn("[LLUDPSERVER]: Received a " + packet.Type.ToString() + " packet from an unrecognized source: " + address.ToString() + " in " + m_scene.RegionInfo.RegionName); +// m_log.Warn("[LLUDPSERVER]: Received a " + packet.Type.ToString() + " packet from an unrecognized source: " + address.ToString() + " in " + m_scene.RegionInfo.RegionName); return; } diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs index 8b6fb488..25ffaf11 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs @@ -201,7 +201,7 @@ public bool RequestUpdateTaskInventoryItem( return true; } - public bool RequestUpdateInventoryItem(IClientAPI remoteClient, UUID transactionID, InventoryItemBase item) + public bool RequestUpdateInventoryItem(IClientAPI remoteClient, UUID transactionID, InventoryItemBase item) { AssetXferUploader uploader = GetTransactionUploader(transactionID); if (uploader == null) @@ -224,19 +224,19 @@ public bool RequestUpdateInventoryItem(IClientAPI remoteClient, UUID transaction // This upload transaction is complete. XferUploaders.Remove(transactionID); - UUID assetID = UUID.Combine(transactionID, remoteClient.SecureSessionId); + UUID assetID = UUID.Combine(transactionID, remoteClient.SecureSessionId); if (asset == null || asset.FullID != assetID) { m_log.ErrorFormat("[ASSETS]: RequestUpdateInventoryItem wrong asset ID or not found {0}", asset == null ? "null" : asset.FullID.ToString()); return; } - // Assets never get updated, new ones get created + // Assets never get updated, new ones get created UUID oldID = asset.FullID; - asset.FullID = UUID.Random(); - asset.Name = item.Name; - asset.Description = item.Description; - asset.Type = (sbyte)item.AssetType; + asset.FullID = UUID.Random(); + asset.Name = item.Name; + asset.Description = item.Description; + asset.Type = (sbyte)item.AssetType; try { @@ -266,7 +266,7 @@ public bool RequestUpdateInventoryItem(IClientAPI remoteClient, UUID transaction waitEvent.Dispose(); }); - return true; // userInfo item was updated + return true; // userInfo item was updated } } diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs index d171c07e..0f1271b3 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs @@ -39,8 +39,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction { public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private readonly Dictionary RegisteredScenes = new Dictionary(); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private readonly Dictionary RegisteredScenes = new Dictionary(); private bool m_dumpAssetsToFile = false; private Scene m_scene = null; @@ -199,7 +199,7 @@ public bool HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transa { m_log.DebugFormat( "[TRANSACTIONS MANAGER] Called HandleItemUpdateFromTransaction with item {0} transaction {1}", - item.Name, transactionID); + item.Name, transactionID); AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); @@ -221,7 +221,7 @@ public void HandleTaskItemUpdateFromTransaction( { m_log.DebugFormat( "[TRANSACTIONS MANAGER] Called HandleTaskItemUpdateFromTransaction with part {0} transaction {1}", - item.Name, transactionID); + item.Name, transactionID); AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); @@ -266,7 +266,7 @@ public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID t remoteClient.SendAgentAlertMessage("Server error uploading asset. Could not allocate uploader.", false); return; } -// m_log.Debug("HandleUDPUploadRequest(Initialize) - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile); +// m_log.Debug("HandleUDPUploadRequest(Initialize) - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile); // Okay, start the upload. uploader.Initialize(remoteClient, assetID, transaction, type, data, storeLocal, tempFile); diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderFileCache.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderFileCache.cs index a21acea4..2cb862bc 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderFileCache.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderFileCache.cs @@ -69,12 +69,12 @@ public J2KDecodeFileCache(bool enabled, string pFolder) Createj2KCacheFolder(pFolder); } } - - public static string CacheFolder + + public static string CacheFolder { - get { return Util.dataDir() + "/j2kDecodeCache"; } - } - + get { return Util.dataDir() + "/j2kDecodeCache"; } + } + /// /// Save Layers to Disk Cache /// @@ -251,7 +251,7 @@ public bool TryLoadCacheForAsset(UUID AssetId, out OpenJPEG.J2KLayerInfo[] Layer } } - return true; + return true; } /// diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs index 0b743eac..a66c414b 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs @@ -80,7 +80,7 @@ public void Initialize(Scene scene, IConfigSource source) Name, (useFileCache ? "enabled" : "disabled")); fCache = new J2KDecodeFileCache(useFileCache, J2KDecodeFileCache.CacheFolder); - scene.RegisterModuleInterface(this); + scene.RegisterModuleInterface(this); } public void PostInitialize() @@ -155,7 +155,7 @@ public void BeginDecode(UUID AssetId, byte[] assetData, DecodedCallback decodedR } } } - + public bool Decode(UUID assetID, byte[] j2kData) { OpenJPEG.J2KLayerInfo[] layers; @@ -165,7 +165,7 @@ public bool Decode(UUID assetID, byte[] j2kData) public bool Decode(UUID assetID, byte[] j2kData, out OpenJPEG.J2KLayerInfo[] layers) { bool decodedSuccessfully = true; - layers = new OpenJPEG.J2KLayerInfo[0]; // Dummy result for if it fails. Informs that there's only full quality + layers = new OpenJPEG.J2KLayerInfo[0]; // Dummy result for if it fails. Informs that there's only full quality if (! OpenJpegFail) { @@ -194,7 +194,7 @@ public bool Decode(UUID assetID, byte[] j2kData, out OpenJPEG.J2KLayerInfo[] lay return (decodedSuccessfully); } - + #endregion /// @@ -204,11 +204,11 @@ public bool Decode(UUID assetID, byte[] j2kData, out OpenJPEG.J2KLayerInfo[] lay /// Byte Array Asset Data private bool DoJ2KDecode(UUID assetID, byte[] j2kdata, out OpenJPEG.J2KLayerInfo[] layers) { - int DecodeTime = 0; + int DecodeTime = 0; DecodeTime = Environment.TickCount; bool decodedSuccessfully = true; - - layers = new OpenJPEG.J2KLayerInfo[0]; // Dummy result for if it fails. Informs that there's only full quality + + layers = new OpenJPEG.J2KLayerInfo[0]; // Dummy result for if it fails. Informs that there's only full quality try { @@ -253,17 +253,17 @@ private bool DoJ2KDecode(UUID assetID, byte[] j2kdata, out OpenJPEG.J2KLayerInfo m_log.Error( "[J2KDecoderModule]: OpenJpeg is not installed properly. Decoding disabled! This will slow down texture performance! Often times this is because of an old version of GLIBC. You must have version 2.4 or above!"); OpenJpegFail = true; - decodedSuccessfully = false; + decodedSuccessfully = false; } catch (Exception ex) { m_log.WarnFormat( "[J2KDecoderModule]: JPEG2000 texture decoding threw an exception for {0}, {1}", assetID, ex); - decodedSuccessfully = false; + decodedSuccessfully = false; } - return (decodedSuccessfully); + return (decodedSuccessfully); } private OpenJPEG.J2KLayerInfo[] CreateDefaultLayers(int j2kLength) @@ -290,7 +290,7 @@ private OpenJPEG.J2KLayerInfo[] CreateDefaultLayers(int j2kLength) return layers; } - + } } diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index d5c381e1..94e7ca74 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs @@ -269,12 +269,12 @@ public virtual void OnChatBroadcast(Object sender, OSChatMessage c) fromName = avatar.Name; sourceType = ChatSourceType.Agent; } else - if (c.SenderUUID != UUID.Zero) - { - fromID = c.SenderUUID; - } + if (c.SenderUUID != UUID.Zero) + { + fromID = c.SenderUUID; + } - // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); + // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); ((Scene)c.Scene).ForEachScenePresence( delegate(ScenePresence presence) diff --git a/OpenSim/Region/CoreModules/Avatar/Currency/AvatarCurrency.cs b/OpenSim/Region/CoreModules/Avatar/Currency/AvatarCurrency.cs index 874991f0..036392b9 100644 --- a/OpenSim/Region/CoreModules/Avatar/Currency/AvatarCurrency.cs +++ b/OpenSim/Region/CoreModules/Avatar/Currency/AvatarCurrency.cs @@ -780,7 +780,7 @@ public void ObjectBuy(IClientAPI remoteClient, UUID agentID, UUID sessionID, UUI IClientAPI sourceAvatarClient = LocateClientObject(remoteClient.AgentId); if (sourceAvatarClient == null) { - sourceAvatarClient.SendAgentAlertMessage("Purchase failed. No Controlling client found for sourceAvatar!", false); + sourceAvatarClient.SendAgentAlertMessage("Purchase failed. No Controlling client found for sourceAvatar!", false); return; } @@ -790,29 +790,29 @@ public void ObjectBuy(IClientAPI remoteClient, UUID agentID, UUID sessionID, UUI SceneObjectPart objectPart = s.GetSceneObjectPart(localID); if (objectPart == null) { - sourceAvatarClient.SendAgentAlertMessage("Purchase failed. The object was not found.", false); + sourceAvatarClient.SendAgentAlertMessage("Purchase failed. The object was not found.", false); return; } - ///// Prevent purchase spoofing, as well as viewer bugs. ///// - // Verify that the object is actually for sale - if (objectPart.ObjectSaleType == (byte)SaleType.Not) - { - remoteClient.SendAgentAlertMessage("Purchase failed. The item is not for sale.", false); - return; - } - // Verify that the viewer sale type actually matches the correct sale type of the object - if (saleType != objectPart.ObjectSaleType) - { - remoteClient.SendAgentAlertMessage("Purchase failed. The sale type does not match.", false); - return; - } - // Verify that the buyer is paying the correct amount - if (salePrice != objectPart.SalePrice) - { - remoteClient.SendAgentAlertMessage("Purchase failed. The payment price does not match the sale price.", false); - return; - } + ///// Prevent purchase spoofing, as well as viewer bugs. ///// + // Verify that the object is actually for sale + if (objectPart.ObjectSaleType == (byte)SaleType.Not) + { + remoteClient.SendAgentAlertMessage("Purchase failed. The item is not for sale.", false); + return; + } + // Verify that the viewer sale type actually matches the correct sale type of the object + if (saleType != objectPart.ObjectSaleType) + { + remoteClient.SendAgentAlertMessage("Purchase failed. The sale type does not match.", false); + return; + } + // Verify that the buyer is paying the correct amount + if (salePrice != objectPart.SalePrice) + { + remoteClient.SendAgentAlertMessage("Purchase failed. The payment price does not match the sale price.", false); + return; + } string objName = objectPart.ParentGroup.RootPart.Name; Vector3 pos = objectPart.AbsolutePosition; diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 2a7eb991..8dc01266 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs @@ -106,79 +106,79 @@ public List Execute() throw new NotImplementedException(); - /* - string filePath = "ERROR"; - int successfulAssetRestores = 0; - int failedAssetRestores = 0; - int successfulItemRestores = 0; - InventoryFolderImpl rootDestinationFolder = m_userInfo.RootFolder.FindFolderByPath(m_invPath); - - if (null == rootDestinationFolder) - { - // Possibly provide an option later on to automatically create this folder if it does not exist - m_log.ErrorFormat("[INVENTORY ARCHIVER]: Inventory path {0} does not exist", m_invPath); - - return nodesLoaded; - } - - archive = new TarArchiveReader(m_loadStream); - - // In order to load identically named folders, we need to keep track of the folders that we have already - // created - Dictionary foldersCreated = new Dictionary(); - - byte[] data; - TarArchiveReader.TarEntryType entryType; - while ((data = archive.ReadEntry(out filePath, out entryType)) != null) - { - if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) - { - if (LoadAsset(filePath, data)) - successfulAssetRestores++; - else - failedAssetRestores++; - } - else if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH)) - { - InventoryFolderImpl foundFolder - = ReplicateArchivePathToUserInventory( - filePath, TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType, - rootDestinationFolder, foldersCreated, nodesLoaded); - - if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY != entryType) - { - InventoryItemBase item = UserInventoryItemSerializer.Deserialize(data); + /* + string filePath = "ERROR"; + int successfulAssetRestores = 0; + int failedAssetRestores = 0; + int successfulItemRestores = 0; + InventoryFolderImpl rootDestinationFolder = m_userInfo.RootFolder.FindFolderByPath(m_invPath); + + if (null == rootDestinationFolder) + { + // Possibly provide an option later on to automatically create this folder if it does not exist + m_log.ErrorFormat("[INVENTORY ARCHIVER]: Inventory path {0} does not exist", m_invPath); + + return nodesLoaded; + } + + archive = new TarArchiveReader(m_loadStream); + + // In order to load identically named folders, we need to keep track of the folders that we have already + // created + Dictionary foldersCreated = new Dictionary(); + + byte[] data; + TarArchiveReader.TarEntryType entryType; + while ((data = archive.ReadEntry(out filePath, out entryType)) != null) + { + if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) + { + if (LoadAsset(filePath, data)) + successfulAssetRestores++; + else + failedAssetRestores++; + } + else if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH)) + { + InventoryFolderImpl foundFolder + = ReplicateArchivePathToUserInventory( + filePath, TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType, + rootDestinationFolder, foldersCreated, nodesLoaded); + + if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY != entryType) + { + InventoryItemBase item = UserInventoryItemSerializer.Deserialize(data); - // Don't use the item ID that's in the file - item.ID = UUID.Random(); + // Don't use the item ID that's in the file + item.ID = UUID.Random(); - UUID ospResolvedId = OspResolver.ResolveOspa(item.CreatorId, m_commsManager); - if (UUID.Zero != ospResolvedId) - item.CreatorIdAsUuid = ospResolvedId; + UUID ospResolvedId = OspResolver.ResolveOspa(item.CreatorId, m_commsManager); + if (UUID.Zero != ospResolvedId) + item.CreatorIdAsUuid = ospResolvedId; - item.Owner = m_userInfo.UserProfile.ID; + item.Owner = m_userInfo.UserProfile.ID; - // Reset folder ID to the one in which we want to load it - item.Folder = foundFolder.ID; + // Reset folder ID to the one in which we want to load it + item.Folder = foundFolder.ID; - m_userInfo.AddItem(item); - successfulItemRestores++; + m_userInfo.AddItem(item); + successfulItemRestores++; - // If we're loading an item directly into the given destination folder then we need to record - // it separately from any loaded root folders - if (rootDestinationFolder == foundFolder) - nodesLoaded.Add(item); - } - } - } + // If we're loading an item directly into the given destination folder then we need to record + // it separately from any loaded root folders + if (rootDestinationFolder == foundFolder) + nodesLoaded.Add(item); + } + } + } - archive.Close(); + archive.Close(); - m_log.DebugFormat("[INVENTORY ARCHIVER]: Restored {0} assets", successfulAssetRestores); - m_log.InfoFormat("[INVENTORY ARCHIVER]: Restored {0} items", successfulItemRestores); + m_log.DebugFormat("[INVENTORY ARCHIVER]: Restored {0} assets", successfulAssetRestores); + m_log.InfoFormat("[INVENTORY ARCHIVER]: Restored {0} items", successfulItemRestores); - return nodesLoaded;*/ - } + return nodesLoaded;*/ + } /// /// Replicate the inventory paths in the archive to the user's inventory as necessary. diff --git a/OpenSim/Region/CoreModules/Avatar/Search/AvatarSearchModule.cs b/OpenSim/Region/CoreModules/Avatar/Search/AvatarSearchModule.cs index bd6c53d4..b736c15a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Search/AvatarSearchModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Search/AvatarSearchModule.cs @@ -85,7 +85,7 @@ public class AvatarSearchModule : IRegionModule // status flags embedded in search replay messages of classifieds, events, groups, and places. // Places - private const uint STATUS_SEARCH_PLACES_NONE = 0x0; + private const uint STATUS_SEARCH_PLACES_NONE = 0x0; private const uint STATUS_SEARCH_PLACES_BANNEDWORD = 0x1 << 0; private const uint STATUS_SEARCH_PLACES_SHORTSTRING = 0x1 << 1; private const uint STATUS_SEARCH_PLACES_FOUNDNONE = 0x1 << 2; @@ -606,7 +606,7 @@ public void DirLandQuery(IClientAPI remoteClient, UUID queryID, uint queryFlags, if (maturities > 0) sqlTerms += " or "; sqlTerms += "regionsettings.maturity='1'"; maturities++; - } + } if (checkAdultFlag) { if (maturities > 0) sqlTerms += " or "; @@ -965,25 +965,25 @@ public void EventInfoRequest(IClientAPI remoteClient, uint queryEventID) // real string value so it shows correctly if (row["category"] == "18") data.category = "Discussion"; - if (row["category"] == "19") + if (row["category"] == "19") data.category = "Sports"; - if (row["category"] == "20") + if (row["category"] == "20") data.category = "Live Music"; - if (row["category"] == "22") + if (row["category"] == "22") data.category = "Commercial"; - if (row["category"] == "23") + if (row["category"] == "23") data.category = "Nightlife/Entertainment"; - if (row["category"] == "24") + if (row["category"] == "24") data.category = "Games/Contests"; - if (row["category"] == "25") + if (row["category"] == "25") data.category = "Pageants"; - if (row["category"] == "26") + if (row["category"] == "26") data.category = "Education"; - if (row["category"] == "27") + if (row["category"] == "27") data.category = "Arts and Culture"; - if (row["category"] == "28") + if (row["category"] == "28") data.category = "Charity/Support Groups"; - if (row["category"] == "29") + if (row["category"] == "29") data.category = "Miscellaneous"; data.description = row["description"].ToString(); diff --git a/OpenSim/Region/CoreModules/Plus/PlusModule.cs b/OpenSim/Region/CoreModules/Plus/PlusModule.cs index e99cc994..6e3a6d46 100644 --- a/OpenSim/Region/CoreModules/Plus/PlusModule.cs +++ b/OpenSim/Region/CoreModules/Plus/PlusModule.cs @@ -56,24 +56,24 @@ namespace OpenSim.Region.CoreModules.Plus /// /// POST to "http://regionIP:regionPort/plus/claim_parcel" /// { - /// “user_id”:”[user_uuid]” - /// “parcel_id:”[parcel_uuid]” - /// } - /// + /// “user_id”:”[user_uuid]” + /// “parcel_id:”[parcel_uuid]” + /// } + /// /// POST to "http://regionIP:regionPort/plus/abandon_parcel" /// { - /// “user_id”:”[user_uuid]” - /// “parcel_id:”[parcel_uuid]” - /// } - /// + /// “user_id”:”[user_uuid]” + /// “parcel_id:”[parcel_uuid]” + /// } + /// /// The response to both requests will be in the following format: /// /// CommandReply [ regionhost -> app ] (REPLY TO HTTP POST) /// /// { - /// "status":"OK"|"UNAUTHORIZED" - /// “parcel_id:”[actual parcel ID]” - /// “user_id”:”[actual parcel ownerID]” + /// "status":"OK"|"UNAUTHORIZED" + /// “parcel_id:”[actual parcel ID]” + /// “user_id”:”[actual parcel ownerID]” /// } public class PlusParcelModule : ISharedRegionModule diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index d16be1f2..9df40dcd 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs @@ -593,8 +593,8 @@ protected void HttpRequestConsoleCommand(string module, string[] args) MainConsole.Instance.OutputFormat("httprequest debug level is {0}", m_debugLevel); return; } - } - + } + public static bool ValidateServerCertificate( object sender, X509Certificate certificate, @@ -605,46 +605,46 @@ public static bool ValidateServerCertificate( if (Request.Headers.Get("NoVerifyCert") != null) return true; - - // If the certificate is a valid, signed certificate, return true. - if (sslPolicyErrors == System.Net.Security.SslPolicyErrors.None) - return true; - - // If there are errors in the certificate chain, look at each error to determine the cause. - if ((sslPolicyErrors & System.Net.Security.SslPolicyErrors.RemoteCertificateChainErrors) != 0) - { - if (chain != null && chain.ChainStatus != null) - { - foreach (System.Security.Cryptography.X509Certificates.X509ChainStatus status in chain.ChainStatus) - { - if ((certificate.Subject == certificate.Issuer) && - (status.Status == System.Security.Cryptography.X509Certificates.X509ChainStatusFlags.UntrustedRoot)) - { - // Self-signed certificates with an untrusted root are valid. - continue; - } - else - { - if (status.Status != System.Security.Cryptography.X509Certificates.X509ChainStatusFlags.NoError) - { - // If there are any other errors in the certificate chain, the certificate is invalid, - // so the method returns false. - return false; - } - } - } - } - - // When processing reaches this line, the only errors in the certificate chain are - // untrusted root errors for self-signed certificates. These certificates are valid - // for default Exchange server installations, so return true. - return true; - } - else - { - // In all other cases, return false. - return false; - } + + // If the certificate is a valid, signed certificate, return true. + if (sslPolicyErrors == System.Net.Security.SslPolicyErrors.None) + return true; + + // If there are errors in the certificate chain, look at each error to determine the cause. + if ((sslPolicyErrors & System.Net.Security.SslPolicyErrors.RemoteCertificateChainErrors) != 0) + { + if (chain != null && chain.ChainStatus != null) + { + foreach (System.Security.Cryptography.X509Certificates.X509ChainStatus status in chain.ChainStatus) + { + if ((certificate.Subject == certificate.Issuer) && + (status.Status == System.Security.Cryptography.X509Certificates.X509ChainStatusFlags.UntrustedRoot)) + { + // Self-signed certificates with an untrusted root are valid. + continue; + } + else + { + if (status.Status != System.Security.Cryptography.X509Certificates.X509ChainStatusFlags.NoError) + { + // If there are any other errors in the certificate chain, the certificate is invalid, + // so the method returns false. + return false; + } + } + } + } + + // When processing reaches this line, the only errors in the certificate chain are + // untrusted root errors for self-signed certificates. These certificates are valid + // for default Exchange server installations, so return true. + return true; + } + else + { + // In all other cases, return false. + return false; + } } #region Blacklist Checks @@ -695,8 +695,8 @@ private void ReadBlacklistFromConfig(IConfig config) /* Tests with config as follows HostBlacklist = "10.0.0.1,20.0.0.*,google.com" - PortBlacklist = "8010,8020" - HostnameAndPortBlacklist = "192.168.1.*:80,yahoo.com:1234" + PortBlacklist = "8010,8020" + HostnameAndPortBlacklist = "192.168.1.*:80,yahoo.com:1234" bool blocked; blocked = BlockedByBlacklist("http://10.0.0.1:1234"); //true diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs index d90ef2c7..d263debd 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs @@ -58,7 +58,7 @@ public class LandChannel : ILandChannel public const byte LAND_TYPE_OWNED_BY_REQUESTER = 3; //Equals 00000011 public const byte LAND_TYPE_PUBLIC = 0; //Equals 00000000 - // Other parcel overlay flags + // Other parcel overlay flags public const byte LAND_SOUND_LOCAL = 32; //Equals 00100000 //These are other constants. Yay! diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 8c7f755f..bc721f75 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -211,7 +211,7 @@ void EventManager_OnNewClient(IClientAPI client) client.OnParcelReclaim += new ParcelReclaim(handleParcelReclaim); client.OnParcelInfoRequest += new ParcelInfoRequest(handleParcelInfo); client.OnParcelDwellRequest += new ParcelDwellRequest(handleParcelDwell); - client.OnParcelFreezeUser += new FreezeUserUpdate(OnParcelFreezeUser); + client.OnParcelFreezeUser += new FreezeUserUpdate(OnParcelFreezeUser); client.OnParcelEjectUser += new EjectUserUpdate(OnParcelEjectUser); client.OnParcelDeedToGroup += new ParcelDeedToGroup(handleParcelDeedToGroup); @@ -1940,10 +1940,10 @@ public void OnParcelFreezeUser(IClientAPI client, UUID parcelowner, uint flags, } public void OnParcelEjectUser(IClientAPI client, UUID parcelowner, uint flags, UUID target) - { - // m_log.DebugFormat("OnParcelEjectUser: target {0} by {1} options {2}", target, parcelowner.ToString(), flags); - ScenePresence target_presence = m_scene.GetScenePresence(target); - if (target_presence == null) return; + { + // m_log.DebugFormat("OnParcelEjectUser: target {0} by {1} options {2}", target, parcelowner.ToString(), flags); + ScenePresence target_presence = m_scene.GetScenePresence(target); + if (target_presence == null) return; ILandObject land = GetLandObject(target_presence.AbsolutePosition.X, target_presence.AbsolutePosition.Y); @@ -1965,7 +1965,7 @@ public void OnParcelEjectUser(IClientAPI client, UUID parcelowner, uint flags, U targetClient.Close(); } } - } + } private LandObject FindParcelByUUID(UUID parcelID) { diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index ab4cb7be..4fdf7bb4 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -133,13 +133,13 @@ public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideSimulatorMaxPrimCount = overrideDel; } - public int getMaxPrimCount(int areaSize, bool includeBonusFactor) - { - //Normal Calculations + public int getMaxPrimCount(int areaSize, bool includeBonusFactor) + { + //Normal Calculations double bonus = 1.0; if (includeBonusFactor) bonus = m_scene.RegionInfo.RegionSettings.ObjectBonus; - int prims = Convert.ToInt32( + int prims = Convert.ToInt32( Math.Round((Convert.ToDouble(areaSize) / 65536.0) * Convert.ToDouble(m_scene.RegionInfo.PrimLimit) * bonus @@ -147,7 +147,7 @@ public int getMaxPrimCount(int areaSize, bool includeBonusFactor) if (prims > m_scene.RegionInfo.PrimLimit) prims = m_scene.RegionInfo.PrimLimit; return prims; - } + } public int getParcelMaxPrimCount(ILandObject thisObject, bool includeBonusFactor) { diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 7a00b05e..db864dec 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -309,12 +309,12 @@ protected void DebugPermissionInformation(string permissionCalled) // with the powers requested (powers = 0 for no powers check) protected bool IsGroupActiveRole(UUID groupID, UUID userID, ulong powers) { - ScenePresence sp = m_scene.GetScenePresence(userID); - if (sp == null) - return false; + ScenePresence sp = m_scene.GetScenePresence(userID); + if (sp == null) + return false; IClientAPI client = sp.ControllingClient; - return ((groupID == client.ActiveGroupId) && (client.ActiveGroupPowers != 0) && + return ((groupID == client.ActiveGroupId) && (client.ActiveGroupPowers != 0) && ((powers == 0) || ((client.ActiveGroupPowers & powers) == powers))); } @@ -558,40 +558,40 @@ public uint GenerateClientFlags(UUID user, UUID objID) if (task == null) return (uint)0; - uint baseflags = (uint)task.GetEffectiveObjectFlags(); // folded (PrimFlags) type, not PermissionsMask + uint baseflags = (uint)task.GetEffectiveObjectFlags(); // folded (PrimFlags) type, not PermissionsMask UUID objectOwner = task.OwnerID; - bool isOwner = false; + bool isOwner = false; // Remove any of the objectFlags that are temporary. - // These will get added back if appropriate in the next bit of code - baseflags &= (uint) - ~(PrimFlags.ObjectCopy | // Tells client you can copy the object - PrimFlags.ObjectModify | // tells client you can modify the object - PrimFlags.ObjectMove | // tells client that you can move the object (only, no mod) - PrimFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it - PrimFlags.ObjectYouOwner | // Tells client that you're the owner of the object - PrimFlags.ObjectOwnerModify | // Tells client that you're the owner of the object - PrimFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set + // These will get added back if appropriate in the next bit of code + baseflags &= (uint) + ~(PrimFlags.ObjectCopy | // Tells client you can copy the object + PrimFlags.ObjectModify | // tells client you can modify the object + PrimFlags.ObjectMove | // tells client that you can move the object (only, no mod) + PrimFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it + PrimFlags.ObjectYouOwner | // Tells client that you're the owner of the object + PrimFlags.ObjectOwnerModify | // Tells client that you're the owner of the object + PrimFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set ); - // Start by calculating the common/base rights to apply to everyone including the owner. - // Add bits in as rights allow, then make an override pass to turn off bits as needed at the end. + // Start by calculating the common/base rights to apply to everyone including the owner. + // Add bits in as rights allow, then make an override pass to turn off bits as needed at the end. - // Only remove any owner if the object actually doesn't have any owner + // Only remove any owner if the object actually doesn't have any owner if (objectOwner == UUID.Zero) { - baseflags &= (uint)~PrimFlags.ObjectAnyOwner; + baseflags &= (uint)~PrimFlags.ObjectAnyOwner; } else { //there is an owner, make sure the bit is set - baseflags |= (uint)PrimFlags.ObjectAnyOwner; - if (user == objectOwner) - isOwner = true; + baseflags |= (uint)PrimFlags.ObjectAnyOwner; + if (user == objectOwner) + isOwner = true; } - // Start with a mask for the owner and a friend with Edit perms. - uint objflags = AddClientFlags(task.OwnerMask, baseflags); // common flags for those who can edit + // Start with a mask for the owner and a friend with Edit perms. + uint objflags = AddClientFlags(task.OwnerMask, baseflags); // common flags for those who can edit // Object owners edit their own content unrestricted by other user checks if (isOwner) { @@ -605,40 +605,40 @@ public uint GenerateClientFlags(UUID user, UUID objID) (m_bypassPermissions || // no perms checks sp.GodLevel >= 200 || // Admin should be able to edit anything else in the sim (including admin objects) FriendHasEditPermission(objectOwner, user))) // friend with permissions - { - return RestrictClientFlags(task, objflags); // minimal perms checks, act like owner - } - - ///////////////////////////////////////////////////////////// - // No returns from the function after this, now we add flags, - // then apply retriction overrides when returning. - // Not the owner, or a friend with Edit permissions, or admin, - // so start again. Reset again to baseflags, and start adding - // Note that more than one test may apply, - // "else" or "return" isn't necessarily correct - objflags = AddClientFlags(task.EveryoneMask, baseflags); + { + return RestrictClientFlags(task, objflags); // minimal perms checks, act like owner + } + + ///////////////////////////////////////////////////////////// + // No returns from the function after this, now we add flags, + // then apply retriction overrides when returning. + // Not the owner, or a friend with Edit permissions, or admin, + // so start again. Reset again to baseflags, and start adding + // Note that more than one test may apply, + // "else" or "return" isn't necessarily correct + objflags = AddClientFlags(task.EveryoneMask, baseflags); if (task.OwnerID != UUID.Zero) - objflags |= (uint)PrimFlags.ObjectAnyOwner; - if (m_scene.IsLandOwner(user, task.AbsolutePosition)) + objflags |= (uint)PrimFlags.ObjectAnyOwner; + if (m_scene.IsLandOwner(user, task.AbsolutePosition)) { // On Plus regions, non-EO parcel owners users can only move their own objects if ((task.OwnerID == user) || m_scene.IsEstateManager(user) || (m_scene.RegionInfo.Product != ProductRulesUse.PlusUse)) - objflags |= (uint)PrimFlags.ObjectMove; + objflags |= (uint)PrimFlags.ObjectMove; } - if (HasGroupPermission(user, task.AbsolutePosition, 0)) + if (HasGroupPermission(user, task.AbsolutePosition, 0)) { - objflags |= GenerateGroupLandFlags(user, task.AbsolutePosition, objflags, task.EveryoneMask); + objflags |= GenerateGroupLandFlags(user, task.AbsolutePosition, objflags, task.EveryoneMask); } // Group permissions - if ((task.GroupID != UUID.Zero) && IsAgentInGroupRole(task.GroupID, user, 0)) - { - objflags |= AddClientFlags(task.GroupMask, objflags); - } + if ((task.GroupID != UUID.Zero) && IsAgentInGroupRole(task.GroupID, user, 0)) + { + objflags |= AddClientFlags(task.GroupMask, objflags); + } - return RestrictClientFlags(task, objflags); + return RestrictClientFlags(task, objflags); } private uint GenerateGroupLandFlags(UUID user, Vector3 parcelLocation, uint objflags, uint objectEveryoneMask) @@ -670,64 +670,64 @@ private uint GenerateGroupLandFlags(UUID user, Vector3 parcelLocation, uint objf else return objflags; } - // Adds flags to the second parameter (PrimFlags) based on the first parameter (PermissionsMask) and returns the result. - // Accepts collections of PermissionsMask bits and PrimFlags bits, respectively. - // Returns a collection of PrimFlags bits, not PermissionsMask bits. - private uint AddClientFlags(uint permissionMask, uint primFlags) + // Adds flags to the second parameter (PrimFlags) based on the first parameter (PermissionsMask) and returns the result. + // Accepts collections of PermissionsMask bits and PrimFlags bits, respectively. + // Returns a collection of PrimFlags bits, not PermissionsMask bits. + private uint AddClientFlags(uint permissionMask, uint primFlags) { // We are adding the temporary objectflags to the object's objectflags based on the - // permission flag given. These change the F flags on the client. - if ((permissionMask & (uint)PermissionMask.Copy) != 0) - { - primFlags |= (uint)PrimFlags.ObjectCopy; - } - - if ((permissionMask & (uint)PermissionMask.Move) != 0) - { - primFlags |= (uint)PrimFlags.ObjectMove; - } - - if ((permissionMask & (uint)PermissionMask.Modify) != 0) - { - primFlags |= (uint)PrimFlags.ObjectModify; - } - - if ((permissionMask & (uint)PermissionMask.Transfer) != 0) - { - primFlags |= (uint)PrimFlags.ObjectTransfer; - } - - return primFlags; - } - - // Filters out flags from the second parameter (task (SOP) PrimFlags) based on the first parameter (PermissionsMask) and returns the result. - // Intended to be applied to flags other than the owner - // Accepts and returns collections of PrimFlags bits, further filtering the ones returned in the function above. - private uint RestrictClientFlags(SceneObjectPart task, uint primFlags) - { - // Continue to reduce the folded perms as appropriate for friends with Edit and others - if ((task.OwnerMask & (uint)PermissionMask.Transfer) == 0) - { - // without transfer, a friend with edit cannot copy or transfer - primFlags &= ~(uint)PrimFlags.ObjectCopy; - primFlags &= ~(uint)PrimFlags.ObjectTransfer; - } - else - if ((task.OwnerMask & (uint)PermissionMask.Copy) == 0) // Transfer but it is no-copy - { - // don't allow a friend with edit to take the only copy - primFlags &= ~(uint)PrimFlags.ObjectCopy; - primFlags &= ~(uint)PrimFlags.ObjectTransfer; - } - - if (task.IsAttachment) // attachment and not the owner - { - // Disable others editing the owner's attachments - primFlags &= (uint)~(PrimFlags.ObjectModify | PrimFlags.ObjectMove); - } - - return primFlags; - } + // permission flag given. These change the F flags on the client. + if ((permissionMask & (uint)PermissionMask.Copy) != 0) + { + primFlags |= (uint)PrimFlags.ObjectCopy; + } + + if ((permissionMask & (uint)PermissionMask.Move) != 0) + { + primFlags |= (uint)PrimFlags.ObjectMove; + } + + if ((permissionMask & (uint)PermissionMask.Modify) != 0) + { + primFlags |= (uint)PrimFlags.ObjectModify; + } + + if ((permissionMask & (uint)PermissionMask.Transfer) != 0) + { + primFlags |= (uint)PrimFlags.ObjectTransfer; + } + + return primFlags; + } + + // Filters out flags from the second parameter (task (SOP) PrimFlags) based on the first parameter (PermissionsMask) and returns the result. + // Intended to be applied to flags other than the owner + // Accepts and returns collections of PrimFlags bits, further filtering the ones returned in the function above. + private uint RestrictClientFlags(SceneObjectPart task, uint primFlags) + { + // Continue to reduce the folded perms as appropriate for friends with Edit and others + if ((task.OwnerMask & (uint)PermissionMask.Transfer) == 0) + { + // without transfer, a friend with edit cannot copy or transfer + primFlags &= ~(uint)PrimFlags.ObjectCopy; + primFlags &= ~(uint)PrimFlags.ObjectTransfer; + } + else + if ((task.OwnerMask & (uint)PermissionMask.Copy) == 0) // Transfer but it is no-copy + { + // don't allow a friend with edit to take the only copy + primFlags &= ~(uint)PrimFlags.ObjectCopy; + primFlags &= ~(uint)PrimFlags.ObjectTransfer; + } + + if (task.IsAttachment) // attachment and not the owner + { + // Disable others editing the owner's attachments + primFlags &= (uint)~(PrimFlags.ObjectModify | PrimFlags.ObjectMove); + } + + return primFlags; + } protected bool HasReturnPermission(UUID currentUser, UUID objId, bool denyOnLocked) { @@ -963,7 +963,7 @@ protected bool GenericCommunicationPermission(UUID user, UUID target) { // Setting this to true so that cool stuff can happen until we define what determines Generic Communication Permission bool permission = true; - // string reason = "Only registered users may communicate with another account."; + // string reason = "Only registered users may communicate with another account."; // Uhh, we need to finish this before we enable it.. because it's blocking all sorts of goodies and features /*if (IsAdministrator(user)) @@ -1124,9 +1124,9 @@ private bool CanDuplicateObject(int landImpact, UUID objectID, UUID owner, Scene { //They can't even edit the object return false; - } + } - SceneObjectPart part = scene.GetSceneObjectPart(objectID); + SceneObjectPart part = scene.GetSceneObjectPart(objectID); if (part == null) return false; diff --git a/OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs b/OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs index 66706d34..921280b6 100644 --- a/OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs +++ b/OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs @@ -33,7 +33,7 @@ namespace OpenSim.Region.Framework.Interfaces { public interface IAgentAssetTransactions { - bool HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transactionID, + bool HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transactionID, InventoryItemBase item); void HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID, diff --git a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs index 6b78747c..f79ac369 100644 --- a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs +++ b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs @@ -221,7 +221,7 @@ void CreateScriptInstance(UUID itemId, int? startParam, ScriptStartFlags startFl uint MaskEffectivePermissions(); - uint MaskEffectiveNextPermissions(); // same as above but NextOwner + uint MaskEffectiveNextPermissions(); // same as above but NextOwner void ApplyNextOwnerPermissions(); diff --git a/OpenSim/Region/Framework/Interfaces/IJ2KDecoder.cs b/OpenSim/Region/Framework/Interfaces/IJ2KDecoder.cs index 80502740..ce36a3fa 100644 --- a/OpenSim/Region/Framework/Interfaces/IJ2KDecoder.cs +++ b/OpenSim/Region/Framework/Interfaces/IJ2KDecoder.cs @@ -32,7 +32,7 @@ namespace OpenSim.Region.Framework.Interfaces { public delegate void DecodedCallback(UUID AssetId, OpenJPEG.J2KLayerInfo[] layers); - + public interface IJ2KDecoder { void BeginDecode(UUID assetID, byte[] j2kData, DecodedCallback callback); diff --git a/OpenSim/Region/Framework/Scenes/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/AnimationSet.cs index aaf588f0..a5962a1e 100644 --- a/OpenSim/Region/Framework/Scenes/AnimationSet.cs +++ b/OpenSim/Region/Framework/Scenes/AnimationSet.cs @@ -37,9 +37,9 @@ namespace OpenSim.Region.Framework.Scenes [Serializable] public class AnimationSet { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public static AvatarAnimations Animations = new AvatarAnimations(); + public static AvatarAnimations Animations = new AvatarAnimations(); private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation(); private List m_animations = new List(); @@ -117,17 +117,17 @@ public void Clear(bool isSitting) /// public bool SetDefaultAnimation(UUID animID, int sequenceNum, UUID objectID) { - bool rc = false; - lock (m_defaultAnimation) - { - if (m_defaultAnimation.AnimID != animID) - { + bool rc = false; + lock (m_defaultAnimation) + { + if (m_defaultAnimation.AnimID != animID) + { m_defaultAnimation = new OpenSim.Framework.Animation(animID, sequenceNum, objectID); - rc = true; - } - } -// if (!rc) m_log.ErrorFormat("SetDefaultAnimation: Animation '{0}' already set.", animID.ToString()); - return rc; + rc = true; + } + } +// if (!rc) m_log.ErrorFormat("SetDefaultAnimation: Animation '{0}' already set.", animID.ToString()); + return rc; } protected bool ResetDefaultAnimation() @@ -144,7 +144,7 @@ public bool TrySetDefaultAnimation(string anim, int sequenceNum, UUID objectID) { return SetDefaultAnimation(Animations.AnimsUUID[anim], sequenceNum, objectID); } - m_log.ErrorFormat("TrySetDefaultAnimation: Animation '{0}' not found.", anim); + m_log.ErrorFormat("TrySetDefaultAnimation: Animation '{0}' not found.", anim); return false; } diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 7fbee111..a8623be0 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -44,11 +44,11 @@ namespace OpenSim.Region.Framework.Scenes { - public class ScenePermBits - { - public const uint SLAM = 0x00000008; - public const uint BASEMASK = 0x7fffff0; - } + public class ScenePermBits + { + public const uint SLAM = 0x00000008; + public const uint BASEMASK = 0x7fffff0; + } public partial class Scene { @@ -466,18 +466,18 @@ public void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID UUID itemID, InventoryItemBase itemUpd) { CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); - if (userInfo == null) - { - m_log.Error("[AGENT INVENTORY]: Agent ID " + remoteClient.AgentId + " inventory not found for item update."); + if (userInfo == null) + { + m_log.Error("[AGENT INVENTORY]: Agent ID " + remoteClient.AgentId + " inventory not found for item update."); return; - } + } InventoryItemBase item = userInfo.FindItem(itemID); if (item == null) { - m_log.Error("[AGENTINVENTORY]: Item ID " + itemID + " not found for an inventory item update."); + m_log.Error("[AGENTINVENTORY]: Item ID " + itemID + " not found for an inventory item update."); return; - } + } //make sure we actually OWN the item if (item.Owner != remoteClient.AgentId) @@ -488,7 +488,7 @@ public void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID return; } - // Update the item with the changes passed to us from the viewer + // Update the item with the changes passed to us from the viewer item.Name = itemUpd.Name; item.Description = itemUpd.Description; @@ -531,12 +531,12 @@ public void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID item.NextPermissions = itemUpd.NextPermissions; if (item.InvType == (int)InventoryType.Object) { - item.CurrentPermissions |= ScenePermBits.SLAM; // Slam! - item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; // Tell the viewer we are going to slam this + item.CurrentPermissions |= ScenePermBits.SLAM; // Slam! + item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; // Tell the viewer we are going to slam this } } - item.GroupID = itemUpd.GroupID; + item.GroupID = itemUpd.GroupID; item.GroupOwned = itemUpd.GroupOwned; item.CreationDate = itemUpd.CreationDate; // The client sends zero if its newly created? @@ -552,13 +552,13 @@ public void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID item.SaleType = itemUpd.SaleType; item.Flags = itemUpd.Flags; - // Check if the viewer has passed us a transaction to use - if (UUID.Zero != transactionID) { - IAgentAssetTransactions agentTransactions = this.RequestModuleInterface(); - if (agentTransactions != null) - if (agentTransactions.HandleItemUpdateFromTransaction(remoteClient, transactionID, item)) - return; // great, this one has been handled (as a transaction update) - } + // Check if the viewer has passed us a transaction to use + if (UUID.Zero != transactionID) { + IAgentAssetTransactions agentTransactions = this.RequestModuleInterface(); + if (agentTransactions != null) + if (agentTransactions.HandleItemUpdateFromTransaction(remoteClient, transactionID, item)) + return; // great, this one has been handled (as a transaction update) + } remoteClient.HandleWithInventoryWriteThread(() => { @@ -697,13 +697,13 @@ public virtual InventoryItemBase InventoryItemForGroup(UUID groupId, UUID sender public virtual void CalcItemPermsFromInvItem(InventoryItemBase itemCopy, InventoryItemBase item, bool isOwnerTransfer) { - if (isOwnerTransfer && Permissions.PropagatePermissions()) + if (isOwnerTransfer && Permissions.PropagatePermissions()) { // on a transferbase is limited to the next perms - itemCopy.BasePermissions = item.BasePermissions & item.NextPermissions; + itemCopy.BasePermissions = item.BasePermissions & item.NextPermissions; itemCopy.NextPermissions = item.NextPermissions; - itemCopy.EveryOnePermissions = 0; - itemCopy.GroupPermissions = 0; + itemCopy.EveryOnePermissions = 0; + itemCopy.GroupPermissions = 0; // Apply next perms to the inventory item copy itemCopy.CurrentPermissions = item.CurrentPermissions & item.NextPermissions; @@ -712,13 +712,13 @@ public virtual void CalcItemPermsFromInvItem(InventoryItemBase itemCopy, Invento // Preserve SLAM, may have been cleared by & with NextPermissions above if ((item.CurrentPermissions & ScenePermBits.SLAM) != 0) { - itemCopy.CurrentPermissions |= ScenePermBits.SLAM; // Slam! - itemCopy.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; // Tell the viewer we are going to slam this + itemCopy.CurrentPermissions |= ScenePermBits.SLAM; // Slam! + itemCopy.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; // Tell the viewer we are going to slam this } } - } - else - { + } + else + { itemCopy.BasePermissions = item.BasePermissions; itemCopy.CurrentPermissions = item.CurrentPermissions; } @@ -740,13 +740,13 @@ public virtual void CalcItemPermsFromInvItem(InventoryItemBase itemCopy, Invento public virtual void CalcItemPermsFromTaskItem(InventoryItemBase itemCopy, TaskInventoryItem item, bool isOwnerTransfer) { - if (isOwnerTransfer && Permissions.PropagatePermissions()) + if (isOwnerTransfer && Permissions.PropagatePermissions()) { // on a transferbase is limited to the next perms - itemCopy.BasePermissions = item.BasePermissions & item.NextPermissions; + itemCopy.BasePermissions = item.BasePermissions & item.NextPermissions; itemCopy.NextPermissions = item.NextPermissions; - itemCopy.EveryOnePermissions = 0; - itemCopy.GroupPermissions = 0; + itemCopy.EveryOnePermissions = 0; + itemCopy.GroupPermissions = 0; // Apply next perms to the inventory item copy itemCopy.CurrentPermissions = item.CurrentPermissions & item.NextPermissions; @@ -755,13 +755,13 @@ public virtual void CalcItemPermsFromTaskItem(InventoryItemBase itemCopy, TaskIn // Preserve SLAM, may have been cleared by & with NextPermissions above if ((item.CurrentPermissions & ScenePermBits.SLAM) != 0) { - itemCopy.CurrentPermissions |= ScenePermBits.SLAM; // Slam! - itemCopy.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; // Tell the viewer we are going to slam this + itemCopy.CurrentPermissions |= ScenePermBits.SLAM; // Slam! + itemCopy.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; // Tell the viewer we are going to slam this } } - } - else - { + } + else + { itemCopy.BasePermissions = item.BasePermissions; itemCopy.CurrentPermissions = item.CurrentPermissions; } @@ -1137,7 +1137,7 @@ private void CreateNewInventoryItem(IClientAPI remoteClient, UUID folderID, stri remoteClient, folderID, name, flags, callbackID, assetId, assetType, description, invType, baseMask, currentMask, everyoneMask, nextOwnerMask, groupMask, creationDate, creatorID); } - + /// /// Create a new Inventory Item /// @@ -1366,9 +1366,9 @@ CachedUserInfo userInfo } } } - - - /// + + + /// /// Link an inventory item to an existing item. /// /// @@ -1434,15 +1434,15 @@ private void HandleLinkInventoryItem(IClientAPI remoteClient, UUID transActionID } - - + + /// /// Remove an inventory item for the client's inventory - /// If "forceDelete" is true, this is an internal system operation, not a user operation + /// If "forceDelete" is true, this is an internal system operation, not a user operation /// /// /// - private void RemoveInventoryItem(IClientAPI remoteClient, UUID itemID, bool forceDelete) + private void RemoveInventoryItem(IClientAPI remoteClient, UUID itemID, bool forceDelete) { CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); @@ -1585,12 +1585,12 @@ private InventoryItemBase CreateAgentInventoryItemFromTask(UUID destAgent, Scene public InventoryItemBase MoveTaskInventoryItem(UUID AgentId, IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId, bool silent) { - if (part == null) - return null; + if (part == null) + return null; - TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId); - if (taskItem == null) - return null; + TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId); + if (taskItem == null) + return null; if (remoteClient == null) { @@ -1606,7 +1606,7 @@ public InventoryItemBase MoveTaskInventoryItem(UUID AgentId, IClientAPI remoteCl } - InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(AgentId, part, itemId); + InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(AgentId, part, itemId); if (agentItem == null) return null; @@ -1621,11 +1621,11 @@ public InventoryItemBase MoveTaskInventoryItem(UUID AgentId, IClientAPI remoteCl } - // if the Contents item is no-copy, dragging it out removes the one there - if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0) - part.Inventory.RemoveInventoryItem(itemId); + // if the Contents item is no-copy, dragging it out removes the one there + if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0) + part.Inventory.RemoveInventoryItem(itemId); - return agentItem; + return agentItem; } /// @@ -1767,10 +1767,10 @@ public void MoveTaskInventoryItem(UUID destId, SceneObjectPart part, UUID itemId srcTaskItem.NextPermissions; if (destTaskItem.InvType == (int)InventoryType.Object) { - destTaskItem.CurrentPermissions |= ScenePermBits.SLAM; // Slam! - destTaskItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; // Tell the viewer we are going to slam this + destTaskItem.CurrentPermissions |= ScenePermBits.SLAM; // Slam! + destTaskItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; // Tell the viewer we are going to slam this } - } + } } destTaskItem.Description = srcTaskItem.Description; @@ -1831,22 +1831,22 @@ public UUID MoveTaskInventoryItems(UUID AgentID, string category, SceneObjectPar return newFolderID; } - // Limits itemInfo, applying any limits in currentItem - private void LimitItemUpdate(TaskInventoryItem itemInfo, TaskInventoryItem currentItem) - { - itemInfo.BasePermissions &= currentItem.BasePermissions; - itemInfo.CurrentPermissions &= currentItem.BasePermissions; - itemInfo.NextPermissions &= currentItem.BasePermissions; - itemInfo.GroupPermissions &= currentItem.BasePermissions; - itemInfo.EveryonePermissions &= currentItem.BasePermissions; + // Limits itemInfo, applying any limits in currentItem + private void LimitItemUpdate(TaskInventoryItem itemInfo, TaskInventoryItem currentItem) + { + itemInfo.BasePermissions &= currentItem.BasePermissions; + itemInfo.CurrentPermissions &= currentItem.BasePermissions; + itemInfo.NextPermissions &= currentItem.BasePermissions; + itemInfo.GroupPermissions &= currentItem.BasePermissions; + itemInfo.EveryonePermissions &= currentItem.BasePermissions; - itemInfo.OwnerID = currentItem.OwnerID; - itemInfo.CreatorID = currentItem.CreatorID; - itemInfo.CreationDate = currentItem.CreationDate; + itemInfo.OwnerID = currentItem.OwnerID; + itemInfo.CreatorID = currentItem.CreatorID; + itemInfo.CreationDate = currentItem.CreationDate; itemInfo.InvType = currentItem.InvType; itemInfo.Type = currentItem.Type; - } + } /// /// Update an item in a prim (task) inventory. @@ -1927,17 +1927,17 @@ public void UpdateTaskInventory(IClientAPI remoteClient, UUID transactionID, Tas } else // Updating existing item with new perms etc { - // Enforce the item update contents (fixes exploit, Mantis #611) - LimitItemUpdate(itemInfo, currentItem); - if (transactionID != UUID.Zero) - { - IAgentAssetTransactions agentTransactions = this.RequestModuleInterface(); - if (agentTransactions != null) - { - agentTransactions.HandleTaskItemUpdateFromTransaction( - remoteClient, part, transactionID, currentItem); - } - } + // Enforce the item update contents (fixes exploit, Mantis #611) + LimitItemUpdate(itemInfo, currentItem); + if (transactionID != UUID.Zero) + { + IAgentAssetTransactions agentTransactions = this.RequestModuleInterface(); + if (agentTransactions != null) + { + agentTransactions.HandleTaskItemUpdateFromTransaction( + remoteClient, part, transactionID, currentItem); + } + } if (part.Inventory.UpdateTaskInventoryItemFromItem(itemInfo)) part.GetProperties(remoteClient); } @@ -2021,15 +2021,15 @@ public void RezScript(IClientAPI remoteClient, InventoryItemBase itemBase, UUID return; if (part.OwnerID != remoteClient.AgentId) - { - // Group permissions - if ( (part.GroupID == UUID.Zero) || (remoteClient.GetGroupPowers(part.GroupID) == 0) || ((part.GroupMask & (uint)PermissionMask.Modify) == 0) ) - return; + { + // Group permissions + if ( (part.GroupID == UUID.Zero) || (remoteClient.GetGroupPowers(part.GroupID) == 0) || ((part.GroupMask & (uint)PermissionMask.Modify) == 0) ) + return; - } else { - if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) - return; - } + } else { + if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) + return; + } if (!Permissions.CanCreateObjectInventory( itemBase.InvType, part.ParentGroup.UUID, remoteClient.AgentId)) @@ -2106,18 +2106,18 @@ public string RezScript(UUID srcId, SceneObjectPart srcPart, UUID destId, int pi m_log.ErrorFormat("[PRIM INVENTORY]: Could not find target part {0} to load script into.", destId); return "Could not find target prim to load script."; } - + // Must own the object, and have modify rights if (srcPart.OwnerID != destPart.OwnerID) - { - // Group permissions - if ( (destPart.GroupID == UUID.Zero) || (destPart.GroupID != srcPart.GroupID) || - ((destPart.GroupMask & (uint)PermissionMask.Modify) == 0) ) - return "Ownership mismatch or lack of Modify permission."; - } else { - if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0) + { + // Group permissions + if ( (destPart.GroupID == UUID.Zero) || (destPart.GroupID != srcPart.GroupID) || + ((destPart.GroupMask & (uint)PermissionMask.Modify) == 0) ) + return "Ownership mismatch or lack of Modify permission."; + } else { + if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0) return "Destination lacks Modify permission."; - } + } if ((destPart.ScriptAccessPin == 0) || (destPart.ScriptAccessPin != pin)) { @@ -2159,10 +2159,10 @@ public string RezScript(UUID srcId, SceneObjectPart srcPart, UUID destId, int pi srcTaskItem.NextPermissions; if (destTaskItem.InvType == (int)InventoryType.Object) { - destTaskItem.CurrentPermissions |= ScenePermBits.SLAM; // Slam! - destTaskItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; // Tell the viewer we are going to slam this + destTaskItem.CurrentPermissions |= ScenePermBits.SLAM; // Slam! + destTaskItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; // Tell the viewer we are going to slam this } - } + } } destTaskItem.Description = srcTaskItem.Description; @@ -2733,19 +2733,19 @@ private void PerformInventoryReturn(UUID folderId, IEnumerable //for each owner, all items go to lost and founds foreach (KeyValuePair> ownerObjects in owners) { - // If the owner of ownerObjects is a group, the previous user owners may be different. - foreach (SceneObjectGroup SOG in ownerObjects.Value) - { + // If the owner of ownerObjects is a group, the previous user owners may be different. + foreach (SceneObjectGroup SOG in ownerObjects.Value) + { // Find the calculated owner based on the dictionary key value - CachedUserInfo uInfo = CommsManager.UserProfileCacheService.GetUserDetails(ownerObjects.Key); - if (uInfo == null) - { + CachedUserInfo uInfo = CommsManager.UserProfileCacheService.GetUserDetails(ownerObjects.Key); + if (uInfo == null) + { // The problem here is this is an async function with no failure case, so we need to do something with the object. // We can't fail it, skip/ignore it, unless the desired behavior is to lose the items. Return it to the user doing the return. - uInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); + uInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); if (uInfo != null) - m_log.WarnFormat("Return patched: Owner {0} not found for object '{1}' {2}, returning to {3} instead.", SOG.RootPart.LastOwnerID, SOG.Name, SOG.UUID, remoteClient.Name); - } + m_log.WarnFormat("Return patched: Owner {0} not found for object '{1}' {2}, returning to {3} instead.", SOG.RootPart.LastOwnerID, SOG.Name, SOG.UUID, remoteClient.Name); + } if (uInfo == null) { // Complete failure to look up any users. @@ -2762,7 +2762,7 @@ private void PerformInventoryReturn(UUID folderId, IEnumerable // their L&F if multiple objects were selected, but at least no data loss. this.CopyItemsToFolder(uInfo, destinationFolder.ID, items, remoteClient, true); } - } + } } } @@ -3382,16 +3382,16 @@ private SceneObjectGroup RezSingleObjectToWorld(IClientAPI remoteClient, UUID it { if (Permissions.PropagatePermissions()) { - if ((itemPermissions.CurrentPermissions & ScenePermBits.SLAM) != 0) - { // enforce slam bit, apply item perms to the group parts + if ((itemPermissions.CurrentPermissions & ScenePermBits.SLAM) != 0) + { // enforce slam bit, apply item perms to the group parts foreach (SceneObjectPart part in partList) { - part.EveryoneMask = item.EveryOnePermissions; - part.NextOwnerMask = item.NextPermissions; - part.GroupMask = 0; // DO NOT propagate here - } + part.EveryoneMask = item.EveryOnePermissions; + part.NextOwnerMask = item.NextPermissions; + part.GroupMask = 0; // DO NOT propagate here + } } - group.ApplyNextOwnerPermissions(); + group.ApplyNextOwnerPermissions(); } } @@ -3406,7 +3406,7 @@ private SceneObjectGroup RezSingleObjectToWorld(IClientAPI remoteClient, UUID it part.Inventory.ChangeInventoryOwner(item.Owner); ownerChanged = true; } - else if (((itemPermissions.CurrentPermissions & ScenePermBits.SLAM) != 0) && (!attachment)) // Slam! + else if (((itemPermissions.CurrentPermissions & ScenePermBits.SLAM) != 0) && (!attachment)) // Slam! { part.EveryoneMask = itemPermissions.EveryOnePermissions; part.NextOwnerMask = itemPermissions.NextPermissions; @@ -3456,8 +3456,8 @@ private SceneObjectGroup RezSingleObjectToWorld(IClientAPI remoteClient, UUID it remoteClient.SendInventoryItemCreateUpdate(ib, 0); } } - return null; - } + return null; + } return rootPart.ParentGroup; } diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4fd62881..cbfbe8a1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2464,7 +2464,7 @@ public void DeleteSceneObject(SceneObjectGroup group, bool silent, bool fromCros { foreach (SceneObjectPart part in group.Children.Values) { - if (!group.IsAttachment) // Optimization, can't sit on something you're wearing + if (!group.IsAttachment) // Optimization, can't sit on something you're wearing { // Unsit the avatars sitting on the parts UUID AgentID = part.GetAvatarOnSitTarget(); @@ -5214,7 +5214,7 @@ public void ObjectSaleInfo(IClientAPI client, UUID agentID, UUID sessionID, uint if (part.ParentGroup.IsDeleted) return; - if (client.AgentId != part.OwnerID) // prevent spoofing/hacking + if (client.AgentId != part.OwnerID) // prevent spoofing/hacking return; part = part.ParentGroup.RootPart; diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 5e1707b7..15e7ea5e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs @@ -442,7 +442,7 @@ public bool WaitForCallback(UUID id) if (count > 0) return true; else - return false; + return false; } private int NextTickCheck(int then, string msg) diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 46eacdd3..e8a67e96 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -799,7 +799,7 @@ public void DetachSingleAttachmentPointToInv(uint AttachmentPt, IClientAPI remot if (group == skipGroup) continue; // don't remove this one if (group.OwnerID != remoteClient.AgentId) - continue; // don't remove others' attachments + continue; // don't remove others' attachments byte currentAttachment = group.GetCurrentAttachmentPoint(); if (currentAttachment != (byte)AttachmentPt) continue; // we don't care about that attachment point diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index 0b20cace..9beaf919 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs @@ -347,11 +347,11 @@ public uint GetEffectiveNextPermissions(bool includeContents) perms &= part.Inventory.MaskEffectiveNextPermissions(); } - if ((nextOwnerMask & (uint)PermissionMask.Modify) == 0) + if ((nextOwnerMask & (uint)PermissionMask.Modify) == 0) perms &= ~(uint)PermissionMask.Modify; - if ((nextOwnerMask & (uint)PermissionMask.Copy) == 0) + if ((nextOwnerMask & (uint)PermissionMask.Copy) == 0) perms &= ~(uint)PermissionMask.Copy; - if ((nextOwnerMask & (uint)PermissionMask.Transfer) == 0) + if ((nextOwnerMask & (uint)PermissionMask.Transfer) == 0) perms &= ~(uint)PermissionMask.Transfer; return perms; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index fe348cdc..141f2971 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -3684,7 +3684,7 @@ private void UpdateRootPosition(Vector3 pos, bool saveUpdate) axDiff *= Quaternion.Inverse(partRotation); diff = axDiff; - // m_log.DebugFormat("UpdateRootPosition: Abs={0} Old={1} New={2} Diff={3}\n", AbsolutePosition, oldPos, newPos, diff); + // m_log.DebugFormat("UpdateRootPosition: Abs={0} Old={1} New={2} Diff={3}\n", AbsolutePosition, oldPos, newPos, diff); // pos (newpos) comes in as the new root/group offset, not an absolute position @@ -3699,7 +3699,7 @@ private void UpdateRootPosition(Vector3 pos, bool saveUpdate) } } - AbsolutePosition = newPos; // Updates GroupPosition in all parts + AbsolutePosition = newPos; // Updates GroupPosition in all parts HasGroupChanged = true; ScheduleGroupForTerseUpdate(); diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 747af736..d34c6bcb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1423,9 +1423,9 @@ public Vector3 AbsolutePosition if (IsAttachment) return GroupPosition; - return GetWorldPosition(); + return GetWorldPosition(); } - } + } public UUID ObjectCreator { @@ -1601,8 +1601,8 @@ public Quaternion SavedAttachmentRot public PrimFlags Flags { - get { return _flags; } - set { _flags = value; } + get { return _flags; } + set { _flags = value; } } [XmlIgnore] @@ -1682,14 +1682,14 @@ private void SendObjectPropertiesToClient(UUID AgentID) #region Public Methods - public bool IsRootPart() - { - if (m_parentGroup == null) - return true; // no parent group...consider this root - if (m_parentGroup.RootPart == null) - return true; // no parent part... consider this root - return (m_parentGroup.RootPart == this); // matches? - } + public bool IsRootPart() + { + if (m_parentGroup == null) + return true; // no parent group...consider this root + if (m_parentGroup.RootPart == null) + return true; // no parent part... consider this root + return (m_parentGroup.RootPart == this); // matches? + } public static readonly uint LEGACY_BASEMASK = 0x7FFFFFF0; public static bool IsLegacyBasemask(uint basemask) @@ -1707,7 +1707,7 @@ public void AddFlag(PrimFlags flag) // PrimFlags prevflag = Flags; if ((ObjectFlags & (uint) flag) == 0) { - _flags |= flag; + _flags |= flag; if (flag == PrimFlags.TemporaryOnRez) ResetExpire(); @@ -2930,7 +2930,7 @@ public void ScriptSetTemporaryStatus(bool Temporary) } public void ScriptSetPhysicsStatus(bool UsePhysics) - { + { if (m_parentGroup == null) AdjustPhysactorDynamics(UsePhysics, false); else diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 24e2d6cf..ec01d6c1 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -457,7 +457,7 @@ public void AddReplaceInventoryItem(TaskInventoryItem item, bool allowedDrop, bo if (i.Name == item.Name) { ReplaceInventoryItem(i.ItemID, allowedDrop, fireEvents, replaceArgs); - return; // found it, all done + return; // found it, all done } } @@ -567,10 +567,10 @@ public TaskInventoryItem GetInventoryItem(UUID itemId) item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; } else - { + { item.Flags &= ~(uint)InventoryItemFlags.ObjectSlamPerm; - item.CurrentPermissions &= ~ScenePermBits.SLAM; - } + item.CurrentPermissions &= ~ScenePermBits.SLAM; + } } } @@ -603,11 +603,11 @@ public bool UpdateTaskInventoryItemAsset(UUID ParentPartID, UUID ItemID, UUID As item.ItemID, AssetID); } item.AssetID = AssetID; - m_inventorySerial++; + m_inventorySerial++; m_part.TriggerScriptChangedEvent(Changed.INVENTORY); HasInventoryChanged = true; m_part.ParentGroup.HasGroupChanged = true; - m_part.ScheduleFullUpdate(); + m_part.ScheduleFullUpdate(); return true; } else @@ -880,26 +880,26 @@ public void RequestInventoryFile(IClientAPI client, IXfer xferManager) uint everyoneMask = 0; uint baseMask = item.BasePermissions; uint ownerMask = item.CurrentPermissions; - uint groupMask = item.GroupPermissions; - string itemID; - string desc; - - // only the owner of the item can see the UUIDs of Contents and possibly private data - if (ownerID == client.AgentId) - { - itemID = item.AssetID.ToString(); - desc = item.Description; + uint groupMask = item.GroupPermissions; + string itemID; + string desc; + + // only the owner of the item can see the UUIDs of Contents and possibly private data + if (ownerID == client.AgentId) + { + itemID = item.AssetID.ToString(); + desc = item.Description; // m_log.DebugFormat("[ASSETS]: RequestInventoryFile returning item #{0} itemID {1} asset {2}", ++items, item.ItemID, item.AssetID); - } - else - { - itemID = UUID.Zero.ToString(); - desc = "(not owner)"; - } + } + else + { + itemID = UUID.Zero.ToString(); + desc = "(not owner)"; + } invString.AddSectionEnd(); - invString.AddItemStart(); + invString.AddItemStart(); invString.AddNameValueLine("item_id", item.ItemID.ToString()); invString.AddNameValueLine("parent_id", m_part.UUID.ToString()); @@ -907,7 +907,7 @@ public void RequestInventoryFile(IClientAPI client, IXfer xferManager) invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask)); invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask)); - invString.AddNameValueLine("group_mask", Utils.UIntToHexString(groupMask)); + invString.AddNameValueLine("group_mask", Utils.UIntToHexString(groupMask)); invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask)); invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions)); @@ -919,7 +919,7 @@ public void RequestInventoryFile(IClientAPI client, IXfer xferManager) invString.AddNameValueLine("group_id", item.GroupID.ToString()); invString.AddSectionEnd(); - invString.AddNameValueLine("asset_id", itemID); + invString.AddNameValueLine("asset_id", itemID); invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]); invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]); invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags)); @@ -1059,7 +1059,7 @@ public void Close() public uint MaskEffectivePermissions() { - uint mask = ScenePermBits.BASEMASK; + uint mask = ScenePermBits.BASEMASK; lock (m_items) { @@ -1075,9 +1075,9 @@ public uint MaskEffectivePermissions() } return mask; } - public uint MaskEffectiveNextPermissions() - { - uint mask = ScenePermBits.BASEMASK; + public uint MaskEffectiveNextPermissions() + { + uint mask = ScenePermBits.BASEMASK; lock (m_items) { @@ -1091,10 +1091,10 @@ public uint MaskEffectiveNextPermissions() mask &= ~(uint)PermissionMask.Modify; } } - return mask; - } + return mask; + } - public void ApplyNextOwnerPermissions() + public void ApplyNextOwnerPermissions() { lock (m_items) { @@ -1132,7 +1132,7 @@ public bool Rationalize(UUID itemOwner) return ownerChanged; } - public void ApplyGodPermissions(uint perms) + public void ApplyGodPermissions(uint perms) { lock (m_items) { @@ -1142,9 +1142,9 @@ public void ApplyGodPermissions(uint perms) item.BasePermissions = perms; } } - m_inventorySerial++; - HasInventoryChanged = true; - } + m_inventorySerial++; + HasInventoryChanged = true; + } public bool ContainsScripts() { diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 28303f31..6f6c7a4e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -128,7 +128,7 @@ public class ScenePresence : EntityBase private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public static byte[] DefaultTexture; + public static byte[] DefaultTexture; // internal static RegionSettings s_RegionSettings; @@ -163,13 +163,13 @@ public class ScenePresence : EntityBase // rotation, prim cut, prim twist, prim taper, and prim shear. See mantis // issue #1716 private bool ADJUST_SIT_TARGET = true; // do it the old OpenSim way for content compatibility - private static readonly Vector3 m_sitTargetCorrectionOffset = new Vector3(0.1f, 0.0f, 0.3f); + private static readonly Vector3 m_sitTargetCorrectionOffset = new Vector3(0.1f, 0.0f, 0.3f); private float m_godlevel; private bool m_invulnerable = true; private Vector3 m_LastChildAgentUpdatePosition; -// private Vector3 m_lastChildAgentUpdateCamPosition; +// private Vector3 m_lastChildAgentUpdateCamPosition; private Vector3 m_LastRegionPosition = new Vector3(128, 128, 128); private int m_perfMonMS; @@ -178,8 +178,8 @@ public class ScenePresence : EntityBase private bool m_setAlwaysRun; private string m_movementAnimation = "DEFAULT"; - private string m_previousMovement = ""; // this doubles as our thread reentrancy lock (critical region) on anim updates - private long m_animPersistUntil = 0; + private string m_previousMovement = ""; // this doubles as our thread reentrancy lock (critical region) on anim updates + private long m_animPersistUntil = 0; private bool m_allowFalling = false; private bool m_useFlySlow = false; private bool m_usePreJump = false; @@ -812,7 +812,7 @@ private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) AbsolutePosition = m_controllingClient.StartPos; - m_animPersistUntil = 0; + m_animPersistUntil = 0; RegisterToEvents(); SetDirectionVectors(); @@ -910,11 +910,11 @@ private void SetDirectionVectors() Dir_Vectors[2] = new Vector3(0, 1, 0); //LEFT Dir_Vectors[3] = new Vector3(0, -1, 0); //RIGHT Dir_Vectors[4] = new Vector3(0, 0, 1); //UP - Dir_Vectors[5] = new Vector3(0, 0, -1); //DOWN + Dir_Vectors[5] = new Vector3(0, 0, -1); //DOWN Dir_Vectors[6] = new Vector3(0, 0, 0.1f); //UP_Nudge Dir_Vectors[7] = new Vector3(0, 0, 0.05f); //DOWN_Nudge -- Small positive improves landing from hover - Dir_Vectors[8] = new Vector3(2, 0, 0); //FORWARD*2 - Dir_Vectors[9] = new Vector3(-2, 0, 0); //BACK + Dir_Vectors[8] = new Vector3(2, 0, 0); //FORWARD*2 + Dir_Vectors[9] = new Vector3(-2, 0, 0); //BACK Dir_Vectors[10] = new Vector3(0, 6, 0); // LEFT_Nudge -- Strafe nudge is faster than fwd/back nudges Dir_Vectors[11] = new Vector3(0, -6, 0); // RIGHT_Nudge -- } @@ -933,12 +933,12 @@ private Vector3[] GetWalkDirectionVectors() vector[4] = new Vector3(m_CameraAtAxis.Z, 0, m_CameraUpAxis.Z); //UP vector[5] = new Vector3(-m_CameraAtAxis.Z, 0, -m_CameraUpAxis.Z); //DOWN vector[6] = new Vector3(m_CameraAtAxis.Z, 0, m_CameraUpAxis.Z); //UP_Nudge - vector[7] = new Vector3(-m_CameraAtAxis.Z, 0, -m_CameraUpAxis.Z); //DOWN_Nudge - vector[8] = (new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z) * 2); //FORWARD Nudge - vector[9] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK Nudge + vector[7] = new Vector3(-m_CameraAtAxis.Z, 0, -m_CameraUpAxis.Z); //DOWN_Nudge + vector[8] = (new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z) * 2); //FORWARD Nudge + vector[9] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK Nudge vector[10] = new Vector3(0, 1, 0); //LEFT_Nudge vector[11] = new Vector3(0, -1, 0); //RIGHT_Nudge - return vector; + return vector; } #endregion @@ -1144,7 +1144,7 @@ private void ContinueSitAsRootAgent(IClientAPI client, SceneObjectPart part, Vec //Rotation = sitTargetOrient; SetAgentPositionInfo(true, newPos, part, part.AbsolutePosition, Vector3.Zero); } - //m_animPersistUntil = 0; // abort any timed animation + //m_animPersistUntil = 0; // abort any timed animation // Avatar has arrived on prim int avatarsRemainingOnPrim = part.ParentGroup.RidingAvatarArrivedFromOtherSim(); @@ -1287,7 +1287,7 @@ public void StopFlying() // and send a full object update. // There's no message to send the client to tell it to stop flying - m_animPersistUntil = 0; // abort any timed animation + m_animPersistUntil = 0; // abort any timed animation TrySetMovementAnimation("LAND"); SceneView.SendFullUpdateToAllClients(); } @@ -1635,8 +1635,8 @@ public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData if ((flags & (uint) AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) != 0) { - m_animPersistUntil = 0; // abort any timed animation - TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); + m_animPersistUntil = 0; // abort any timed animation + TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); m_sittingGround = true; } // In the future, these values might need to go global. @@ -2226,7 +2226,7 @@ public void StandUp(SceneObjectPart known_part, bool fromCrossing, bool recheckG if (!fromCrossing) { - m_animPersistUntil = 0; // abort any timed animation + m_animPersistUntil = 0; // abort any timed animation TrySetMovementAnimation("STAND"); } } @@ -2514,7 +2514,7 @@ public void HandleAgentSit(IClientAPI remoteClient, UUID agentID, string sitAnim // First, remove the physActor so it doesn't mess with anything that happens below RemoveFromPhysicalScene(); Velocity = Vector3.Zero; - m_animPersistUntil = 0; // abort any timed animation + m_animPersistUntil = 0; // abort any timed animation TrySetMovementAnimation(sitAnimation); } } @@ -2672,39 +2672,39 @@ protected void TrySetMovementAnimation(string anim) if (!m_isChildAgent) { - // disregard duplicate updates - lock (m_previousMovement) // only one place (here) references m_previousMovement - { - if (anim == m_previousMovement) - return; -// m_log.DebugFormat(">>>> Thread {0} [{1}] changing {2} --> {3}", Thread.CurrentThread.Name, Thread.CurrentThread.ManagedThreadId.ToString(), m_previousMovement, anim); - m_previousMovement = anim; + // disregard duplicate updates + lock (m_previousMovement) // only one place (here) references m_previousMovement + { + if (anim == m_previousMovement) + return; +// m_log.DebugFormat(">>>> Thread {0} [{1}] changing {2} --> {3}", Thread.CurrentThread.Name, Thread.CurrentThread.ManagedThreadId.ToString(), m_previousMovement, anim); + m_previousMovement = anim; if (anim == "DEFAULT") anim = (m_posInfo.Parent == null) ? "STAND" : "SIT"; - m_movementAnimation = anim; - } - - m_animations.TrySetDefaultAnimation(anim, m_controllingClient.NextAnimationSequenceNumber, UUID.Zero); - // other code can change the default anims, so don't check for changes before notifying the viewers - // for example, if anyone has called ResetDefaultAnimation() to stop an anim, when we call it above, it will return false. - if ((m_scriptEngines != null) && (!IsInTransit)) - { - lock (m_attachments) - { - foreach (SceneObjectGroup grp in m_attachments) - { + m_movementAnimation = anim; + } + + m_animations.TrySetDefaultAnimation(anim, m_controllingClient.NextAnimationSequenceNumber, UUID.Zero); + // other code can change the default anims, so don't check for changes before notifying the viewers + // for example, if anyone has called ResetDefaultAnimation() to stop an anim, when we call it above, it will return false. + if ((m_scriptEngines != null) && (!IsInTransit)) + { + lock (m_attachments) + { + foreach (SceneObjectGroup grp in m_attachments) + { // Send CHANGED_ANIMATION to all attachment root prims - foreach (IScriptModule m in m_scriptEngines) - { - if (m == null) // No script engine loaded - continue; -// m_log.DebugFormat(">>>> Thread {0} [{1}] sending changed({2})", Thread.CurrentThread.Name, Thread.CurrentThread.ManagedThreadId.ToString(), anim); + foreach (IScriptModule m in m_scriptEngines) + { + if (m == null) // No script engine loaded + continue; +// m_log.DebugFormat(">>>> Thread {0} [{1}] sending changed({2})", Thread.CurrentThread.Name, Thread.CurrentThread.ManagedThreadId.ToString(), anim); m.PostObjectEvent(grp.RootPart.LocalId, "changed", new Object[] { (int)Changed.ANIMATION }); // CHANGED_ANIMATION - } - } - } - } - SendAnimPack(); + } + } + } + } + SendAnimPack(); } } @@ -2720,223 +2720,223 @@ public string GetMovementAnimation() } else if ((m_posInfo.Parent != null) || IsInTransitOnPrim || m_sittingGround) - { - //We are sitting on something, so we don't want our existing state to change + { + //We are sitting on something, so we don't want our existing state to change if (m_movementAnimation == "DEFAULT") return "SIT"; - return m_movementAnimation; - } - else if (m_movementflag != 0) - { - //We're moving - m_allowFalling = true; - if (PhysicsActor != null && PhysicsActor.IsColliding) - { - //And colliding. Can you guess what it is yet? - if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) - { - //Down key is being pressed. - if (PhysicsActor.Flying) - { - return "LAND"; - } - else - if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) + (m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0) - { - return "CROUCHWALK"; - } - else - { - return "CROUCH"; - } - } - else if (m_movementAnimation == "PREJUMP") - { + return m_movementAnimation; + } + else if (m_movementflag != 0) + { + //We're moving + m_allowFalling = true; + if (PhysicsActor != null && PhysicsActor.IsColliding) + { + //And colliding. Can you guess what it is yet? + if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) + { + //Down key is being pressed. + if (PhysicsActor.Flying) + { + return "LAND"; + } + else + if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) + (m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0) + { + return "CROUCHWALK"; + } + else + { + return "CROUCH"; + } + } + else if (m_movementAnimation == "PREJUMP") + { // m_log.DebugFormat("[SCENE PRESENCE]: GetMovementAnimation: PREJUMP"); - return "PREJUMP"; - } - else - if (PhysicsActor.Flying) - { + return "PREJUMP"; + } + else + if (PhysicsActor.Flying) + { // if (m_movementAnimation != "FLY") m_log.DebugFormat("[SCENE PRESENCE]: GetMovementAnimation: {0} --> FLY", m_movementAnimation); - return "FLY"; - } - else - if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0) - { + return "FLY"; + } + else + if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0) + { // if (m_movementAnimation != "JUMP") m_log.DebugFormat("[SCENE PRESENCE]: GetMovementAnimation: {0} --> JUMP", m_movementAnimation); - return "JUMP"; - } - else if (m_setAlwaysRun) - { - return "RUN"; - } - else - { + return "JUMP"; + } + else if (m_setAlwaysRun) + { + return "RUN"; + } + else + { // if (m_movementAnimation != "WALK") m_log.DebugFormat("[SCENE PRESENCE]: GetMovementAnimation: {0} --> WALK", m_movementAnimation); - return "WALK"; - } - } - else - { - //We're not colliding. Colliding isn't cool these days. - if (PhysicsActor != null && PhysicsActor.Flying) - { - //Are we moving forwards or backwards? - if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) != 0) - { - //Then we really are flying - if (m_setAlwaysRun) - { - return "FLY"; - } - else - { - if (m_useFlySlow == false) - { - return "FLY"; - } - else - { - return "FLYSLOW"; - } - } - } - else - { - if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0) - { - return "HOVER_UP"; - } - else - { - return "HOVER_DOWN"; - } - } - - } - else if (m_movementAnimation == "JUMP") - { - //If we were already jumping, continue to jump until we collide - return "JUMP"; - } - else if (m_movementAnimation == "PREJUMP" && (m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) == 0) - { - //If we were in a prejump, and the UP key is no longer being held down - //then we're not going to fly, so we're jumping - return "JUMP"; - - } - else if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0) - { - //They're pressing up, so we're either going to fly or jump - return "PREJUMP"; - } - else - { - //If we're moving and not flying and not jumping and not colliding.. - - if (m_movementAnimation == "WALK" || m_movementAnimation == "RUN") - { - //Let's not enter a FALLDOWN state here, since we're probably - //not colliding because we're going down hill. - return m_movementAnimation; - } - - //Record the time we enter this state so we know whether to "land" or not - if (m_movementAnimation != "FALLDOWN") - m_animPersistUntil = DateTime.Now.Ticks; - return "FALLDOWN"; - - } - } - } - else - { - //We're not moving. - if (PhysicsActor != null && PhysicsActor.IsColliding) - { - //But we are colliding. - if (m_movementAnimation == "FALLDOWN") - { - //We're re-using the m_animPersistUntil value here to see how long we've been falling - if ((DateTime.Now.Ticks - m_animPersistUntil) > TimeSpan.TicksPerSecond) - { - //Make sure we don't change state for a bit - if (m_movementAnimation != "LAND") - m_animPersistUntil = DateTime.Now.Ticks + TimeSpan.TicksPerSecond; - return "LAND"; - } - else - { - //We haven't been falling very long, we were probably just walking down hill - return "STAND"; - } - } - else if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0) - { - return "PREJUMP"; - } - else if (m_movementAnimation == "JUMP" || m_movementAnimation == "HOVER_DOWN") - { - //Make sure we don't change state for a bit - if (m_movementAnimation != "SOFT_LAND") - m_animPersistUntil = DateTime.Now.Ticks + (1 * TimeSpan.TicksPerSecond); - return "SOFT_LAND"; - - } - else if (PhysicsActor != null && PhysicsActor.Flying) - { - m_allowFalling = true; - if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0) - { - return "HOVER_UP"; - } - else if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) - { - return "HOVER_DOWN"; - } - else - { - return "HOVER"; - } - } - else - { - return "STAND"; - } - - } - else - { - //We're not colliding. - if (PhysicsActor != null && PhysicsActor.Flying) - { - - return "HOVER"; - - } - else if ((m_movementAnimation == "JUMP" || m_movementAnimation == "PREJUMP") && (m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) == 0) - { - - return "JUMP"; - - } - else if ((m_movementAnimation == "STAND") || (m_movementAnimation == "LAND")) - { - // Sometimes PhysicsActor.IsColliding returns false when standing on the ground. - // Try to recognize that by not falling from STAND until you move. - return m_movementAnimation; - } - else - { - //Record the time we enter this state so we know whether to "land" or not - if (m_movementAnimation != "FALLDOWN") - m_animPersistUntil = DateTime.Now.Ticks; - return "FALLDOWN"; - } - } - } + return "WALK"; + } + } + else + { + //We're not colliding. Colliding isn't cool these days. + if (PhysicsActor != null && PhysicsActor.Flying) + { + //Are we moving forwards or backwards? + if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) != 0) + { + //Then we really are flying + if (m_setAlwaysRun) + { + return "FLY"; + } + else + { + if (m_useFlySlow == false) + { + return "FLY"; + } + else + { + return "FLYSLOW"; + } + } + } + else + { + if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0) + { + return "HOVER_UP"; + } + else + { + return "HOVER_DOWN"; + } + } + + } + else if (m_movementAnimation == "JUMP") + { + //If we were already jumping, continue to jump until we collide + return "JUMP"; + } + else if (m_movementAnimation == "PREJUMP" && (m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) == 0) + { + //If we were in a prejump, and the UP key is no longer being held down + //then we're not going to fly, so we're jumping + return "JUMP"; + + } + else if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0) + { + //They're pressing up, so we're either going to fly or jump + return "PREJUMP"; + } + else + { + //If we're moving and not flying and not jumping and not colliding.. + + if (m_movementAnimation == "WALK" || m_movementAnimation == "RUN") + { + //Let's not enter a FALLDOWN state here, since we're probably + //not colliding because we're going down hill. + return m_movementAnimation; + } + + //Record the time we enter this state so we know whether to "land" or not + if (m_movementAnimation != "FALLDOWN") + m_animPersistUntil = DateTime.Now.Ticks; + return "FALLDOWN"; + + } + } + } + else + { + //We're not moving. + if (PhysicsActor != null && PhysicsActor.IsColliding) + { + //But we are colliding. + if (m_movementAnimation == "FALLDOWN") + { + //We're re-using the m_animPersistUntil value here to see how long we've been falling + if ((DateTime.Now.Ticks - m_animPersistUntil) > TimeSpan.TicksPerSecond) + { + //Make sure we don't change state for a bit + if (m_movementAnimation != "LAND") + m_animPersistUntil = DateTime.Now.Ticks + TimeSpan.TicksPerSecond; + return "LAND"; + } + else + { + //We haven't been falling very long, we were probably just walking down hill + return "STAND"; + } + } + else if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0) + { + return "PREJUMP"; + } + else if (m_movementAnimation == "JUMP" || m_movementAnimation == "HOVER_DOWN") + { + //Make sure we don't change state for a bit + if (m_movementAnimation != "SOFT_LAND") + m_animPersistUntil = DateTime.Now.Ticks + (1 * TimeSpan.TicksPerSecond); + return "SOFT_LAND"; + + } + else if (PhysicsActor != null && PhysicsActor.Flying) + { + m_allowFalling = true; + if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0) + { + return "HOVER_UP"; + } + else if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) + { + return "HOVER_DOWN"; + } + else + { + return "HOVER"; + } + } + else + { + return "STAND"; + } + + } + else + { + //We're not colliding. + if (PhysicsActor != null && PhysicsActor.Flying) + { + + return "HOVER"; + + } + else if ((m_movementAnimation == "JUMP" || m_movementAnimation == "PREJUMP") && (m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) == 0) + { + + return "JUMP"; + + } + else if ((m_movementAnimation == "STAND") || (m_movementAnimation == "LAND")) + { + // Sometimes PhysicsActor.IsColliding returns false when standing on the ground. + // Try to recognize that by not falling from STAND until you move. + return m_movementAnimation; + } + else + { + //Record the time we enter this state so we know whether to "land" or not + if (m_movementAnimation != "FALLDOWN") + m_animPersistUntil = DateTime.Now.Ticks; + return "FALLDOWN"; + } + } + } } /// @@ -2948,23 +2948,23 @@ public void UpdateMovementAnimations() return; string movementAnimation = GetMovementAnimation(); - // if we ignore this calculated movementAnimation, we need to also clear m_animPersistUntil + // if we ignore this calculated movementAnimation, we need to also clear m_animPersistUntil if (movementAnimation == "FALLDOWN" && m_allowFalling == false) - { // don't update m_movementAnimation - movementAnimation = m_movementAnimation; // save *current* anim - m_animPersistUntil = 0; // overriding movementAnimation, so abort any calculated timed animation - } + { // don't update m_movementAnimation + movementAnimation = m_movementAnimation; // save *current* anim + m_animPersistUntil = 0; // overriding movementAnimation, so abort any calculated timed animation + } - if (movementAnimation == "PREJUMP" && m_usePreJump == false) + if (movementAnimation == "PREJUMP" && m_usePreJump == false) { //This was the previous behavior before PREJUMP - m_animPersistUntil = 0; // overriding movementAnimation, so abort any calculated timed animation - movementAnimation = "JUMP"; + m_animPersistUntil = 0; // overriding movementAnimation, so abort any calculated timed animation + movementAnimation = "JUMP"; } - // now set it to whatever that all worked out to - TrySetMovementAnimation(movementAnimation); + // now set it to whatever that all worked out to + TrySetMovementAnimation(movementAnimation); } /// @@ -3003,7 +3003,7 @@ public void AddNewMovement(Vector3 vec, Quaternion rotation) direc.Z = Math.Max(direc.Z, 2.8f); m_shouldJump = false; direc.Z *= 3; - m_animPersistUntil = 0; // abort any timed animation + m_animPersistUntil = 0; // abort any timed animation if (m_movementAnimation != "JUMP") TrySetMovementAnimation("PREJUMP"); TrySetMovementAnimation("JUMP"); @@ -3179,9 +3179,9 @@ public static void CollectCoarseLocations(Scene scene, out List CoarseL if (avatar.IsInTransit || avatar.IsDeleted) continue; SceneObjectPart sop = avatar.m_posInfo.Parent; - if (sop != null) // is seated? - if (sop.ParentGroup.InTransit) // and in transit - continue; // skip this one since we don't have a reliable position + if (sop != null) // is seated? + if (sop.ParentGroup.InTransit) // and in transit + continue; // skip this one since we don't have a reliable position CoarseLocations.Add(avatar.AbsolutePosition); } @@ -3290,7 +3290,7 @@ private void InitialAttachmentRez(CachedUserInfo userInfo) } } - /// + /// /// Set appearance data (textureentry and slider settings) received from the client /// /// diff --git a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs index 5b8377cb..d8043079 100644 --- a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs +++ b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs @@ -454,7 +454,7 @@ public Vector3 CalculateNormalAt(float xPos, float yPos) // 3-point triangle sur { if (xPos < 0 || yPos < 0 || xPos >= Constants.RegionSize || yPos >= Constants.RegionSize) return new Vector3(0.00000f, 0.00000f, 1.00000f); - + uint x = (uint)xPos; uint y = (uint)yPos; uint xPlusOne = x + 1; @@ -488,7 +488,7 @@ public Vector3 Calculate4PointNormalAt(float xPos, float yPos) { if (!Util.IsValidRegionXY(xPos, yPos)) return new Vector3(0.00000f, 0.00000f, 1.00000f); - + uint x = (uint)xPos; uint y = (uint)yPos; uint xPlusOne = x + 1; diff --git a/OpenSim/Region/Framework/Scenes/UndoState.cs b/OpenSim/Region/Framework/Scenes/UndoState.cs index bb63975e..17b090f0 100644 --- a/OpenSim/Region/Framework/Scenes/UndoState.cs +++ b/OpenSim/Region/Framework/Scenes/UndoState.cs @@ -120,7 +120,7 @@ public void PlaybackState(SceneObjectPart part) { part.OffsetPosition = Position; } - + part.UpdateRotation(Rotation); if (Scale != Vector3.Zero) { diff --git a/OpenSim/Region/Modules/ProfileModule/OpenProfile.cs b/OpenSim/Region/Modules/ProfileModule/OpenProfile.cs index ac19c367..35f0f6d1 100644 --- a/OpenSim/Region/Modules/ProfileModule/OpenProfile.cs +++ b/OpenSim/Region/Modules/ProfileModule/OpenProfile.cs @@ -47,78 +47,78 @@ namespace OpenSimProfile.Modules.OpenProfile { - public class OpenProfileModule : IRegionModule - { - // - // Log module - // - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - // - // Module vars - // - private IConfigSource m_gConfig; - private List m_Scenes = new List(); - private string m_ProfileServer = ""; - private bool m_Enabled = true; - - public void Initialise(Scene scene, IConfigSource config) - { - if (!m_Enabled) - return; - - IConfig profileConfig = config.Configs["Profile"]; - - if (m_Scenes.Count == 0) // First time - { - if (profileConfig == null) - { - m_log.Info("[PROFILE] Not configured, disabling"); - m_Enabled = false; - return; - } - m_ProfileServer = profileConfig.GetString("ProfileURL", ""); - if (m_ProfileServer == "") - { - m_log.Error("[PROFILE] No profile server, disabling profiles"); - m_Enabled = false; - return; - } - else - { - m_log.Info("[PROFILE] Profile module is activated"); - m_Enabled = true; - } - } - - if (!m_Scenes.Contains(scene)) - m_Scenes.Add(scene); - - m_gConfig = config; - - // Hook up events - scene.EventManager.OnNewClient += OnNewClient; - } - - public void PostInitialise() - { - if (!m_Enabled) - return; - } - - public void Close() - { - } - - public string Name - { - get { return "ProfileModule"; } - } - - public bool IsSharedModule - { - get { return true; } - } + public class OpenProfileModule : IRegionModule + { + // + // Log module + // + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + // + // Module vars + // + private IConfigSource m_gConfig; + private List m_Scenes = new List(); + private string m_ProfileServer = ""; + private bool m_Enabled = true; + + public void Initialise(Scene scene, IConfigSource config) + { + if (!m_Enabled) + return; + + IConfig profileConfig = config.Configs["Profile"]; + + if (m_Scenes.Count == 0) // First time + { + if (profileConfig == null) + { + m_log.Info("[PROFILE] Not configured, disabling"); + m_Enabled = false; + return; + } + m_ProfileServer = profileConfig.GetString("ProfileURL", ""); + if (m_ProfileServer == "") + { + m_log.Error("[PROFILE] No profile server, disabling profiles"); + m_Enabled = false; + return; + } + else + { + m_log.Info("[PROFILE] Profile module is activated"); + m_Enabled = true; + } + } + + if (!m_Scenes.Contains(scene)) + m_Scenes.Add(scene); + + m_gConfig = config; + + // Hook up events + scene.EventManager.OnNewClient += OnNewClient; + } + + public void PostInitialise() + { + if (!m_Enabled) + return; + } + + public void Close() + { + } + + public string Name + { + get { return "ProfileModule"; } + } + + public bool IsSharedModule + { + get { return true; } + } ScenePresence FindPresence(UUID clientID) { @@ -133,202 +133,202 @@ ScenePresence FindPresence(UUID clientID) return null; } - /// New Client Event Handler - private void OnNewClient(IClientAPI client) - { - // Subscribe to messages - - // Classifieds - client.AddGenericPacketHandler("avatarclassifiedsrequest", HandleAvatarClassifiedsRequest); - client.OnClassifiedInfoUpdate += ClassifiedInfoUpdate; - client.OnClassifiedDelete += ClassifiedDelete; - - // Picks - client.AddGenericPacketHandler("avatarpicksrequest", HandleAvatarPicksRequest); - client.AddGenericPacketHandler("pickinforequest", HandlePickInfoRequest); - client.OnPickInfoUpdate += PickInfoUpdate; - client.OnPickDelete += PickDelete; - - // Notes - client.AddGenericPacketHandler("avatarnotesrequest", HandleAvatarNotesRequest); - client.OnAvatarNotesUpdate += AvatarNotesUpdate; - } - - // - // Make external XMLRPC request - // - private Hashtable GenericXMLRPCRequest(Hashtable ReqParams, string method) - { - ArrayList SendParams = new ArrayList(); - SendParams.Add(ReqParams); - - // Send Request - XmlRpcResponse Resp; - try - { - XmlRpcRequest Req = new XmlRpcRequest(method, SendParams); - Resp = Req.Send(m_ProfileServer, 30000); - } - catch (WebException ex) - { - m_log.ErrorFormat("[PROFILE]: Unable to connect to Profile " + - "Server {0}. Exception {1}", m_ProfileServer, ex); - - Hashtable ErrorHash = new Hashtable(); - ErrorHash["success"] = false; - ErrorHash["errorMessage"] = "Unable to search at this time. "; - ErrorHash["errorURI"] = ""; - - return ErrorHash; - } - catch (SocketException ex) - { - m_log.ErrorFormat( - "[PROFILE]: Unable to connect to Profile Server {0}. " + - "Exception {1}", m_ProfileServer, ex); - - Hashtable ErrorHash = new Hashtable(); - ErrorHash["success"] = false; - ErrorHash["errorMessage"] = "Unable to search at this time. "; - ErrorHash["errorURI"] = ""; - - return ErrorHash; - } - catch (XmlException ex) - { - m_log.ErrorFormat( - "[PROFILE]: Unable to connect to Profile Server {0}. " + - "Exception {1}", m_ProfileServer, ex); - - Hashtable ErrorHash = new Hashtable(); - ErrorHash["success"] = false; - ErrorHash["errorMessage"] = "Unable to search at this time. "; - ErrorHash["errorURI"] = ""; - - return ErrorHash; - } - if (Resp.IsFault) - { - Hashtable ErrorHash = new Hashtable(); - ErrorHash["success"] = false; - ErrorHash["errorMessage"] = "Unable to search at this time. "; - ErrorHash["errorURI"] = ""; - return ErrorHash; - } - Hashtable RespData = (Hashtable)Resp.Value; - - return RespData; - } - - // Classifieds Handler - - public void HandleAvatarClassifiedsRequest(Object sender, string method, List args) - { + /// New Client Event Handler + private void OnNewClient(IClientAPI client) + { + // Subscribe to messages + + // Classifieds + client.AddGenericPacketHandler("avatarclassifiedsrequest", HandleAvatarClassifiedsRequest); + client.OnClassifiedInfoUpdate += ClassifiedInfoUpdate; + client.OnClassifiedDelete += ClassifiedDelete; + + // Picks + client.AddGenericPacketHandler("avatarpicksrequest", HandleAvatarPicksRequest); + client.AddGenericPacketHandler("pickinforequest", HandlePickInfoRequest); + client.OnPickInfoUpdate += PickInfoUpdate; + client.OnPickDelete += PickDelete; + + // Notes + client.AddGenericPacketHandler("avatarnotesrequest", HandleAvatarNotesRequest); + client.OnAvatarNotesUpdate += AvatarNotesUpdate; + } + + // + // Make external XMLRPC request + // + private Hashtable GenericXMLRPCRequest(Hashtable ReqParams, string method) + { + ArrayList SendParams = new ArrayList(); + SendParams.Add(ReqParams); + + // Send Request + XmlRpcResponse Resp; + try + { + XmlRpcRequest Req = new XmlRpcRequest(method, SendParams); + Resp = Req.Send(m_ProfileServer, 30000); + } + catch (WebException ex) + { + m_log.ErrorFormat("[PROFILE]: Unable to connect to Profile " + + "Server {0}. Exception {1}", m_ProfileServer, ex); + + Hashtable ErrorHash = new Hashtable(); + ErrorHash["success"] = false; + ErrorHash["errorMessage"] = "Unable to search at this time. "; + ErrorHash["errorURI"] = ""; + + return ErrorHash; + } + catch (SocketException ex) + { + m_log.ErrorFormat( + "[PROFILE]: Unable to connect to Profile Server {0}. " + + "Exception {1}", m_ProfileServer, ex); + + Hashtable ErrorHash = new Hashtable(); + ErrorHash["success"] = false; + ErrorHash["errorMessage"] = "Unable to search at this time. "; + ErrorHash["errorURI"] = ""; + + return ErrorHash; + } + catch (XmlException ex) + { + m_log.ErrorFormat( + "[PROFILE]: Unable to connect to Profile Server {0}. " + + "Exception {1}", m_ProfileServer, ex); + + Hashtable ErrorHash = new Hashtable(); + ErrorHash["success"] = false; + ErrorHash["errorMessage"] = "Unable to search at this time. "; + ErrorHash["errorURI"] = ""; + + return ErrorHash; + } + if (Resp.IsFault) + { + Hashtable ErrorHash = new Hashtable(); + ErrorHash["success"] = false; + ErrorHash["errorMessage"] = "Unable to search at this time. "; + ErrorHash["errorURI"] = ""; + return ErrorHash; + } + Hashtable RespData = (Hashtable)Resp.Value; + + return RespData; + } + + // Classifieds Handler + + public void HandleAvatarClassifiedsRequest(Object sender, string method, List args) + { if (!(sender is IClientAPI)) return; IClientAPI remoteClient = (IClientAPI)sender; - Hashtable ReqHash = new Hashtable(); - ReqHash["uuid"] = args[0]; - - Hashtable result = GenericXMLRPCRequest(ReqHash, - method); + Hashtable ReqHash = new Hashtable(); + ReqHash["uuid"] = args[0]; + + Hashtable result = GenericXMLRPCRequest(ReqHash, + method); - if (!Convert.ToBoolean(result["success"])) - { - remoteClient.SendAgentAlertMessage( - result["errorMessage"].ToString(), false); - return; - } + if (!Convert.ToBoolean(result["success"])) + { + remoteClient.SendAgentAlertMessage( + result["errorMessage"].ToString(), false); + return; + } - ArrayList dataArray = (ArrayList)result["data"]; + ArrayList dataArray = (ArrayList)result["data"]; Dictionary classifieds = new Dictionary(); - foreach (Object o in dataArray) - { - Hashtable d = (Hashtable)o; - + foreach (Object o in dataArray) + { + Hashtable d = (Hashtable)o; + classifieds[new UUID(d["classifiedid"].ToString())] = d["name"].ToString(); - } - - remoteClient.SendAvatarClassifiedReply(remoteClient.AgentId, - classifieds); - } - - // Classifieds Update - - public void ClassifiedInfoUpdate(UUID queryclassifiedID, uint queryCategory, string queryName, string queryDescription, UUID queryParcelID, - uint queryParentEstate, UUID querySnapshotID, Vector3 queryGlobalPos, byte queryclassifiedFlags, - int queryclassifiedPrice, IClientAPI remoteClient) - { - Hashtable ReqHash = new Hashtable(); - - ReqHash["classifiedUUID"] = queryclassifiedID.ToString(); - ReqHash["category"] = queryCategory.ToString(); - ReqHash["name"] = queryName; - ReqHash["description"] = queryDescription; - ReqHash["parcelUUID"] = queryParcelID.ToString(); - ReqHash["parentestate"] = queryParentEstate.ToString(); - ReqHash["snapshotUUID"] = querySnapshotID.ToString(); - ReqHash["globalpos"] = queryGlobalPos.ToString(); - ReqHash["classifiedFlags"] = queryclassifiedFlags.ToString(); - ReqHash["classifiedPrice"] = queryclassifiedPrice.ToString(); - - Hashtable result = GenericXMLRPCRequest(ReqHash, - "classified_update"); - - if (!Convert.ToBoolean(result["success"])) - { - remoteClient.SendAgentAlertMessage( - result["errorMessage"].ToString(), false); - return; - } - } - - // Classifieds Delete - - public void ClassifiedDelete (UUID queryClassifiedID, IClientAPI remoteClient) - { - Hashtable ReqHash = new Hashtable(); - - ReqHash["classifiedID"] = queryClassifiedID.ToString(); - - Hashtable result = GenericXMLRPCRequest(ReqHash, - "classified_delete"); - - if (!Convert.ToBoolean(result["success"])) - { - remoteClient.SendAgentAlertMessage( - result["errorMessage"].ToString(), false); - return; - } - } - - // Picks Handler - - public void HandleAvatarPicksRequest(Object sender, string method, List args) - { + } + + remoteClient.SendAvatarClassifiedReply(remoteClient.AgentId, + classifieds); + } + + // Classifieds Update + + public void ClassifiedInfoUpdate(UUID queryclassifiedID, uint queryCategory, string queryName, string queryDescription, UUID queryParcelID, + uint queryParentEstate, UUID querySnapshotID, Vector3 queryGlobalPos, byte queryclassifiedFlags, + int queryclassifiedPrice, IClientAPI remoteClient) + { + Hashtable ReqHash = new Hashtable(); + + ReqHash["classifiedUUID"] = queryclassifiedID.ToString(); + ReqHash["category"] = queryCategory.ToString(); + ReqHash["name"] = queryName; + ReqHash["description"] = queryDescription; + ReqHash["parcelUUID"] = queryParcelID.ToString(); + ReqHash["parentestate"] = queryParentEstate.ToString(); + ReqHash["snapshotUUID"] = querySnapshotID.ToString(); + ReqHash["globalpos"] = queryGlobalPos.ToString(); + ReqHash["classifiedFlags"] = queryclassifiedFlags.ToString(); + ReqHash["classifiedPrice"] = queryclassifiedPrice.ToString(); + + Hashtable result = GenericXMLRPCRequest(ReqHash, + "classified_update"); + + if (!Convert.ToBoolean(result["success"])) + { + remoteClient.SendAgentAlertMessage( + result["errorMessage"].ToString(), false); + return; + } + } + + // Classifieds Delete + + public void ClassifiedDelete (UUID queryClassifiedID, IClientAPI remoteClient) + { + Hashtable ReqHash = new Hashtable(); + + ReqHash["classifiedID"] = queryClassifiedID.ToString(); + + Hashtable result = GenericXMLRPCRequest(ReqHash, + "classified_delete"); + + if (!Convert.ToBoolean(result["success"])) + { + remoteClient.SendAgentAlertMessage( + result["errorMessage"].ToString(), false); + return; + } + } + + // Picks Handler + + public void HandleAvatarPicksRequest(Object sender, string method, List args) + { if (!(sender is IClientAPI)) return; IClientAPI remoteClient = (IClientAPI)sender; - Hashtable ReqHash = new Hashtable(); - ReqHash["uuid"] = args[0]; - - Hashtable result = GenericXMLRPCRequest(ReqHash, - method); + Hashtable ReqHash = new Hashtable(); + ReqHash["uuid"] = args[0]; + + Hashtable result = GenericXMLRPCRequest(ReqHash, + method); - if (!Convert.ToBoolean(result["success"])) - { - remoteClient.SendAgentAlertMessage( - result["errorMessage"].ToString(), false); - return; - } + if (!Convert.ToBoolean(result["success"])) + { + remoteClient.SendAgentAlertMessage( + result["errorMessage"].ToString(), false); + return; + } - ArrayList dataArray = (ArrayList)result["data"]; + ArrayList dataArray = (ArrayList)result["data"]; Dictionary picks = new Dictionary(); @@ -342,63 +342,63 @@ public void HandleAvatarPicksRequest(Object sender, string method, List } } - remoteClient.SendAvatarPicksReply(remoteClient.AgentId, - picks); - } + remoteClient.SendAvatarPicksReply(remoteClient.AgentId, + picks); + } - // Picks Request + // Picks Request - public void HandlePickInfoRequest(Object sender, string method, List args) - { + public void HandlePickInfoRequest(Object sender, string method, List args) + { if (!(sender is IClientAPI)) return; IClientAPI remoteClient = (IClientAPI)sender; - Hashtable ReqHash = new Hashtable(); + Hashtable ReqHash = new Hashtable(); - ReqHash["avatar_id"] = args[0]; - ReqHash["pick_id"] = args[1]; - - Hashtable result = GenericXMLRPCRequest(ReqHash, - method); + ReqHash["avatar_id"] = args[0]; + ReqHash["pick_id"] = args[1]; + + Hashtable result = GenericXMLRPCRequest(ReqHash, + method); - if (!Convert.ToBoolean(result["success"])) - { - remoteClient.SendAgentAlertMessage( - result["errorMessage"].ToString(), false); - return; - } + if (!Convert.ToBoolean(result["success"])) + { + remoteClient.SendAgentAlertMessage( + result["errorMessage"].ToString(), false); + return; + } - ArrayList dataArray = (ArrayList)result["data"]; + ArrayList dataArray = (ArrayList)result["data"]; - Hashtable d = (Hashtable)dataArray[0]; + Hashtable d = (Hashtable)dataArray[0]; Vector3 globalPos = new Vector3(); - Vector3.TryParse(d["posglobal"].ToString(), out globalPos); + Vector3.TryParse(d["posglobal"].ToString(), out globalPos); - remoteClient.SendPickInfoReply( + remoteClient.SendPickInfoReply( new UUID(d["pickuuid"].ToString()), new UUID(d["creatoruuid"].ToString()), - Convert.ToBoolean(d["toppick"]), - new UUID(d["parceluuid"].ToString()), - d["name"].ToString(), - d["description"].ToString(), - new UUID(d["snapshotuuid"].ToString()), - d["user"].ToString(), - d["originalname"].ToString(), - d["simname"].ToString(), - globalPos, - Convert.ToInt32(d["sortorder"]), - Convert.ToBoolean(d["enabled"])); - } - - // Picks Update - - public void PickInfoUpdate(IClientAPI remoteClient, UUID pickID, UUID creatorID, bool topPick, string name, string desc, UUID snapshotID, int sortOrder, bool enabled) - { - Hashtable ReqHash = new Hashtable(); - + Convert.ToBoolean(d["toppick"]), + new UUID(d["parceluuid"].ToString()), + d["name"].ToString(), + d["description"].ToString(), + new UUID(d["snapshotuuid"].ToString()), + d["user"].ToString(), + d["originalname"].ToString(), + d["simname"].ToString(), + globalPos, + Convert.ToInt32(d["sortorder"]), + Convert.ToBoolean(d["enabled"])); + } + + // Picks Update + + public void PickInfoUpdate(IClientAPI remoteClient, UUID pickID, UUID creatorID, bool topPick, string name, string desc, UUID snapshotID, int sortOrder, bool enabled) + { + Hashtable ReqHash = new Hashtable(); + ReqHash["agent_id"] = remoteClient.AgentId.ToString(); ReqHash["pick_id"] = pickID.ToString(); ReqHash["creator_id"] = creatorID.ToString(); @@ -433,61 +433,61 @@ public void PickInfoUpdate(IClientAPI remoteClient, UUID pickID, UUID creatorID, // Do the request - Hashtable result = GenericXMLRPCRequest(ReqHash, - "picks_update"); + Hashtable result = GenericXMLRPCRequest(ReqHash, + "picks_update"); - if (!Convert.ToBoolean(result["success"])) - { - remoteClient.SendAgentAlertMessage( - result["errorMessage"].ToString(), false); - return; - } - } + if (!Convert.ToBoolean(result["success"])) + { + remoteClient.SendAgentAlertMessage( + result["errorMessage"].ToString(), false); + return; + } + } - // Picks Delete + // Picks Delete - public void PickDelete(IClientAPI remoteClient, UUID queryPickID) - { - Hashtable ReqHash = new Hashtable(); - - ReqHash["pick_id"] = queryPickID.ToString(); + public void PickDelete(IClientAPI remoteClient, UUID queryPickID) + { + Hashtable ReqHash = new Hashtable(); + + ReqHash["pick_id"] = queryPickID.ToString(); - Hashtable result = GenericXMLRPCRequest(ReqHash, - "picks_delete"); + Hashtable result = GenericXMLRPCRequest(ReqHash, + "picks_delete"); - if (!Convert.ToBoolean(result["success"])) - { - remoteClient.SendAgentAlertMessage( - result["errorMessage"].ToString(), false); - return; - } - } + if (!Convert.ToBoolean(result["success"])) + { + remoteClient.SendAgentAlertMessage( + result["errorMessage"].ToString(), false); + return; + } + } - // Notes Handler + // Notes Handler - public void HandleAvatarNotesRequest(Object sender, string method, List args) - { + public void HandleAvatarNotesRequest(Object sender, string method, List args) + { if (!(sender is IClientAPI)) return; IClientAPI remoteClient = (IClientAPI)sender; - Hashtable ReqHash = new Hashtable(); + Hashtable ReqHash = new Hashtable(); - ReqHash["avatar_id"] = remoteClient.AgentId.ToString(); - ReqHash["uuid"] = args[0]; - - Hashtable result = GenericXMLRPCRequest(ReqHash, - method); + ReqHash["avatar_id"] = remoteClient.AgentId.ToString(); + ReqHash["uuid"] = args[0]; + + Hashtable result = GenericXMLRPCRequest(ReqHash, + method); - if (!Convert.ToBoolean(result["success"])) - { - remoteClient.SendAgentAlertMessage( - result["errorMessage"].ToString(), false); - return; - } + if (!Convert.ToBoolean(result["success"])) + { + remoteClient.SendAgentAlertMessage( + result["errorMessage"].ToString(), false); + return; + } - ArrayList dataArray = (ArrayList)result["data"]; + ArrayList dataArray = (ArrayList)result["data"]; if (dataArray != null && dataArray[0] != null) { @@ -503,27 +503,27 @@ public void HandleAvatarNotesRequest(Object sender, string method, List new UUID(ReqHash["uuid"].ToString()), ""); } - } - - // Notes Update - - public void AvatarNotesUpdate(IClientAPI remoteClient, UUID queryTargetID, string queryNotes) - { - Hashtable ReqHash = new Hashtable(); - - ReqHash["avatar_id"] = remoteClient.AgentId.ToString(); - ReqHash["target_id"] = queryTargetID.ToString(); - ReqHash["notes"] = queryNotes; - - Hashtable result = GenericXMLRPCRequest(ReqHash, - "avatar_notes_update"); - - if (!Convert.ToBoolean(result["success"])) - { - remoteClient.SendAgentAlertMessage( - result["errorMessage"].ToString(), false); - return; - } - } - } + } + + // Notes Update + + public void AvatarNotesUpdate(IClientAPI remoteClient, UUID queryTargetID, string queryNotes) + { + Hashtable ReqHash = new Hashtable(); + + ReqHash["avatar_id"] = remoteClient.AgentId.ToString(); + ReqHash["target_id"] = queryTargetID.ToString(); + ReqHash["notes"] = queryNotes; + + Hashtable result = GenericXMLRPCRequest(ReqHash, + "avatar_notes_update"); + + if (!Convert.ToBoolean(result["success"])) + { + remoteClient.SendAgentAlertMessage( + result["errorMessage"].ToString(), false); + return; + } + } + } } diff --git a/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/FlexiGroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/FlexiGroupsModule.cs index bed6ef7e..22fb87fb 100644 --- a/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/FlexiGroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/FlexiGroupsModule.cs @@ -1417,9 +1417,9 @@ public int EjectGroupMemberRequest(IClientAPI remoteClient, UUID agentID, string // agentID and agentName are only used if remoteClient is null. // agentID/agentName is the requesting user, typically owner of the script requesting it. public int InviteGroupRequest(IClientAPI remoteClient, UUID agentID, string agentName, UUID groupID, UUID invitedAgentID, UUID roleID) - { + { GroupRequestID grID = GetClientGroupRequestID(remoteClient); - GroupRecord groupInfo = m_groupData.GetGroupRecord(grID, groupID, null); + GroupRecord groupInfo = m_groupData.GetGroupRecord(grID, groupID, null); IScene scene = m_sceneList[0]; if (remoteClient != null) @@ -1429,13 +1429,13 @@ public int InviteGroupRequest(IClientAPI remoteClient, UUID agentID, string agen scene = remoteClient.Scene; } - string groupName; - if (groupInfo != null) - groupName = groupInfo.GroupName; - else - groupName = "(unknown)"; + string groupName; + if (groupInfo != null) + groupName = groupInfo.GroupName; + else + groupName = "(unknown)"; - if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); + if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); // Get the list of users who have this sender muted. m_muteListModule = m_sceneList[0].RequestModuleInterface(); diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/CTri.cs b/OpenSim/Region/Physics/ConvexDecompositionDotNet/CTri.cs index e6b02cbd..3d607cc7 100644 --- a/OpenSim/Region/Physics/ConvexDecompositionDotNet/CTri.cs +++ b/OpenSim/Region/Physics/ConvexDecompositionDotNet/CTri.cs @@ -246,13 +246,13 @@ public void addWeighted(List list) } private static float DistToPt(float3 p, float4 plane) - { - float x = p.x; - float y = p.y; - float z = p.z; - float d = x*plane.x + y*plane.y + z*plane.z + plane.w; - return d; - } + { + float x = p.x; + float y = p.y; + float z = p.z; + float d = x*plane.x + y*plane.y + z*plane.z + plane.w; + return d; + } private static void intersect(float3 p1, float3 p2, ref float3 split, float4 plane) { diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/HullUtils.cs b/OpenSim/Region/Physics/ConvexDecompositionDotNet/HullUtils.cs index f43c6eee..3220b711 100644 --- a/OpenSim/Region/Physics/ConvexDecompositionDotNet/HullUtils.cs +++ b/OpenSim/Region/Physics/ConvexDecompositionDotNet/HullUtils.cs @@ -734,8 +734,8 @@ public static ConvexH ConvexHCrop(ref ConvexH convex, Plane slice, float planete planeside |= vertflag[edge0.v].planetest; //if((vertflag[edge0.v].planetest & vertflag[edge1.v].planetest) == COPLANAR) { - // assert(ecop==-1); - // ecop=e; + // assert(ecop==-1); + // ecop=e; //} if (vertflag[edge0.v].planetest == (2) && vertflag[edge1.v].planetest == (2)) @@ -1381,8 +1381,8 @@ public static int overhull(List planes, List verts, int maxplanes bmin = float3.VectorMin(bmin, verts[i]); bmax = float3.VectorMax(bmax, verts[i]); } - // float diameter = magnitude(bmax-bmin); - // inflate *=diameter; // RELATIVE INFLATION + // float diameter = magnitude(bmax-bmin); + // inflate *=diameter; // RELATIVE INFLATION bmin -= new float3(inflate, inflate, inflate); bmax += new float3(inflate, inflate, inflate); for (i = 0; i < planes.Count; i++) @@ -1606,7 +1606,7 @@ private static bool CleanupVertices(List svertices, out List ver addPoint(ref vcount, vertices, x2, y2, z2); addPoint(ref vcount, vertices, x1, y2, z2); - return true; // return cube + return true; // return cube } else { diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/Quaternion.cs b/OpenSim/Region/Physics/ConvexDecompositionDotNet/Quaternion.cs index 94e31fba..b2014a06 100644 --- a/OpenSim/Region/Physics/ConvexDecompositionDotNet/Quaternion.cs +++ b/OpenSim/Region/Physics/ConvexDecompositionDotNet/Quaternion.cs @@ -126,9 +126,9 @@ public static implicit operator float3x3(Quaternion q) } public static Quaternion operator *(Quaternion a, float b) - { - return new Quaternion(a.x *b, a.y *b, a.z *b, a.w *b); - } + { + return new Quaternion(a.x *b, a.y *b, a.z *b, a.w *b); + } public static Quaternion normalize(Quaternion a) { diff --git a/OpenSim/Region/Physics/ConvexDecompositionDotNet/float4x4.cs b/OpenSim/Region/Physics/ConvexDecompositionDotNet/float4x4.cs index 62dd8867..a02c7e05 100644 --- a/OpenSim/Region/Physics/ConvexDecompositionDotNet/float4x4.cs +++ b/OpenSim/Region/Physics/ConvexDecompositionDotNet/float4x4.cs @@ -127,88 +127,88 @@ public override bool Equals(object obj) } public static float4x4 Inverse(float4x4 m) - { - float4x4 d = new float4x4(); - //float dst = d.x.x; - float[] tmp = new float[12]; // temp array for pairs - float[] src = new float[16]; // array of transpose source matrix - float det; // determinant - // transpose matrix - for (int i = 0; i < 4; i++) - { - src[i] = m[i].x; - src[i + 4] = m[i].y; - src[i + 8] = m[i].z; - src[i + 12] = m[i].w; - } - // calculate pairs for first 8 elements (cofactors) - tmp[0] = src[10] * src[15]; - tmp[1] = src[11] * src[14]; - tmp[2] = src[9] * src[15]; - tmp[3] = src[11] * src[13]; - tmp[4] = src[9] * src[14]; - tmp[5] = src[10] * src[13]; - tmp[6] = src[8] * src[15]; - tmp[7] = src[11] * src[12]; - tmp[8] = src[8] * src[14]; - tmp[9] = src[10] * src[12]; - tmp[10] = src[8] * src[13]; - tmp[11] = src[9] * src[12]; - // calculate first 8 elements (cofactors) - d.x.x = tmp[0]*src[5] + tmp[3]*src[6] + tmp[4]*src[7]; - d.x.x -= tmp[1]*src[5] + tmp[2]*src[6] + tmp[5]*src[7]; - d.x.y = tmp[1]*src[4] + tmp[6]*src[6] + tmp[9]*src[7]; - d.x.y -= tmp[0]*src[4] + tmp[7]*src[6] + tmp[8]*src[7]; - d.x.z = tmp[2]*src[4] + tmp[7]*src[5] + tmp[10]*src[7]; - d.x.z -= tmp[3]*src[4] + tmp[6]*src[5] + tmp[11]*src[7]; - d.x.w = tmp[5]*src[4] + tmp[8]*src[5] + tmp[11]*src[6]; - d.x.w -= tmp[4]*src[4] + tmp[9]*src[5] + tmp[10]*src[6]; - d.y.x = tmp[1]*src[1] + tmp[2]*src[2] + tmp[5]*src[3]; - d.y.x -= tmp[0]*src[1] + tmp[3]*src[2] + tmp[4]*src[3]; - d.y.y = tmp[0]*src[0] + tmp[7]*src[2] + tmp[8]*src[3]; - d.y.y -= tmp[1]*src[0] + tmp[6]*src[2] + tmp[9]*src[3]; - d.y.z = tmp[3]*src[0] + tmp[6]*src[1] + tmp[11]*src[3]; - d.y.z -= tmp[2]*src[0] + tmp[7]*src[1] + tmp[10]*src[3]; - d.y.w = tmp[4]*src[0] + tmp[9]*src[1] + tmp[10]*src[2]; - d.y.w -= tmp[5]*src[0] + tmp[8]*src[1] + tmp[11]*src[2]; - // calculate pairs for second 8 elements (cofactors) - tmp[0] = src[2]*src[7]; - tmp[1] = src[3]*src[6]; - tmp[2] = src[1]*src[7]; - tmp[3] = src[3]*src[5]; - tmp[4] = src[1]*src[6]; - tmp[5] = src[2]*src[5]; - tmp[6] = src[0]*src[7]; - tmp[7] = src[3]*src[4]; - tmp[8] = src[0]*src[6]; - tmp[9] = src[2]*src[4]; - tmp[10] = src[0]*src[5]; - tmp[11] = src[1]*src[4]; - // calculate second 8 elements (cofactors) - d.z.x = tmp[0]*src[13] + tmp[3]*src[14] + tmp[4]*src[15]; - d.z.x -= tmp[1]*src[13] + tmp[2]*src[14] + tmp[5]*src[15]; - d.z.y = tmp[1]*src[12] + tmp[6]*src[14] + tmp[9]*src[15]; - d.z.y -= tmp[0]*src[12] + tmp[7]*src[14] + tmp[8]*src[15]; - d.z.z = tmp[2]*src[12] + tmp[7]*src[13] + tmp[10]*src[15]; - d.z.z -= tmp[3]*src[12] + tmp[6]*src[13] + tmp[11]*src[15]; - d.z.w = tmp[5]*src[12] + tmp[8]*src[13] + tmp[11]*src[14]; - d.z.w-= tmp[4]*src[12] + tmp[9]*src[13] + tmp[10]*src[14]; - d.w.x = tmp[2]*src[10] + tmp[5]*src[11] + tmp[1]*src[9]; - d.w.x-= tmp[4]*src[11] + tmp[0]*src[9] + tmp[3]*src[10]; - d.w.y = tmp[8]*src[11] + tmp[0]*src[8] + tmp[7]*src[10]; - d.w.y-= tmp[6]*src[10] + tmp[9]*src[11] + tmp[1]*src[8]; - d.w.z = tmp[6]*src[9] + tmp[11]*src[11] + tmp[3]*src[8]; - d.w.z-= tmp[10]*src[11] + tmp[2]*src[8] + tmp[7]*src[9]; - d.w.w = tmp[10]*src[10] + tmp[4]*src[8] + tmp[9]*src[9]; - d.w.w-= tmp[8]*src[9] + tmp[11]*src[10] + tmp[5]*src[8]; - // calculate determinant + { + float4x4 d = new float4x4(); + //float dst = d.x.x; + float[] tmp = new float[12]; // temp array for pairs + float[] src = new float[16]; // array of transpose source matrix + float det; // determinant + // transpose matrix + for (int i = 0; i < 4; i++) + { + src[i] = m[i].x; + src[i + 4] = m[i].y; + src[i + 8] = m[i].z; + src[i + 12] = m[i].w; + } + // calculate pairs for first 8 elements (cofactors) + tmp[0] = src[10] * src[15]; + tmp[1] = src[11] * src[14]; + tmp[2] = src[9] * src[15]; + tmp[3] = src[11] * src[13]; + tmp[4] = src[9] * src[14]; + tmp[5] = src[10] * src[13]; + tmp[6] = src[8] * src[15]; + tmp[7] = src[11] * src[12]; + tmp[8] = src[8] * src[14]; + tmp[9] = src[10] * src[12]; + tmp[10] = src[8] * src[13]; + tmp[11] = src[9] * src[12]; + // calculate first 8 elements (cofactors) + d.x.x = tmp[0]*src[5] + tmp[3]*src[6] + tmp[4]*src[7]; + d.x.x -= tmp[1]*src[5] + tmp[2]*src[6] + tmp[5]*src[7]; + d.x.y = tmp[1]*src[4] + tmp[6]*src[6] + tmp[9]*src[7]; + d.x.y -= tmp[0]*src[4] + tmp[7]*src[6] + tmp[8]*src[7]; + d.x.z = tmp[2]*src[4] + tmp[7]*src[5] + tmp[10]*src[7]; + d.x.z -= tmp[3]*src[4] + tmp[6]*src[5] + tmp[11]*src[7]; + d.x.w = tmp[5]*src[4] + tmp[8]*src[5] + tmp[11]*src[6]; + d.x.w -= tmp[4]*src[4] + tmp[9]*src[5] + tmp[10]*src[6]; + d.y.x = tmp[1]*src[1] + tmp[2]*src[2] + tmp[5]*src[3]; + d.y.x -= tmp[0]*src[1] + tmp[3]*src[2] + tmp[4]*src[3]; + d.y.y = tmp[0]*src[0] + tmp[7]*src[2] + tmp[8]*src[3]; + d.y.y -= tmp[1]*src[0] + tmp[6]*src[2] + tmp[9]*src[3]; + d.y.z = tmp[3]*src[0] + tmp[6]*src[1] + tmp[11]*src[3]; + d.y.z -= tmp[2]*src[0] + tmp[7]*src[1] + tmp[10]*src[3]; + d.y.w = tmp[4]*src[0] + tmp[9]*src[1] + tmp[10]*src[2]; + d.y.w -= tmp[5]*src[0] + tmp[8]*src[1] + tmp[11]*src[2]; + // calculate pairs for second 8 elements (cofactors) + tmp[0] = src[2]*src[7]; + tmp[1] = src[3]*src[6]; + tmp[2] = src[1]*src[7]; + tmp[3] = src[3]*src[5]; + tmp[4] = src[1]*src[6]; + tmp[5] = src[2]*src[5]; + tmp[6] = src[0]*src[7]; + tmp[7] = src[3]*src[4]; + tmp[8] = src[0]*src[6]; + tmp[9] = src[2]*src[4]; + tmp[10] = src[0]*src[5]; + tmp[11] = src[1]*src[4]; + // calculate second 8 elements (cofactors) + d.z.x = tmp[0]*src[13] + tmp[3]*src[14] + tmp[4]*src[15]; + d.z.x -= tmp[1]*src[13] + tmp[2]*src[14] + tmp[5]*src[15]; + d.z.y = tmp[1]*src[12] + tmp[6]*src[14] + tmp[9]*src[15]; + d.z.y -= tmp[0]*src[12] + tmp[7]*src[14] + tmp[8]*src[15]; + d.z.z = tmp[2]*src[12] + tmp[7]*src[13] + tmp[10]*src[15]; + d.z.z -= tmp[3]*src[12] + tmp[6]*src[13] + tmp[11]*src[15]; + d.z.w = tmp[5]*src[12] + tmp[8]*src[13] + tmp[11]*src[14]; + d.z.w-= tmp[4]*src[12] + tmp[9]*src[13] + tmp[10]*src[14]; + d.w.x = tmp[2]*src[10] + tmp[5]*src[11] + tmp[1]*src[9]; + d.w.x-= tmp[4]*src[11] + tmp[0]*src[9] + tmp[3]*src[10]; + d.w.y = tmp[8]*src[11] + tmp[0]*src[8] + tmp[7]*src[10]; + d.w.y-= tmp[6]*src[10] + tmp[9]*src[11] + tmp[1]*src[8]; + d.w.z = tmp[6]*src[9] + tmp[11]*src[11] + tmp[3]*src[8]; + d.w.z-= tmp[10]*src[11] + tmp[2]*src[8] + tmp[7]*src[9]; + d.w.w = tmp[10]*src[10] + tmp[4]*src[8] + tmp[9]*src[9]; + d.w.w-= tmp[8]*src[9] + tmp[11]*src[10] + tmp[5]*src[8]; + // calculate determinant det = src[0] * d.x.x + src[1] * d.x.y + src[2] * d.x.z + src[3] * d.x.w; - // calculate matrix inverse - det = 1/det; + // calculate matrix inverse + det = 1/det; for (int j = 0; j < 4; j++) d[j] *= det; - return d; - } + return d; + } public static float4x4 MatrixRigidInverse(float4x4 m) { diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 8bcb0c5c..6443c379 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -398,8 +398,8 @@ public partial class ScriptBaseClass : MarshalByRefObject public const int PRIM_SCULPT_TYPE_TORUS = 2; public const int PRIM_SCULPT_TYPE_PLANE = 3; public const int PRIM_SCULPT_TYPE_CYLINDER = 4; - public const int PRIM_SCULPT_FLAG_INVERT = 64; - public const int PRIM_SCULPT_FLAG_MIRROR = 128; + public const int PRIM_SCULPT_FLAG_INVERT = 64; + public const int PRIM_SCULPT_FLAG_MIRROR = 128; public const int PRIM_PHYSICS_SHAPE_PRIM = 0; public const int PRIM_PHYSICS_SHAPE_NONE = 1; diff --git a/OpenSim/TestSuite/PhysicsBot.cs b/OpenSim/TestSuite/PhysicsBot.cs index f5c75a6e..f0ef56da 100644 --- a/OpenSim/TestSuite/PhysicsBot.cs +++ b/OpenSim/TestSuite/PhysicsBot.cs @@ -131,7 +131,7 @@ public void startup() { throw new NotImplementedException(); -#if false // unreachable code, set to true to test with +#if false // unreachable code, set to true to test with client.Settings.LOGIN_SERVER = loginURI; // client.Network.OnConnected += new NetworkManager.ConnectedCallback(this.Network_OnConnected); //client.Network.OnSimConnected += new NetworkManager.SimConnectedCallback(this.Network_OnConnected); diff --git a/OpenSim/Tools/OpenSim.32BitLaunch/Program.cs b/OpenSim/Tools/OpenSim.32BitLaunch/Program.cs index b2b31492..0505bed8 100644 --- a/OpenSim/Tools/OpenSim.32BitLaunch/Program.cs +++ b/OpenSim/Tools/OpenSim.32BitLaunch/Program.cs @@ -53,7 +53,7 @@ static void Main(string[] args) System.Console.WriteLine(""); System.Console.WriteLine("Application will now terminate!"); System.Console.WriteLine(""); - System.Environment.Exit(1); + System.Environment.Exit(1); }*/ } } From 4f0c1843fa295afbaae2a6c49459bc98e2e120e6 Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Fri, 16 Oct 2015 05:44:03 -0700 Subject: [PATCH 4/6] Renaming OpenSim and Inworldz to Halcyon. Only the really easy ones, some of the more difficult are to be attacked in a later patch. --- InWorldz/Halcyon/Application.cs | 4 ++-- OpenSim/Base/ConfigurationLoader.cs | 2 +- OpenSim/Base/OpenSim.cs | 6 +++--- OpenSim/Base/OpenSimBackground.cs | 4 ++-- OpenSim/Base/OpenSimBase.cs | 8 ++++---- OpenSim/Framework/Communications/CommunicationsManager.cs | 2 +- OpenSim/Framework/RegionInfo.cs | 8 ++++++-- OpenSim/Framework/Statistics/BaseStatsCollector.cs | 2 +- OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs | 2 +- .../ServiceConnectors/Interregion/RESTInterregionComms.cs | 2 +- .../World/Archiver/ArchiveWriteRequestExecution.cs | 2 +- .../Region/CoreModules/World/Archiver/AssetsRequest.cs | 2 +- OpenSim/TestSuite/Main.cs | 2 +- 13 files changed, 25 insertions(+), 21 deletions(-) diff --git a/InWorldz/Halcyon/Application.cs b/InWorldz/Halcyon/Application.cs index c9c0f550..1128ecc5 100644 --- a/InWorldz/Halcyon/Application.cs +++ b/InWorldz/Halcyon/Application.cs @@ -80,13 +80,13 @@ public static void Main(string[] args) if (logConfigFile != String.Empty) { XmlConfigurator.Configure(new System.IO.FileInfo(logConfigFile)); - m_log.InfoFormat("[OPENSIM MAIN]: configured log4net using \"{0}\" as configuration file", + m_log.InfoFormat("[HALCYON MAIN]: configured log4net using \"{0}\" as configuration file", logConfigFile); } else { XmlConfigurator.Configure(); - m_log.Info("[OPENSIM MAIN]: configured log4net using default OpenSim.exe.config"); + m_log.Info("[HALCYON MAIN]: configured log4net using default Halcyon.exe.config"); } m_log.Info("Performing compatibility checks... "); diff --git a/OpenSim/Base/ConfigurationLoader.cs b/OpenSim/Base/ConfigurationLoader.cs index e8336ed7..503419d2 100644 --- a/OpenSim/Base/ConfigurationLoader.cs +++ b/OpenSim/Base/ConfigurationLoader.cs @@ -236,7 +236,7 @@ public static IConfigSource DefaultConfig() config = defaultConfig.AddConfig("StandAlone"); config.Set("accounts_authenticate", true); - config.Set("welcome_message", "Welcome to OpenSimulator"); + config.Set("welcome_message", "Welcome to Halcyon"); config.Set("inventory_plugin", "OpenSim.Data.SQLite.dll"); config.Set("inventory_source", ""); config.Set("userDatabase_plugin", "OpenSim.Data.SQLite.dll"); diff --git a/OpenSim/Base/OpenSim.cs b/OpenSim/Base/OpenSim.cs index c1baf415..2ae43ee6 100644 --- a/OpenSim/Base/OpenSim.cs +++ b/OpenSim/Base/OpenSim.cs @@ -127,13 +127,13 @@ protected override void StartupSpecific() m_log.Info("===================================================================="); m_log.Info("========================= STARTING HALCYON ========================="); m_log.Info("===================================================================="); - m_log.InfoFormat("[OPENSIM MAIN]: Running in {0} mode", + m_log.InfoFormat("[HALCYON MAIN]: Running in {0} mode", (ConfigurationSettings.Standalone ? "sandbox" : "grid")); m_log.InfoFormat("GC: Server mode: {0}, {1}", GCSettings.IsServerGC.ToString(), GCSettings.LatencyMode.ToString()); - //m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString()); + //m_log.InfoFormat("[HALCYON MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString()); // http://msdn.microsoft.com/en-us/library/bb384202.aspx //GCSettings.LatencyMode = GCLatencyMode.Batch; - //m_log.InfoFormat("[OPENSIM MAIN]: GC Latency Mode: {0}", GCSettings.LatencyMode.ToString()); + //m_log.InfoFormat("[HALCYON MAIN]: GC Latency Mode: {0}", GCSettings.LatencyMode.ToString()); if (m_gui) // Driven by external GUI { diff --git a/OpenSim/Base/OpenSimBackground.cs b/OpenSim/Base/OpenSimBackground.cs index 191fd53b..60f6a08c 100644 --- a/OpenSim/Base/OpenSimBackground.cs +++ b/OpenSim/Base/OpenSimBackground.cs @@ -54,7 +54,7 @@ public override void Startup() base.Startup(); - m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}", + m_log.InfoFormat("[HALCYON MAIN]: Startup complete, serving {0} region{1}", m_clientServers.Count.ToString(), m_clientServers.Count > 1 ? "s" : ""); WorldHasComeToAnEnd.WaitOne(); @@ -67,7 +67,7 @@ public override void Startup() public override void Shutdown() { WorldHasComeToAnEnd.Set(); - m_log.Info("[OPENSIM MAIN]: World has come to an end"); + m_log.Info("[HALCYON MAIN]: World has come to an end"); base.Shutdown(); } } diff --git a/OpenSim/Base/OpenSimBase.cs b/OpenSim/Base/OpenSimBase.cs index b500d17b..a9707004 100644 --- a/OpenSim/Base/OpenSimBase.cs +++ b/OpenSim/Base/OpenSimBase.cs @@ -333,7 +333,7 @@ private IAssetServer loadAssetServer(string id, PluginInitializerBase pi) { if (id != null && id != String.Empty) { - m_log.DebugFormat("[OPENSIMBASE] Attempting to load asset server id={0}", id); + m_log.DebugFormat("[HALCYONBASE] Attempting to load asset server id={0}", id); try { @@ -343,13 +343,13 @@ private IAssetServer loadAssetServer(string id, PluginInitializerBase pi) if (loader.Plugins.Count > 0) { - m_log.DebugFormat("[OPENSIMBASE] Asset server {0} loaded", id); + m_log.DebugFormat("[HALCYONBASE] Asset server {0} loaded", id); return (IAssetServer) loader.Plugins[0]; } } catch (Exception e) { - m_log.DebugFormat("[OPENSIMBASE] Asset server {0} not loaded ({1})", id, e.Message); + m_log.DebugFormat("[HALCYONBASE] Asset server {0} not loaded ({1})", id, e.Message); } } return null; @@ -531,7 +531,7 @@ public void RemoveRegion(Scene scene, bool cleanup) if (!String.IsNullOrEmpty(scene.RegionInfo.RegionFile)) { File.Delete(scene.RegionInfo.RegionFile); - m_log.InfoFormat("[OPENSIM]: deleting region file \"{0}\"", scene.RegionInfo.RegionFile); + m_log.InfoFormat("[HALCYON]: deleting region file \"{0}\"", scene.RegionInfo.RegionFile); } } diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index d4df513c..d7e84c47 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs @@ -275,7 +275,7 @@ public void HandleUUIDNameRequest(UUID uuid, IClientAPI remote_client) { if (uuid == LibraryRoot.Owner) { - remote_client.SendNameReply(uuid, "Mr", "OpenSim"); + remote_client.SendNameReply(uuid, "Mr", "Halcyon"); } else { diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 76508c99..129672e9 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -168,6 +168,10 @@ public IPEndPoint ExternalEndPoint } } + /// + /// Gets or sets the Internet-accessible domain name or IP of the region. + /// + /// The name of the external host. public string ExternalHostName { get { return m_externalHostName; } @@ -686,7 +690,7 @@ public void LoadFromNiniSource(IConfigSource source, string sectionName) { string errorMessage = String.Empty; RegionID = new UUID(source.Configs[sectionName].GetString("Region_ID", UUID.Random().ToString())); - RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test"); + RegionName = source.Configs[sectionName].GetString("sim_name", "Halcyon Test"); m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000")); m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000")); // this.DataStore = source.Configs[sectionName].GetString("datastore", "OpenSim.db"); @@ -813,7 +817,7 @@ public void loadConfigurationOptions() "UUID of Region (Default is recommended, random UUID)", UUID.Random().ToString(), true); configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, - "Region Name", "OpenSim Test", false); + "Region Name", "Halcyon Test", false); configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (X Axis)", "1000", false); configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, diff --git a/OpenSim/Framework/Statistics/BaseStatsCollector.cs b/OpenSim/Framework/Statistics/BaseStatsCollector.cs index 5194f7c6..b3d5e5ab 100644 --- a/OpenSim/Framework/Statistics/BaseStatsCollector.cs +++ b/OpenSim/Framework/Statistics/BaseStatsCollector.cs @@ -46,7 +46,7 @@ public virtual string Report() sb.Append(Environment.NewLine); sb.Append( string.Format( - "Allocated to OpenSim : {0} MB" + Environment.NewLine, + "Allocated to Halcyon: {0} MB" + Environment.NewLine, Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0))); return sb.ToString(); diff --git a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs index 4bb94aeb..0474feb9 100644 --- a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs @@ -84,7 +84,7 @@ public void Initialize(Scene scene, IConfigSource config) if (m_SceneList.Count == 0) { osGroup.GroupID = opensimulatorGroupID; - osGroup.GroupName = "OpenSimulator Testing"; + osGroup.GroupName = "Halcyon Testing"; osGroup.GroupPowers = (uint)(GroupPowers.AllowLandmark | GroupPowers.AllowSetHome); diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs index 9d1fc8aa..59e44d7b 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs @@ -624,7 +624,7 @@ protected virtual void DoAgentDelete(Hashtable request, Hashtable responsedata, m_localBackend.SendCloseAgent(regionHandle, id); responsedata["int_response_code"] = 200; - responsedata["str_response_string"] = "OpenSim agent " + id.ToString(); + responsedata["str_response_string"] = "Halcyon agent " + id.ToString(); m_log.Debug("[REST COMMS]: Agent Deleted."); } diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs index d8300e37..180cce7e 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs @@ -136,7 +136,7 @@ string filename m_archiveWriter.Close(); - m_log.InfoFormat("[ARCHIVER]: Wrote out OpenSimulator archive for {0}", m_scene.RegionInfo.RegionName); + m_log.InfoFormat("[ARCHIVER]: Wrote out Halcyon archive for {0}", m_scene.RegionInfo.RegionName); m_scene.EventManager.TriggerOarFileSaved(m_requestId, String.Empty); } diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index 7880cc35..672bec2e 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs @@ -130,7 +130,7 @@ public void AssetRequestCallback(UUID assetID, AssetBase asset) // We want to stop using the asset cache thread asap // as we now need to do the work of producing the rest of the archive Thread newThread = new Thread(PerformAssetsRequestCallback); - newThread.Name = "OpenSimulator archiving thread post assets receipt"; + newThread.Name = "Halcyon archiving thread post assets receipt"; newThread.Start(); } } diff --git a/OpenSim/TestSuite/Main.cs b/OpenSim/TestSuite/Main.cs index e785c2a6..cf13562e 100644 --- a/OpenSim/TestSuite/Main.cs +++ b/OpenSim/TestSuite/Main.cs @@ -85,7 +85,7 @@ private static void Help() { Console.WriteLine( "usage: pCampBot <-loginuri loginuri> [OPTIONS]\n" + - "Spawns a set of bots to test an OpenSim region\n\n" + + "Spawns a set of bots to test a Halcyon region\n\n" + " -l, -loginuri loginuri for sim to log into (required)\n" + // TODO: unused: " -n, -botcount number of bots to start (default: 1)\n" + " -firstname first name for the bot(s) (default: random string)\n" + From 048f563d6bbf482da22bd9c7526db81ec4cd969c Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Fri, 16 Oct 2015 06:07:55 -0700 Subject: [PATCH 5/6] Swept out all remaining references to OpenSim.ini. Now everything references Halcyon.ini, making things much more consistent. --- .../AvatarRemoteCommandModule.cs | 2 +- .../ChatFilter/ChatFilterModule.cs | 2 +- .../ChatLog/ChatLogMessageCassandra12Backend.cs | 2 +- .../ChatLog/ChatLogMessageFileBackend.cs | 2 +- .../InWorldz.ApplicationPlugins/ChatLog/ChatLogModule.cs | 2 +- InWorldz/InWorldz.ApplicationPlugins/Guest/GuestModule.cs | 2 +- .../Framework/Communications/Services/GridInfoService.cs | 8 ++++---- OpenSim/Framework/Console/ConsolePluginCommand.cs | 2 +- OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs | 2 +- .../ServiceConnectors/User/LocalUserServiceConnector.cs | 2 +- .../OptionalModules/Avatar/Concierge/ConciergeModule.cs | 8 ++++---- .../Avatar/FlexiGroups/FlexiGroupsModule.cs | 2 +- .../OptionalModules/Avatar/FlexiGroups/XmlRpcGroupData.cs | 2 +- .../Avatar/XmlRpcGroups/XmlRpcGroupData.cs | 2 +- 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/InWorldz/InWorldz.ApplicationPlugins/AvatarRemoteCommandModule/AvatarRemoteCommandModule.cs b/InWorldz/InWorldz.ApplicationPlugins/AvatarRemoteCommandModule/AvatarRemoteCommandModule.cs index 3ef5450b..10f4ed68 100644 --- a/InWorldz/InWorldz.ApplicationPlugins/AvatarRemoteCommandModule/AvatarRemoteCommandModule.cs +++ b/InWorldz/InWorldz.ApplicationPlugins/AvatarRemoteCommandModule/AvatarRemoteCommandModule.cs @@ -103,7 +103,7 @@ namespace InWorldz.ApplicationPlugins.AvatarRemoteCommandModule /// [AvatarRemoteCommands] /// Enabled = true /// - /// to your OpenSim.ini file + /// to your Halcyon.ini file /// public class AvatarRemoteCommandModule : ISharedRegionModule { diff --git a/InWorldz/InWorldz.ApplicationPlugins/ChatFilter/ChatFilterModule.cs b/InWorldz/InWorldz.ApplicationPlugins/ChatFilter/ChatFilterModule.cs index 5526db45..4df1f70b 100644 --- a/InWorldz/InWorldz.ApplicationPlugins/ChatFilter/ChatFilterModule.cs +++ b/InWorldz/InWorldz.ApplicationPlugins/ChatFilter/ChatFilterModule.cs @@ -51,7 +51,7 @@ namespace InWorldz.ApplicationPlugins.ChatFilterModule /// [ChatFilterModule] /// Enabled = true /// - /// into OpenSim.ini. + /// into Halcyon.ini. /// public class ChatFilterModule : INonSharedRegionModule { diff --git a/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageCassandra12Backend.cs b/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageCassandra12Backend.cs index aac3e6cb..b6318f45 100644 --- a/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageCassandra12Backend.cs +++ b/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageCassandra12Backend.cs @@ -52,7 +52,7 @@ namespace InWorldz.ApplicationPlugins.ChatLog /// SeedNode3 = x.host.com /// SeedNode4 = x.host.com /// - /// into OpenSim.ini. + /// into Halcyon.ini. /// public class InworldzChatLogMessageCassandra12Backend : IApplicationPlugin, IChatMessageLogBackend { diff --git a/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageFileBackend.cs b/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageFileBackend.cs index 0b28e642..98966733 100644 --- a/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageFileBackend.cs +++ b/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogMessageFileBackend.cs @@ -48,7 +48,7 @@ namespace InWorldz.ApplicationPlugins.ChatLog /// Backend = FileBackend /// File = Chat.log /// - /// into OpenSim.ini. + /// into Halcyon.ini. /// public class InworldzChatLogMessageFileBackend : IApplicationPlugin, IChatMessageLogBackend { diff --git a/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogModule.cs b/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogModule.cs index a560d16f..987370e0 100644 --- a/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogModule.cs +++ b/InWorldz/InWorldz.ApplicationPlugins/ChatLog/ChatLogModule.cs @@ -48,7 +48,7 @@ namespace InWorldz.ApplicationPlugins.ChatLog /// [ChatLogModule] /// Enabled = true /// - /// into OpenSim.ini. + /// into Halcyon.ini. /// public class InWorldzChatLogModule : INonSharedRegionModule { diff --git a/InWorldz/InWorldz.ApplicationPlugins/Guest/GuestModule.cs b/InWorldz/InWorldz.ApplicationPlugins/Guest/GuestModule.cs index 9fa3942b..75fba157 100644 --- a/InWorldz/InWorldz.ApplicationPlugins/Guest/GuestModule.cs +++ b/InWorldz/InWorldz.ApplicationPlugins/Guest/GuestModule.cs @@ -50,7 +50,7 @@ namespace InWorldz.ApplicationPlugins.GuestModule /// [GuestModule] /// Enabled = true /// - /// into OpenSim.ini. + /// into Halcyon.ini. /// public class GuestModule : INonSharedRegionModule { diff --git a/OpenSim/Framework/Communications/Services/GridInfoService.cs b/OpenSim/Framework/Communications/Services/GridInfoService.cs index 51111f31..7b292ccb 100644 --- a/OpenSim/Framework/Communications/Services/GridInfoService.cs +++ b/OpenSim/Framework/Communications/Services/GridInfoService.cs @@ -51,7 +51,7 @@ public class GridInfoService /// grid information /// /// GridInfoService uses the [GridInfo] section of the - /// standard OpenSim.ini file --- which is not optimal, but + /// standard Halcyon.ini file --- which is not optimal, but /// anything else requires a general redesign of the config /// system. /// @@ -61,7 +61,7 @@ public GridInfoService(IConfigSource configSource) } /// - /// Default constructor, uses OpenSim.ini. + /// Default constructor, uses Halcyon.ini. /// public GridInfoService() { @@ -72,7 +72,7 @@ public GridInfoService() } catch (FileNotFoundException) { - _log.Warn("[GridInfoService] no OpenSim.ini file found --- GridInfoServices WILL NOT BE AVAILABLE to your users"); + _log.Warn("[GridInfoService] no Halcyon.ini file found --- GridInfoServices WILL NOT BE AVAILABLE to your users"); } } @@ -131,7 +131,7 @@ private void loadGridInfo(IConfigSource configSource) private void IssueWarning() { - _log.Warn("[GridInfoService] found no [GridInfo] section in your OpenSim.ini"); + _log.Warn("[GridInfoService] found no [GridInfo] section in your Halcyon.ini"); _log.Warn("[GridInfoService] trying to guess sensible defaults, you might want to provide better ones:"); foreach (string k in _info.Keys) { diff --git a/OpenSim/Framework/Console/ConsolePluginCommand.cs b/OpenSim/Framework/Console/ConsolePluginCommand.cs index 69a77a53..02ea3e3c 100644 --- a/OpenSim/Framework/Console/ConsolePluginCommand.cs +++ b/OpenSim/Framework/Console/ConsolePluginCommand.cs @@ -72,7 +72,7 @@ public ConsolePluginCommand(string command, ConsoleCommand dlg, string help) /// At least a higher number for "show plugin status" then "show" would return /// This is used to have multi length command verbs /// - /// @see OopenSim.RunPluginCommands + /// @see OpenSim.RunPluginCommands /// It will only run the one with the highest number /// /// diff --git a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs index 43dc0401..3237494b 100644 --- a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs @@ -70,7 +70,7 @@ public void Initialize(IConfigSource source) IConfig assetConfig = source.Configs["AssetCache"]; if (assetConfig == null) { - m_log.Error("[ASSET CACHE]: AssetCache missing from OpenSim.ini"); + m_log.Error("[ASSET CACHE]: AssetCache missing from Halcyon.ini"); return; } diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs index 1185945c..1c7a4628 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs @@ -67,7 +67,7 @@ public void Initialize(IConfigSource source) IConfig userConfig = source.Configs["UserService"]; if (userConfig == null) { - m_log.Error("[USER CONNECTOR]: UserService missing from OpenSim.ini"); + m_log.Error("[USER CONNECTOR]: UserService missing from Halcyon.ini"); return; } diff --git a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs index a8d782c7..90238b10 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs @@ -84,13 +84,13 @@ public override void Initialize(Scene scene, IConfigSource config) { if ((m_config = config.Configs["Concierge"]) == null) { - //_log.InfoFormat("[Concierge]: no configuration section [Concierge] in OpenSim.ini: module not configured"); + //_log.InfoFormat("[Concierge]: no configuration section [Concierge] in Halcyon.ini: module not configured"); return; } if (!m_config.GetBoolean("enabled", false)) { - //_log.InfoFormat("[Concierge]: module disabled by OpenSim.ini configuration"); + //_log.InfoFormat("[Concierge]: module disabled by Halcyon.ini configuration"); return; } } @@ -432,7 +432,7 @@ protected void UpdateBroker(IScene scene) updatePost.Method = "POST"; updatePost.ContentType = "text/xml"; updatePost.ContentLength = payload.Length; - updatePost.UserAgent = "OpenSim.Concierge"; + updatePost.UserAgent = "Halcyon.Concierge"; BrokerState bs = new BrokerState(uri, payload, updatePost); @@ -625,7 +625,7 @@ public XmlRpcResponse XmlRpcUpdateWelcomeMethod(XmlRpcRequest request, IPEndPoin (string)requestData["password"] != m_xmlRpcPassword) throw new Exception("wrong password"); if (String.IsNullOrEmpty(m_welcomes)) - throw new Exception("welcome templates are not enabled, ask your OpenSim operator to set the \"welcomes\" option in the [Concierge] section of OpenSim.ini"); + throw new Exception("welcome templates are not enabled, ask your Halcyon operator to set the \"welcomes\" option in the [Concierge] section of Halcyon.ini"); string msg = (string)requestData["welcome"]; if (String.IsNullOrEmpty(msg)) diff --git a/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/FlexiGroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/FlexiGroupsModule.cs index 22fb87fb..0e4e39e6 100644 --- a/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/FlexiGroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/FlexiGroupsModule.cs @@ -54,7 +54,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.FlexiGroups public class FlexiGroupsModule : ISharedRegionModule, IGroupsModule { /// - /// ; To use this module, you must specify the following in your OpenSim.ini + /// ; To use this module, you must specify the following in your Halcyon.ini /// [GROUPS] /// Enabled = true /// Module = XmlRpcGroups diff --git a/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/XmlRpcGroupData.cs b/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/XmlRpcGroupData.cs index f29809ee..4a46cf26 100644 --- a/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/XmlRpcGroupData.cs +++ b/OpenSim/Region/OptionalModules/Avatar/FlexiGroups/XmlRpcGroupData.cs @@ -61,7 +61,7 @@ public XmlRpcGroupDataProvider(string serviceURL, bool disableKeepAlive, string if ((serviceURL == null) || (serviceURL == string.Empty)) { - throw new Exception("Please specify a valid ServiceURL for XmlRpcGroupDataProvider in OpenSim.ini, [Groups], XmlRpcServiceURL"); + throw new Exception("Please specify a valid ServiceURL for XmlRpcGroupDataProvider in Halcyon.ini, [Groups], XmlRpcServiceURL"); } m_groupReadKey = groupReadKey; diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs index 8b1f46a4..e7d449ad 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs @@ -64,7 +64,7 @@ public XmlRpcGroupDataProvider(string serviceURL, bool disableKeepAlive, string if ((serviceURL == null) || (serviceURL == string.Empty)) { - throw new Exception("Please specify a valid ServiceURL for XmlRpcGroupDataProvider in OpenSim.ini, [Groups], XmlRpcServiceURL"); + throw new Exception("Please specify a valid ServiceURL for XmlRpcGroupDataProvider in Halcyon.ini, [Groups], XmlRpcServiceURL"); } m_groupReadKey = groupReadKey; From 37bcad1321651848c2cab9b2451cf9d7bb5d2acf Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Fri, 16 Oct 2015 06:24:38 -0700 Subject: [PATCH 6/6] Last remaining user-visible references to OpenSim and/or Inworldz swept away. This is the most complex change so far in this process. For these changes the VersionInfo file was just the ticket, and that was easy, just needed some tuning. llGetEnv did get some potentially backwards compatibility breaking changes however - see Issue #51 for the place to discuss those. I also cleaned out a lot of local duplication and unneeded function-call passing of the version string. In one location I may have broken ownership rules by giving Phlox direct access to VersionInfo, I'm not 100% certain. Overall I attempted to try and keep the goals of each of these version and product name calls the same, just centralizing where they got that information from. The main idea being that the more direct the access, the easier it is to determine what the effects are for any given change. For example, previously it was a bear to find all the places changing the version string format would effect, now it's as simple as looking at where VersionInfo is used. --- .../InWorldz.Phlox.Engine/LSLSystemAPI.cs | 7 ++++--- OpenSim/Base/OpenSimBase.cs | 2 +- .../Services/GridInfoService.cs | 2 +- .../Framework/Servers/BaseOpenSimServer.cs | 18 ++++++---------- OpenSim/Framework/Servers/VersionInfo.cs | 18 +++++++++++++--- .../GridServer.Modules/GridMessagingModule.cs | 2 +- .../Grid/GridServer.Modules/GridRestModule.cs | 2 +- .../GridServer.Modules/GridServerPlugin.cs | 9 +++----- .../GridServer.Modules/GridXmlRpcModule.cs | 11 +++------- OpenSim/Grid/GridServer/GridServerBase.cs | 5 ----- .../ClientStack/LindenUDP/LLClientView.cs | 2 +- .../Framework/Scenes/RegionStatsHandler.cs | 2 +- OpenSim/Region/Framework/Scenes/Scene.cs | 21 +++++++------------ OpenSim/Region/Framework/Scenes/SceneBase.cs | 2 +- prebuild.xml | 1 + 15 files changed, 46 insertions(+), 58 deletions(-) diff --git a/InWorldz/InWorldz.Phlox.Engine/LSLSystemAPI.cs b/InWorldz/InWorldz.Phlox.Engine/LSLSystemAPI.cs index 9edcb6ac..d5a21b0c 100644 --- a/InWorldz/InWorldz.Phlox.Engine/LSLSystemAPI.cs +++ b/InWorldz/InWorldz.Phlox.Engine/LSLSystemAPI.cs @@ -20,7 +20,7 @@ using System.Threading; using System.Web; using Nini.Config; -using log4net; +using log4net; using OpenMetaverse; using OpenMetaverse.Packets; using OpenMetaverse.StructuredData; @@ -28,10 +28,11 @@ using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Geom; +using OpenSim.Framework.Servers; using OpenSim.Region.CoreModules; -using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.CoreModules.World.Land; using OpenSim.Region.CoreModules.World.Terrain; +using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Physics.Manager; using OpenSim.Region.Physics.Manager.Vehicle; @@ -11489,7 +11490,7 @@ public string llRequestSimulatorData(string simulator, int data) if (simulator == World.RegionInfo.RegionName) reply = m_host.ParentGroup.Scene.GetSimulatorVersion(); else - reply = "InWorldz"; + reply = VersionInfo.SoftwareName; break; default: // ScriptSleep(1000); diff --git a/OpenSim/Base/OpenSimBase.cs b/OpenSim/Base/OpenSimBase.cs index a9707004..9d094594 100644 --- a/OpenSim/Base/OpenSimBase.cs +++ b/OpenSim/Base/OpenSimBase.cs @@ -658,7 +658,7 @@ protected override Scene CreateScene(RegionInfo regionInfo, StorageManager stora return new Scene( regionInfo, m_commsManager, sceneGridService, storageManager, m_moduleLoader, m_configSettings.PhysicalPrim, - m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version); + m_configSettings.See_into_region_from_neighbor, m_config.Source); } # region Setup methods diff --git a/OpenSim/Framework/Communications/Services/GridInfoService.cs b/OpenSim/Framework/Communications/Services/GridInfoService.cs index 7b292ccb..17288f9d 100644 --- a/OpenSim/Framework/Communications/Services/GridInfoService.cs +++ b/OpenSim/Framework/Communications/Services/GridInfoService.cs @@ -78,7 +78,7 @@ public GridInfoService() private void loadGridInfo(IConfigSource configSource) { - _info["platform"] = "OpenSim"; + _info["platform"] = VersionInfo.SoftwareName; try { IConfig startupCfg = configSource.Configs["Startup"]; diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index e30345de..54622d37 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -77,11 +77,6 @@ public abstract class BaseOpenSimServer /// protected string m_startupDirectory = Environment.CurrentDirectory; - /// - /// Server version information. Usually VersionInfo + information about svn revision, operating system, etc. - /// - protected string m_version; - protected string m_pidFile = String.Empty; /// @@ -104,8 +99,7 @@ public BaseHttpServer HttpServer public BaseOpenSimServer() { m_startuptime = DateTime.Now; - m_version = VersionInfo.Version; - + // Random uuid for private data m_osSecret = UUID.Random().ToString(); @@ -306,7 +300,7 @@ public virtual void Startup() StartupSpecific(); // Report the version number near the end so you can still see it after startup. - m_log.Info("[STARTUP]: Version: " + m_version + "\n"); + m_log.Info("[STARTUP]: Version: " + VersionInfo.FullVersion + "\n"); TimeSpan timeTaken = DateTime.Now - m_startuptime; m_log.InfoFormat("[STARTUP]: Startup took {0}m {1}s", timeTaken.Minutes, timeTaken.Seconds); @@ -395,7 +389,7 @@ public virtual void HandleShow(string module, string[] cmd) switch (showParams[0]) { case "info": - Notice("Version: " + m_version); + Notice("Version: " + VersionInfo.FullVersion); Notice("Startup directory: " + m_startupDirectory); break; @@ -415,7 +409,7 @@ public virtual void HandleShow(string module, string[] cmd) case "version": Notice( String.Format( - "Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion)); + "Version: {0} (interface version {1})", VersionInfo.FullVersion, VersionInfo.MajorInterfaceVersion)); break; } } @@ -487,11 +481,11 @@ public string StatReport(OSHttpRequest httpRequest) // If we catch a request for "callback", wrap the response in the value for jsonp if( httpRequest.QueryString["callback"] != null) { - return httpRequest.QueryString["callback"] + "(" + m_stats.XReport((DateTime.Now - m_startuptime).ToString() , m_version ) + ");"; + return httpRequest.QueryString["callback"] + "(" + m_stats.XReport((DateTime.Now - m_startuptime).ToString() , VersionInfo.FullVersion ) + ");"; } else { - return m_stats.XReport((DateTime.Now - m_startuptime).ToString() , m_version ); + return m_stats.XReport((DateTime.Now - m_startuptime).ToString() , VersionInfo.FullVersion ); } } diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs index 71190c22..6a1e2b2d 100644 --- a/OpenSim/Framework/Servers/VersionInfo.cs +++ b/OpenSim/Framework/Servers/VersionInfo.cs @@ -45,7 +45,7 @@ public class VersionInfo /// This is name of the software product (separate from the grid it is running on). /// This should not be changed. /// - public readonly static string SoftwareName = "Halcyon"; + public readonly static string SoftwareName = "Halcyon Server"; private static string _version = null; // Change the AssemblyVersion above. private static string _revision = null; // Autogenerated by the build process due to '*'. @@ -87,14 +87,26 @@ public static string ShortVersion /// This is the full version, with revision info, such as "Halcyon 1.2.3 R151131". /// This is the one requested by most of the software, and passed in RegionInfo to viewers. /// - public static string Version + public static string FullVersion { get { _Initialize(); return ShortVersion + " R" + Revision; } } - + + /// + /// This is the version value without the software name but with revision info, such as "1.2.3.151131". + /// + /// Mostly used by the scripting system and therefore is best to follow LL's format which seems to be "Major.Minor.Update.Revision". + public static string Version + { + get { + _Initialize(); + return _version + "." + Revision; + } + } + /// /// This is the external interface version. It is separate from the externally-visible version info. /// diff --git a/OpenSim/Grid/GridServer.Modules/GridMessagingModule.cs b/OpenSim/Grid/GridServer.Modules/GridMessagingModule.cs index eb48bdbd..7e4d211d 100644 --- a/OpenSim/Grid/GridServer.Modules/GridMessagingModule.cs +++ b/OpenSim/Grid/GridServer.Modules/GridMessagingModule.cs @@ -64,7 +64,7 @@ public GridMessagingModule() { } - public void Initialize(string opensimVersion, IRegionProfileService gridDBService, IGridServiceCore gridCore, GridConfig config) + public void Initialize(IRegionProfileService gridDBService, IGridServiceCore gridCore, GridConfig config) { //m_opensimVersion = opensimVersion; m_gridDBService = gridDBService; diff --git a/OpenSim/Grid/GridServer.Modules/GridRestModule.cs b/OpenSim/Grid/GridServer.Modules/GridRestModule.cs index e0f25960..148bba52 100644 --- a/OpenSim/Grid/GridServer.Modules/GridRestModule.cs +++ b/OpenSim/Grid/GridServer.Modules/GridRestModule.cs @@ -67,7 +67,7 @@ public GridRestModule() { } - public void Initialize(string opensimVersion, GridDBService gridDBService, IGridServiceCore gridCore, GridConfig config) + public void Initialize(GridDBService gridDBService, IGridServiceCore gridCore, GridConfig config) { //m_opensimVersion = opensimVersion; m_gridDBService = gridDBService; diff --git a/OpenSim/Grid/GridServer.Modules/GridServerPlugin.cs b/OpenSim/Grid/GridServer.Modules/GridServerPlugin.cs index 51d6d652..d177d52a 100644 --- a/OpenSim/Grid/GridServer.Modules/GridServerPlugin.cs +++ b/OpenSim/Grid/GridServer.Modules/GridServerPlugin.cs @@ -47,8 +47,6 @@ public class GridServerPlugin : IGridPlugin protected GridDBService m_gridDBService; - protected string m_version; - protected GridConfig m_config; protected IGridServiceCore m_core; @@ -61,7 +59,6 @@ public void Initialize(GridServerBase gridServer) { m_core = gridServer; m_config = gridServer.Config; - m_version = gridServer.Version; m_console = MainConsole.Instance; AddConsoleCommands(); @@ -99,13 +96,13 @@ protected virtual void SetupGridServices() // RegisterInterface(m_gridDBService); m_gridMessageModule = new GridMessagingModule(); - m_gridMessageModule.Initialize(m_version, m_gridDBService, m_core, m_config); + m_gridMessageModule.Initialize(m_gridDBService, m_core, m_config); m_gridXmlRpcModule = new GridXmlRpcModule(); - m_gridXmlRpcModule.Initialize(m_version, m_gridDBService, m_core, m_config); + m_gridXmlRpcModule.Initialize(m_gridDBService, m_core, m_config); m_gridRestModule = new GridRestModule(); - m_gridRestModule.Initialize(m_version, m_gridDBService, m_core, m_config); + m_gridRestModule.Initialize(m_gridDBService, m_core, m_config); m_gridMessageModule.PostInitialize(); m_gridXmlRpcModule.PostInitialize(); diff --git a/OpenSim/Grid/GridServer.Modules/GridXmlRpcModule.cs b/OpenSim/Grid/GridServer.Modules/GridXmlRpcModule.cs index ac066f11..f19f1542 100644 --- a/OpenSim/Grid/GridServer.Modules/GridXmlRpcModule.cs +++ b/OpenSim/Grid/GridServer.Modules/GridXmlRpcModule.cs @@ -54,10 +54,6 @@ public class GridXmlRpcModule protected GridConfig m_config; protected IMessagingServerDiscovery m_messagingServerMapper; - /// - /// Used to notify old regions as to which OpenSim version to upgrade to - /// - private string m_opensimVersion; protected BaseHttpServer m_httpServer; @@ -71,9 +67,8 @@ public GridXmlRpcModule() { } - public void Initialize(string opensimVersion, IRegionProfileService gridDBService, IGridServiceCore gridCore, GridConfig config) + public void Initialize(IRegionProfileService gridDBService, IGridServiceCore gridCore, GridConfig config) { - m_opensimVersion = opensimVersion; m_gridDBService = gridDBService; m_gridCore = gridCore; m_config = config; @@ -302,8 +297,8 @@ public XmlRpcResponse XmlRpcSimulatorLoginMethod(XmlRpcRequest request, IPEndPoi String.Format( "Your region service implements OGS1 interface version {0}" + " but this grid requires that the region implement OGS1 interface version {1} to connect." - + " Try changing to OpenSimulator {2}", - majorInterfaceVersion, VersionInfo.MajorInterfaceVersion, m_opensimVersion)); + + " Try changing to {2}", + majorInterfaceVersion, VersionInfo.MajorInterfaceVersion, VersionInfo.ShortVersion)); } existingSim = m_gridDBService.GetRegion(sim.regionHandle); diff --git a/OpenSim/Grid/GridServer/GridServerBase.cs b/OpenSim/Grid/GridServer/GridServerBase.cs index b81b46f3..1f8eed2b 100644 --- a/OpenSim/Grid/GridServer/GridServerBase.cs +++ b/OpenSim/Grid/GridServer/GridServerBase.cs @@ -58,11 +58,6 @@ public GridConfig Config get { return m_config; } } - public string Version - { - get { return m_version; } - } - protected List m_plugins = new List(); public void Work() diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 20560444..892261ba 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -163,7 +163,7 @@ private C5.HashedLinkedList m_primTerseUpdates private int m_animationSequenceNumber = 1; - private readonly byte[] m_channelVersion = Utils.StringToBytes("OpenSimulator Server"); // Dummy value needed by libSL + private readonly byte[] m_channelVersion = Utils.StringToBytes(VersionInfo.SoftwareName); // Dummy value needed by libSL private static readonly Dictionary s_defaultAnimations = new Dictionary(); diff --git a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs index 6f974a78..c2fcad7d 100644 --- a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs +++ b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs @@ -104,7 +104,7 @@ private string Report() args["TimeZoneOffs"] = OSD.FromReal(utcOffset.TotalHours); args["UxTime"] = OSD.FromInteger(Util.ToUnixTime(DateTime.Now)); args["Memory"] = OSD.FromReal(Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0)); - args["Version"] = OSD.FromString(VersionInfo.Version); + args["Version"] = OSD.FromString(VersionInfo.FullVersion); string strBuffer = ""; strBuffer = OSDParser.SerializeJsonString(args); diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index cbfbe8a1..f6ed80fc 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -30,6 +30,8 @@ //using System.Drawing; //using System.Drawing.Imaging; using System.IO; +using System.Net; +using System.Net.NetworkInformation; using System.Text; using System.Threading; using System.Timers; @@ -201,8 +203,6 @@ public int CompareTo(PotentialTimedReturn other) private Dictionary m_returns = new Dictionary(); - protected string m_simulatorVersion = "InWorldz Server"; - protected ModuleLoader m_moduleLoader; protected StorageManager m_storageManager; public CommunicationsManager CommsManager; @@ -414,7 +414,7 @@ public Scene(RegionInfo regInfo, CommunicationsManager commsMan, SceneCommunicationService sceneGridService, StorageManager storeManager, ModuleLoader moduleLoader, bool physicalPrim, - bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) + bool SeeIntoRegionFromNeighbor, IConfigSource config) { m_config = config; @@ -471,8 +471,6 @@ public Scene(RegionInfo regInfo, StatsReporter.SetObjectCapacity(objectCapacity); - m_simulatorVersion = simulatorVersion; - IConfig netConfig = m_config.Configs["Network"]; this.GridSendKey = netConfig.GetString("grid_send_key"); @@ -849,21 +847,16 @@ protected virtual void RegisterDefaultSceneEvents() m_eventManager.OnPermissionError += dm.SendAlertToUser; } - public override string GetSimulatorVersion() - { - return m_simulatorVersion; - } - public string GetEnv(string name) { string ret = ""; switch (name) { - case "sim_channel": // Get the region's channel string, for example "Second Life Server". - ret = "InWorldz Server"; + case "sim_channel": // Get the region's channel string, for example "Second Life Server". Does not change across grids as this is about the simulator software. + ret = VersionInfo.SoftwareName; break; - case "sim_version": // Get the region's version number string, for example "10.11.30.215699". - ret = m_simulatorVersion; + case "sim_version": // Get the region's version number string, for example "10.11.30.215699". Does not change across grids as this is about the simulator software. + ret = VersionInfo.Version; break; case "frame_number": // (integer) Get the frame number of the simulator, for example "42042". ret = m_frame.ToString(); diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index 0696e92a..ab1ba5c9 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs @@ -210,7 +210,7 @@ public virtual bool PresenceChildStatus(UUID avatarID) public virtual string GetSimulatorVersion() { - return "OpenSimulator Server"; + return VersionInfo.FullVersion; } #endregion diff --git a/prebuild.xml b/prebuild.xml index d668c24e..28a248a0 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1858,6 +1858,7 @@ +