Merge branch 'master' of ssh://opensimulator.org/var/git/opensim into x-opensim

0.6.8-post-fixes
dr scofield (aka dirk husemann) 2009-10-01 09:48:02 +02:00
commit 9dcf7da42a
233 changed files with 973 additions and 1011 deletions

View File

@ -185,11 +185,11 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
} }
protected virtual void InitialiseHGStandaloneServices(LibraryRootFolder libraryRootFolder) protected virtual void InitialiseHGStandaloneServices(LibraryRootFolder libraryRootFolder)
{ {
m_commsManager m_commsManager
= new HGCommunicationsStandalone( = new HGCommunicationsStandalone(
m_openSim.ConfigurationSettings, m_openSim.NetServersInfo, m_httpServer, m_openSim.ConfigurationSettings, m_openSim.NetServersInfo, m_httpServer,
libraryRootFolder, false); libraryRootFolder, false);
CreateGridInfoService(); CreateGridInfoService();
} }

View File

@ -69,7 +69,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
private string m_name = "RemoteAdminPlugin"; private string m_name = "RemoteAdminPlugin";
private string m_version = "0.0"; private string m_version = "0.0";
//AnakinLohner 0.6.5-post-fixes
//guard for XmlRpc-related methods //guard for XmlRpc-related methods
private void FailIfRemoteAdminDisabled(string requestName) private void FailIfRemoteAdminDisabled(string requestName)
{ {
@ -142,7 +141,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
availableMethods["admin_acl_remove"] = XmlRpcAccessListRemove; availableMethods["admin_acl_remove"] = XmlRpcAccessListRemove;
availableMethods["admin_acl_list"] = XmlRpcAccessListList; availableMethods["admin_acl_list"] = XmlRpcAccessListList;
// Either enable full remote functionality or just selected features // Either enable full remote functionality or just selected features
string enabledMethods = m_config.GetString("enabled_methods", "all"); string enabledMethods = m_config.GetString("enabled_methods", "all");
// To get this, you must explicitly specify "all" or // To get this, you must explicitly specify "all" or
@ -469,7 +468,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
m_log.Info("[RADMIN]: CreateRegion: new request"); m_log.Info("[RADMIN]: CreateRegion: new request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("CreateRegion"); FailIfRemoteAdminDisabled("CreateRegion");
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
@ -477,7 +475,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
lock (rslock) lock (rslock)
{ {
int m_regionLimit = m_config.GetInt("region_limit", 0); int m_regionLimit = m_config.GetInt("region_limit", 0);
bool m_enableVoiceForNewRegions = m_config.GetBoolean("create_region_enable_voice", false); bool m_enableVoiceForNewRegions = m_config.GetBoolean("create_region_enable_voice", false);
bool m_publicAccess = m_config.GetBoolean("create_region_public", true); bool m_publicAccess = m_config.GetBoolean("create_region_public", true);
@ -502,7 +499,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
// check whether we still have space left (iff we are using limits) // check whether we still have space left (iff we are using limits)
if (m_regionLimit != 0 && m_app.SceneManager.Scenes.Count >= m_regionLimit) 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", throw new Exception(String.Format("cannot instantiate new region, server capacity {0} already reached; delete regions first",
m_regionLimit)); m_regionLimit));
// extract or generate region ID now // extract or generate region ID now
Scene scene = null; Scene scene = null;
@ -561,7 +558,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY));
region.ExternalHostName = (string) requestData["external_address"]; region.ExternalHostName = (string) requestData["external_address"];
string masterFirst = (string) requestData["region_master_first"]; string masterFirst = (string) requestData["region_master_first"];
@ -580,10 +576,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (masterFirst != String.Empty && masterLast != String.Empty) // User requests a master avatar if (masterFirst != String.Empty && masterLast != String.Empty) // User requests a master avatar
{ {
// no client supplied UUID: look it up... // no client supplied UUID: look it up...
CachedUserInfo userInfo CachedUserInfo userInfo
= m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails( = m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(
masterFirst, masterLast); masterFirst, masterLast);
if (null == userInfo) if (null == userInfo)
{ {
m_log.InfoFormat("master avatar does not exist, creating it"); m_log.InfoFormat("master avatar does not exist, creating it");
@ -636,7 +632,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
m_log.DebugFormat("[RADMIN] CreateRegion: persisting region {0} to {1}", m_log.DebugFormat("[RADMIN] CreateRegion: persisting region {0} to {1}",
region.RegionID, regionXmlPath); region.RegionID, regionXmlPath);
region.SaveRegionToFile("dynamic region", regionXmlPath); region.SaveRegionToFile("dynamic region", regionXmlPath);
} }
else else
{ {
region.Persistent = false; region.Persistent = false;
@ -664,7 +660,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
parcel.landData.Flags |= (uint) ParcelFlags.AllowVoiceChat; parcel.landData.Flags |= (uint) ParcelFlags.AllowVoiceChat;
parcel.landData.Flags |= (uint) ParcelFlags.UseEstateVoiceChan; parcel.landData.Flags |= (uint) ParcelFlags.UseEstateVoiceChan;
((Scene)newscene).LandChannel.UpdateLandObject(parcel.landData.LocalID, parcel.landData); ((Scene)newscene).LandChannel.UpdateLandObject(parcel.landData.LocalID, parcel.landData);
} }
} }
@ -684,7 +680,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
response.Value = responseData; response.Value = responseData;
} }
m_log.Info("[RADMIN]: CreateRegion: request complete"); m_log.Info("[RADMIN]: CreateRegion: request complete");
return response; return response;
} }
@ -756,7 +752,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
return response; return response;
} }
} }
/// <summary> /// <summary>
/// Close a region. /// Close a region.
/// <summary> /// <summary>
@ -798,7 +794,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
Hashtable requestData = (Hashtable) request.Params[0]; Hashtable requestData = (Hashtable) request.Params[0];
checkStringParameters(request, new string[] {"password"}); checkStringParameters(request, new string[] {"password"});
if (requestData.ContainsKey("region_id") && if (requestData.ContainsKey("region_id") &&
!String.IsNullOrEmpty((string) requestData["region_id"])) !String.IsNullOrEmpty((string) requestData["region_id"]))
{ {
@ -899,8 +895,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (!m_app.SceneManager.TryGetScene(regionName, out scene)) if (!m_app.SceneManager.TryGetScene(regionName, out scene))
throw new Exception(String.Format("region \"{0}\" does not exist", regionName)); throw new Exception(String.Format("region \"{0}\" does not exist", regionName));
// Modify access // Modify access
scene.RegionInfo.EstateSettings.PublicAccess = scene.RegionInfo.EstateSettings.PublicAccess =
getBoolean(requestData,"public", scene.RegionInfo.EstateSettings.PublicAccess); getBoolean(requestData,"public", scene.RegionInfo.EstateSettings.PublicAccess);
if (scene.RegionInfo.Persistent) if (scene.RegionInfo.Persistent)
scene.RegionInfo.EstateSettings.Save(); scene.RegionInfo.EstateSettings.Save();
@ -988,8 +984,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
public XmlRpcResponse XmlRpcCreateUserMethod(XmlRpcRequest request, IPEndPoint remoteClient) public XmlRpcResponse XmlRpcCreateUserMethod(XmlRpcRequest request, IPEndPoint remoteClient)
{ {
m_log.Info("[RADMIN]: CreateUser: new request"); m_log.Info("[RADMIN]: CreateUser: new request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("CreateUser"); FailIfRemoteAdminDisabled("CreateUser");
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
@ -1024,13 +1019,13 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (requestData.Contains("user_email")) if (requestData.Contains("user_email"))
email = (string)requestData["user_email"]; email = (string)requestData["user_email"];
CachedUserInfo userInfo = CachedUserInfo userInfo =
m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(firstname, lastname); m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(firstname, lastname);
if (null != userInfo) if (null != userInfo)
throw new Exception(String.Format("Avatar {0} {1} already exists", firstname, lastname)); throw new Exception(String.Format("Avatar {0} {1} already exists", firstname, lastname));
UUID userID = UUID userID =
m_app.CommunicationsManager.UserAdminService.AddUser(firstname, lastname, m_app.CommunicationsManager.UserAdminService.AddUser(firstname, lastname,
passwd, email, regX, regY); passwd, email, regX, regY);
@ -1101,7 +1096,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
m_log.Info("[RADMIN]: UserExists: new request"); m_log.Info("[RADMIN]: UserExists: new request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("UserExists"); FailIfRemoteAdminDisabled("UserExists");
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
@ -1117,8 +1111,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
string firstname = (string) requestData["user_firstname"]; string firstname = (string) requestData["user_firstname"];
string lastname = (string) requestData["user_lastname"]; string lastname = (string) requestData["user_lastname"];
CachedUserInfo userInfo CachedUserInfo userInfo
= m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(firstname, lastname); = m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(firstname, lastname);
responseData["user_firstname"] = firstname; responseData["user_firstname"] = firstname;
responseData["user_lastname"] = lastname; responseData["user_lastname"] = lastname;
@ -1131,10 +1125,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
else else
{ {
responseData["success"] = true; responseData["success"] = true;
responseData["lastlogin"] = userInfo.UserProfile.LastLogin; responseData["lastlogin"] = userInfo.UserProfile.LastLogin;
} }
response.Value = responseData; response.Value = responseData;
} }
catch (Exception e) catch (Exception e)
@ -1252,7 +1245,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (requestData.ContainsKey("about_virtual_world")) if (requestData.ContainsKey("about_virtual_world"))
aboutAvatar = (string)requestData["about_virtual_world"]; aboutAvatar = (string)requestData["about_virtual_world"];
UserProfileData userProfile UserProfileData userProfile
= m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname); = m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname);
if (null == userProfile) if (null == userProfile)
@ -1308,20 +1301,18 @@ namespace OpenSim.ApplicationPlugins.RemoteController
m_log.Info("[RADMIN]: UpdateUserAccount: request complete"); m_log.Info("[RADMIN]: UpdateUserAccount: request complete");
return response; return response;
} }
/// <summary> /// <summary>
/// This method is called by the user-create and user-modify methods to establish /// This method is called by the user-create and user-modify methods to establish
/// or change, the user's appearance. Default avatar names can be specified via /// or change, the user's appearance. Default avatar names can be specified via
/// the config file, but must correspond to avatars in the default appearance /// the config file, but must correspond to avatars in the default appearance
/// file, or pre-existing in the user database. /// file, or pre-existing in the user database.
/// This should probably get moved into somewhere more core eventually. /// This should probably get moved into somewhere more core eventually.
/// </summary> /// </summary>
private void updateUserAppearance(Hashtable responseData, Hashtable requestData, UUID userid) private void updateUserAppearance(Hashtable responseData, Hashtable requestData, UUID userid)
{ {
m_log.DebugFormat("[RADMIN] updateUserAppearance"); m_log.DebugFormat("[RADMIN] updateUserAppearance");
string dmale = m_config.GetString("default_male", "Default Male"); string dmale = m_config.GetString("default_male", "Default Male");
@ -1347,7 +1338,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
break; break;
} }
} }
// Has an explicit model been specified? // Has an explicit model been specified?
if (requestData.Contains("model")) if (requestData.Contains("model"))
@ -1384,7 +1375,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
return; return;
} }
// Set current user's appearance. This bit is easy. The appearance structure is populated with // Set current user's appearance. This bit is easy. The appearance structure is populated with
// actual asset ids, however to complete the magic we need to populate the inventory with the // actual asset ids, however to complete the magic we need to populate the inventory with the
// assets in question. // assets in question.
@ -1393,7 +1384,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
m_log.DebugFormat("[RADMIN] Finished setting appearance for avatar {0}, using model {1}", m_log.DebugFormat("[RADMIN] Finished setting appearance for avatar {0}, using model {1}",
userid, model); userid, model);
} }
/// <summary> /// <summary>
/// This method is called by updateAvatarAppearance once any specified model has been /// This method is called by updateAvatarAppearance once any specified model has been
/// ratified, or an appropriate default value has been adopted. The intended prototype /// ratified, or an appropriate default value has been adopted. The intended prototype
@ -1402,19 +1393,18 @@ namespace OpenSim.ApplicationPlugins.RemoteController
private void establishAppearance(UUID dest, UUID srca) private void establishAppearance(UUID dest, UUID srca)
{ {
m_log.DebugFormat("[RADMIN] Initializing inventory for {0} from {1}", dest, srca); m_log.DebugFormat("[RADMIN] Initializing inventory for {0} from {1}", dest, srca);
AvatarAppearance ava = m_app.CommunicationsManager.AvatarService.GetUserAppearance(srca); AvatarAppearance ava = m_app.CommunicationsManager.AvatarService.GetUserAppearance(srca);
// If the model has no associated appearance we're done. // If the model has no associated appearance we're done.
// if (ava == null) // if (ava == null)
// { // {
// return new AvatarAppearance(); // return new AvatarAppearance();
// } // }
if (ava == null) if (ava == null)
return; return;
UICallback sic = new UICallback(); UICallback sic = new UICallback();
@ -1423,7 +1413,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
try try
{ {
Dictionary<UUID,UUID> imap = new Dictionary<UUID,UUID>(); Dictionary<UUID,UUID> imap = new Dictionary<UUID,UUID>();
iserv.GetUserInventory(dest, dic.callback); iserv.GetUserInventory(dest, dic.callback);
@ -1434,7 +1423,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (sic.OK && dic.OK) if (sic.OK && dic.OK)
{ {
InventoryFolderImpl efolder; InventoryFolderImpl efolder;
InventoryFolderImpl srcf = sic.root.FindFolderForType(5); InventoryFolderImpl srcf = sic.root.FindFolderForType(5);
InventoryFolderImpl dstf = dic.root.FindFolderForType(5); InventoryFolderImpl dstf = dic.root.FindFolderForType(5);
@ -1460,7 +1448,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (item.Folder == folder.ID) if (item.Folder == folder.ID)
{ {
InventoryItemBase dsti = new InventoryItemBase(); InventoryItemBase dsti = new InventoryItemBase();
dsti.ID = UUID.Random(); dsti.ID = UUID.Random();
dsti.Name = item.Name; dsti.Name = item.Name;
dsti.Description = item.Description; dsti.Description = item.Description;
dsti.InvType = item.InvType; dsti.InvType = item.InvType;
@ -1494,7 +1482,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
ava.SetWearable(i, dw); ava.SetWearable(i, dw);
} }
} }
} }
else else
{ {
@ -1502,7 +1489,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
} }
m_app.CommunicationsManager.AvatarService.UpdateUserAppearance(dest, ava); m_app.CommunicationsManager.AvatarService.UpdateUserAppearance(dest, ava);
} }
catch (Exception e) catch (Exception e)
{ {
@ -1510,16 +1496,15 @@ namespace OpenSim.ApplicationPlugins.RemoteController
dest, e.Message); dest, e.Message);
return; return;
} }
return;
return;
} }
///<summary> ///<summary>
/// This method is called if a given model avatar name can not be found. If the external /// This method is called if a given model avatar name can not be found. If the external
/// file has already been loaded once, then control returns immediately. If not, then it /// file has already been loaded once, then control returns immediately. If not, then it
/// looks for a default appearance file. This file contains XML definitions of zero or more named /// looks for a default appearance file. This file contains XML definitions of zero or more named
/// avatars, each avatar can specify zero or more "outfits". Each outfit is a collection /// avatars, each avatar can specify zero or more "outfits". Each outfit is a collection
/// of items that together, define a particular ensemble for the avatar. Each avatar should /// of items that together, define a particular ensemble for the avatar. Each avatar should
/// indicate which outfit is the default, and this outfit will be automatically worn. The /// indicate which outfit is the default, and this outfit will be automatically worn. The
/// other outfits are provided to allow "real" avatars a way to easily change their outfits. /// other outfits are provided to allow "real" avatars a way to easily change their outfits.
@ -1527,7 +1512,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
private bool createDefaultAvatars() private bool createDefaultAvatars()
{ {
// Only load once // Only load once
if (daload) if (daload)
@ -1543,10 +1527,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
try try
{ {
string dafn = null; string dafn = null;
//AnakinLohner 0.6.5-post-fixes
//m_config may be null if RemoteAdmin configuration secition is missing or disabled in OpenSim.ini //m_config may be null if RemoteAdmin configuration secition is missing or disabled in OpenSim.ini
if (m_config != null) if (m_config != null)
{ {
@ -1555,7 +1537,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (File.Exists(dafn)) if (File.Exists(dafn))
{ {
XmlDocument doc = new XmlDocument(); XmlDocument doc = new XmlDocument();
string name = "*unknown*"; string name = "*unknown*";
string email = "anon@anon"; string email = "anon@anon";
@ -1630,12 +1611,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController
} }
m_log.DebugFormat("[RADMIN] User {0}[{1}] created or retrieved", name, ID); m_log.DebugFormat("[RADMIN] User {0}[{1}] created or retrieved", name, ID);
include = true; include = true;
} }
catch (Exception e) catch (Exception e)
{ {
m_log.DebugFormat("[RADMIN] Error creating user {0} : {1}", name, e.Message); m_log.DebugFormat("[RADMIN] Error creating user {0} : {1}", name, e.Message);
include = false; include = false;
} }
// OK, User has been created OK, now we can install the inventory. // OK, User has been created OK, now we can install the inventory.
@ -1654,7 +1635,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
mava = new AvatarAppearance(); mava = new AvatarAppearance();
} }
{ {
AvatarWearable[] wearables = mava.Wearables; AvatarWearable[] wearables = mava.Wearables;
for (int i=0; i<wearables.Length; i++) for (int i=0; i<wearables.Length; i++)
@ -1670,8 +1651,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (uic.OK) if (uic.OK)
try try
{ {
m_log.DebugFormat("[RADMIN] {0} folders, {1} items in inventory",
m_log.DebugFormat("[RADMIN] {0} folders, {1} items in inventory",
uic.folders.Count, uic.items.Count); uic.folders.Count, uic.items.Count);
InventoryFolderImpl cfolder = uic.root.FindFolderForType(5); InventoryFolderImpl cfolder = uic.root.FindFolderForType(5);
@ -1699,7 +1679,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
foreach (XmlElement outfit in outfits) foreach (XmlElement outfit in outfits)
{ {
m_log.DebugFormat("[RADMIN] Loading outfit {0} for {1}", m_log.DebugFormat("[RADMIN] Loading outfit {0} for {1}",
GetStringAttribute(outfit,"name","?"), GetStringAttribute(avatar,"name","?")); GetStringAttribute(outfit,"name","?"), GetStringAttribute(avatar,"name","?"));
@ -1707,7 +1686,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
select = (GetStringAttribute(outfit,"default","no") == "yes"); select = (GetStringAttribute(outfit,"default","no") == "yes");
efolder = null; efolder = null;
// If the folder already exists, re-use it. The defaults may // If the folder already exists, re-use it. The defaults may
// change over time. Augment only. // change over time. Augment only.
foreach (InventoryFolderImpl folder in uic.folders) foreach (InventoryFolderImpl folder in uic.folders)
{ {
@ -1756,10 +1735,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
InventoryItemBase iitem = null; InventoryItemBase iitem = null;
if ((iitem = efolder.FindAsset(assetid)) == null) if ((iitem = efolder.FindAsset(assetid)) == null)
{ {
iitem = new InventoryItemBase(); iitem = new InventoryItemBase();
iitem.ID = UUID.Random(); iitem.ID = UUID.Random();
iitem.Name = GetStringAttribute(item,"name",""); iitem.Name = GetStringAttribute(item,"name","");
iitem.Description = GetStringAttribute(item,"desc",""); iitem.Description = GetStringAttribute(item,"desc","");
iitem.InvType = GetIntegerAttribute(item,"invtype",-1); iitem.InvType = GetIntegerAttribute(item,"invtype",-1);
@ -1820,9 +1799,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
} }
return true; return true;
} }
/// <summary> /// <summary>
/// Load an OAR file into a region.. /// Load an OAR file into a region..
/// <summary> /// <summary>
@ -1859,9 +1837,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
m_log.Info("[RADMIN]: Received Load OAR Administrator Request"); m_log.Info("[RADMIN]: Received Load OAR Administrator Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Load OAR"); FailIfRemoteAdminDisabled("Load OAR");
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable(); Hashtable responseData = new Hashtable();
@ -1962,9 +1939,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
m_log.Info("[RADMIN]: Received Save OAR Administrator Request"); m_log.Info("[RADMIN]: Received Save OAR Administrator Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Save OAR"); FailIfRemoteAdminDisabled("Save OAR");
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable(); Hashtable responseData = new Hashtable();
@ -2003,7 +1979,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>(); IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>();
if (archiver != null) if (archiver != null)
{ {
scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted; scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted;
@ -2014,11 +1989,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
else else
throw new Exception("Archiver module not present for scene"); throw new Exception("Archiver module not present for scene");
responseData["saved"] = true; responseData["saved"] = true;
response.Value = responseData; response.Value = responseData;
} }
catch (Exception e) catch (Exception e)
{ {
@ -2045,7 +2018,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
m_log.Info("[RADMIN]: Received Load XML Administrator Request"); m_log.Info("[RADMIN]: Received Load XML Administrator Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Load XML"); FailIfRemoteAdminDisabled("Load XML");
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
@ -2129,12 +2101,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
} }
} }
public XmlRpcResponse XmlRpcSaveXMLMethod(XmlRpcRequest request, IPEndPoint remoteClient) public XmlRpcResponse XmlRpcSaveXMLMethod(XmlRpcRequest request, IPEndPoint remoteClient)
{ {
m_log.Info("[RADMIN]: Received Save XML Administrator Request"); m_log.Info("[RADMIN]: Received Save XML Administrator Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Save XML"); FailIfRemoteAdminDisabled("Save XML");
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
@ -2220,7 +2190,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
m_log.Info("[RADMIN]: Received Query XML Administrator Request"); m_log.Info("[RADMIN]: Received Query XML Administrator Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Query XML"); FailIfRemoteAdminDisabled("Query XML");
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
@ -2255,9 +2224,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
else throw new Exception("neither region_name nor region_uuid given"); else throw new Exception("neither region_name nor region_uuid given");
Scene s = m_app.SceneManager.CurrentScene; Scene s = m_app.SceneManager.CurrentScene;
int health = s.GetHealth(); int health = s.GetHealth();
responseData["health"] = health; responseData["health"] = health;
response.Value = responseData; response.Value = responseData;
@ -2280,7 +2247,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
m_log.Info("[RADMIN]: Received Command XML Administrator Request"); m_log.Info("[RADMIN]: Received Command XML Administrator Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Command XML"); FailIfRemoteAdminDisabled("Command XML");
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
@ -2320,12 +2286,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
public XmlRpcResponse XmlRpcAccessListClear(XmlRpcRequest request, IPEndPoint remoteClient) public XmlRpcResponse XmlRpcAccessListClear(XmlRpcRequest request, IPEndPoint remoteClient)
{ {
m_log.Info("[RADMIN]: Received Access List Clear Request"); m_log.Info("[RADMIN]: Received Access List Clear Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Access List Clear"); FailIfRemoteAdminDisabled("Access List Clear");
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable(); Hashtable responseData = new Hashtable();
@ -2360,7 +2324,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
s.RegionInfo.EstateSettings.EstateAccess = new UUID[]{}; s.RegionInfo.EstateSettings.EstateAccess = new UUID[]{};
if (s.RegionInfo.Persistent) if (s.RegionInfo.Persistent)
s.RegionInfo.EstateSettings.Save(); s.RegionInfo.EstateSettings.Save();
} }
catch (Exception e) catch (Exception e)
{ {
@ -2368,7 +2331,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
responseData["success"] = false; responseData["success"] = false;
responseData["error"] = e.Message; responseData["error"] = e.Message;
} }
finally finally
{ {
@ -2381,12 +2343,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
public XmlRpcResponse XmlRpcAccessListAdd(XmlRpcRequest request, IPEndPoint remoteClient) public XmlRpcResponse XmlRpcAccessListAdd(XmlRpcRequest request, IPEndPoint remoteClient)
{ {
m_log.Info("[RADMIN]: Received Access List Add Request"); m_log.Info("[RADMIN]: Received Access List Add Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Access List Add"); FailIfRemoteAdminDisabled("Access List Add");
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable(); Hashtable responseData = new Hashtable();
@ -2419,7 +2379,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
int addk = 0; int addk = 0;
if (requestData.Contains("users")) if (requestData.Contains("users"))
{ {
UserProfileCacheService ups = m_app.CommunicationsManager.UserProfileCacheService; UserProfileCacheService ups = m_app.CommunicationsManager.UserProfileCacheService;
Scene s = m_app.SceneManager.CurrentScene; Scene s = m_app.SceneManager.CurrentScene;
@ -2450,7 +2410,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
} }
responseData["added"] = addk; responseData["added"] = addk;
} }
catch (Exception e) catch (Exception e)
{ {
@ -2458,7 +2417,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
responseData["success"] = false; responseData["success"] = false;
responseData["error"] = e.Message; responseData["error"] = e.Message;
} }
finally finally
{ {
@ -2471,12 +2429,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
public XmlRpcResponse XmlRpcAccessListRemove(XmlRpcRequest request, IPEndPoint remoteClient) public XmlRpcResponse XmlRpcAccessListRemove(XmlRpcRequest request, IPEndPoint remoteClient)
{ {
m_log.Info("[RADMIN]: Received Access List Remove Request"); m_log.Info("[RADMIN]: Received Access List Remove Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Access List Remove"); FailIfRemoteAdminDisabled("Access List Remove");
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable(); Hashtable responseData = new Hashtable();
@ -2509,7 +2465,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
int remk = 0; int remk = 0;
if (requestData.Contains("users")) if (requestData.Contains("users"))
{ {
UserProfileCacheService ups = m_app.CommunicationsManager.UserProfileCacheService; UserProfileCacheService ups = m_app.CommunicationsManager.UserProfileCacheService;
Scene s = m_app.SceneManager.CurrentScene; Scene s = m_app.SceneManager.CurrentScene;
@ -2539,7 +2495,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
} }
responseData["removed"] = remk; responseData["removed"] = remk;
} }
catch (Exception e) catch (Exception e)
{ {
@ -2547,7 +2502,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
responseData["success"] = false; responseData["success"] = false;
responseData["error"] = e.Message; responseData["error"] = e.Message;
} }
finally finally
{ {
@ -2560,12 +2514,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
public XmlRpcResponse XmlRpcAccessListList(XmlRpcRequest request, IPEndPoint remoteClient) public XmlRpcResponse XmlRpcAccessListList(XmlRpcRequest request, IPEndPoint remoteClient)
{ {
m_log.Info("[RADMIN]: Received Access List List Request"); m_log.Info("[RADMIN]: Received Access List List Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Access List List"); FailIfRemoteAdminDisabled("Access List List");
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable(); Hashtable responseData = new Hashtable();
@ -2608,9 +2560,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
users[user.ToString()] = udata.UserProfile.Name; users[user.ToString()] = udata.UserProfile.Name;
} }
} }
responseData["users"] = users;
responseData["users"] = users;
} }
catch (Exception e) catch (Exception e)
{ {
@ -2618,7 +2569,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
responseData["success"] = false; responseData["success"] = false;
responseData["error"] = e.Message; responseData["error"] = e.Message;
} }
finally finally
{ {
@ -2695,12 +2645,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
public void Dispose() public void Dispose()
{ {
} }
} }
class UICallback class UICallback
{ {
private Object uilock = new Object(); private Object uilock = new Object();
internal InventoryFolderImpl root = null; internal InventoryFolderImpl root = null;
internal List<InventoryFolderImpl> folders; internal List<InventoryFolderImpl> folders;
@ -2720,7 +2668,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
public void GetInventory() public void GetInventory()
{ {
Dictionary<UUID, InventoryFolderImpl> fmap = new Dictionary<UUID, InventoryFolderImpl>(); Dictionary<UUID, InventoryFolderImpl> fmap = new Dictionary<UUID, InventoryFolderImpl>();
if (OK == false) if (OK == false)
@ -2729,7 +2676,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
if (OK == false) if (OK == false)
System.Threading.Monitor.Wait(uilock); System.Threading.Monitor.Wait(uilock);
} }
} }
// Got the inventory OK. So now merge the content of the default appearance // Got the inventory OK. So now merge the content of the default appearance
@ -2774,8 +2721,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
fmap[item.Folder].Items.Add(item.ID, item); fmap[item.Folder].Items.Add(item.ID, item);
} }
} }
} }
} }

View File

@ -218,7 +218,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
httpResponse.ContentType = "text/xml"; httpResponse.ContentType = "text/xml";
IRegionSerialiserModule serialiser = scene.RequestModuleInterface<IRegionSerialiserModule>(); IRegionSerialiserModule serialiser = scene.RequestModuleInterface<IRegionSerialiserModule>();
if (serialiser != null) if (serialiser != null)
serialiser.SavePrimsToXml2(scene, new StreamWriter(httpResponse.OutputStream), min, max); serialiser.SavePrimsToXml2(scene, new StreamWriter(httpResponse.OutputStream), min, max);
return ""; return "";

View File

@ -304,7 +304,7 @@ namespace OpenSim.Client.MXP.ClientStack
String typeName = ToOmType(primShape.PCode); String typeName = ToOmType(primShape.PCode);
m_log.Info("[MXP ClientStack] Transmitting Primitive" + typeName); m_log.Info("[MXP ClientStack] Transmitting Primitive" + typeName);
PerceptionEventMessage pe = new PerceptionEventMessage(); PerceptionEventMessage pe = new PerceptionEventMessage();
pe.ObjectFragment.ObjectId = objectID.Guid; pe.ObjectFragment.ObjectId = objectID.Guid;
pe.ObjectFragment.ParentObjectId = Guid.Empty; pe.ObjectFragment.ParentObjectId = Guid.Empty;

View File

@ -54,7 +54,7 @@ namespace OpenSim.Data
/// <summary> /// <summary>
/// Get a user from a given uri. /// Get a user from a given uri.
/// </summary> /// </summary>
/// <param name="uri"></param> /// <param name="uri"></param>
/// <returns>The user data profile. Null if no user is found.</returns> /// <returns>The user data profile. Null if no user is found.</returns>
UserProfileData GetUserByUri(Uri uri); UserProfileData GetUserByUri(Uri uri);

View File

@ -175,7 +175,7 @@ namespace OpenSim.Data.MSSQL
(@id, @name, @description, @assetType, @local, (@id, @name, @description, @assetType, @local,
@temporary, @create_time, @access_time, @data)"; @temporary, @create_time, @access_time, @data)";
string assetName = asset.Name; string assetName = asset.Name;
if (asset.Name.Length > 64) if (asset.Name.Length > 64)
{ {
assetName = asset.Name.Substring(0, 64); assetName = asset.Name.Substring(0, 64);
@ -223,7 +223,7 @@ namespace OpenSim.Data.MSSQL
local = @local, temporary = @temporary, data = @data local = @local, temporary = @temporary, data = @data
WHERE id = @keyId;"; WHERE id = @keyId;";
string assetName = asset.Name; string assetName = asset.Name;
if (asset.Name.Length > 64) if (asset.Name.Length > 64)
{ {
assetName = asset.Name.Substring(0, 64); assetName = asset.Name.Substring(0, 64);

View File

@ -428,7 +428,7 @@ namespace OpenSim.Data.MSSQL
@inventoryBasePermissions, @inventoryEveryOnePermissions, @inventoryGroupPermissions, @salePrice, @saleType, @inventoryBasePermissions, @inventoryEveryOnePermissions, @inventoryGroupPermissions, @salePrice, @saleType,
@creationDate, @groupID, @groupOwned, @flags)"; @creationDate, @groupID, @groupOwned, @flags)";
string itemName = item.Name; string itemName = item.Name;
if (item.Name.Length > 64) if (item.Name.Length > 64)
{ {
itemName = item.Name.Substring(0, 64); itemName = item.Name.Substring(0, 64);
@ -529,7 +529,7 @@ namespace OpenSim.Data.MSSQL
{ {
itemDesc = item.Description.Substring(0, 128); itemDesc = item.Description.Substring(0, 128);
m_log.Warn("[INVENTORY DB]: Description field truncated from " + item.Description.Length.ToString() + " to " + itemDesc.Length.ToString() + " characters on update"); m_log.Warn("[INVENTORY DB]: Description field truncated from " + item.Description.Length.ToString() + " to " + itemDesc.Length.ToString() + " characters on update");
} }
using (AutoClosingSqlCommand command = database.Query(sql)) using (AutoClosingSqlCommand command = database.Query(sql))
{ {

View File

@ -146,7 +146,7 @@ namespace OpenSim.Data.MSSQL
sceneObjectPart.Name, sceneObjectPart.UUID, sceneObjectPart.GroupPosition, groupID); sceneObjectPart.Name, sceneObjectPart.UUID, sceneObjectPart.GroupPosition, groupID);
sceneObjectPart.UUID = groupID; sceneObjectPart.UUID = groupID;
} }
grp = new SceneObjectGroup(sceneObjectPart); grp = new SceneObjectGroup(sceneObjectPart);
} }

View File

@ -52,7 +52,7 @@ namespace OpenSim.Data.MSSQL
conn.Open(); conn.Open();
Migration m = new Migration(conn, GetType().Assembly, "UserStore"); Migration m = new Migration(conn, GetType().Assembly, "UserStore");
m.Update(); m.Update();
} }
} }
public List<UserAccountData> Query(UUID principalID, UUID scopeID, string query) public List<UserAccountData> Query(UUID principalID, UUID scopeID, string query)

View File

@ -1146,7 +1146,7 @@ ELSE
if (reader.IsDBNull(reader.GetOrdinal("homeRegionID"))) if (reader.IsDBNull(reader.GetOrdinal("homeRegionID")))
retval.HomeRegionID = UUID.Zero; retval.HomeRegionID = UUID.Zero;
else else
retval.HomeRegionID = new UUID((Guid)reader["homeRegionID"]); retval.HomeRegionID = new UUID((Guid)reader["homeRegionID"]);
retval.Created = Convert.ToInt32(reader["created"].ToString()); retval.Created = Convert.ToInt32(reader["created"].ToString());
retval.LastLogin = Convert.ToInt32(reader["lastLogin"].ToString()); retval.LastLogin = Convert.ToInt32(reader["lastLogin"].ToString());
@ -1200,7 +1200,7 @@ ELSE
if (reader.IsDBNull(reader.GetOrdinal("partner"))) if (reader.IsDBNull(reader.GetOrdinal("partner")))
retval.Partner = UUID.Zero; retval.Partner = UUID.Zero;
else else
retval.Partner = new UUID((Guid)reader["partner"]); retval.Partner = new UUID((Guid)reader["partner"]);
} }
else else
{ {

View File

@ -204,7 +204,7 @@ namespace OpenSim.Data.MySQL
"VALUES(?id, ?name, ?description, ?assetType, ?local, ?temporary, ?create_time, ?access_time, ?data)", "VALUES(?id, ?name, ?description, ?assetType, ?local, ?temporary, ?create_time, ?access_time, ?data)",
_dbConnection.Connection); _dbConnection.Connection);
string assetName = asset.Name; string assetName = asset.Name;
if (asset.Name.Length > 64) if (asset.Name.Length > 64)
{ {
assetName = asset.Name.Substring(0, 64); assetName = asset.Name.Substring(0, 64);

View File

@ -325,10 +325,10 @@ namespace OpenSim.Data.MySQL
UUID GroupID = UUID.Zero; UUID GroupID = UUID.Zero;
UUID.TryParse((string)reader["avatarID"], out Owner); UUID.TryParse((string)reader["avatarID"], out Owner);
UUID.TryParse((string)reader["groupID"], out GroupID); UUID.TryParse((string)reader["groupID"], out GroupID);
item.Owner = Owner; item.Owner = Owner;
item.GroupID = GroupID; item.GroupID = GroupID;
// Rest of the parsing. If these UUID's fail, we're dead anyway // Rest of the parsing. If these UUID's fail, we're dead anyway
item.ID = new UUID((string) reader["inventoryID"]); item.ID = new UUID((string) reader["inventoryID"]);
item.AssetID = new UUID((string) reader["assetID"]); item.AssetID = new UUID((string) reader["assetID"]);
item.AssetType = (int) reader["assetType"]; item.AssetType = (int) reader["assetType"];
@ -472,7 +472,7 @@ namespace OpenSim.Data.MySQL
+ ", ?inventoryBasePermissions, ?inventoryEveryOnePermissions, ?inventoryGroupPermissions, ?salePrice, ?saleType, ?creationDate" + ", ?inventoryBasePermissions, ?inventoryEveryOnePermissions, ?inventoryGroupPermissions, ?salePrice, ?saleType, ?creationDate"
+ ", ?groupID, ?groupOwned, ?flags)"; + ", ?groupID, ?groupOwned, ?flags)";
string itemName = item.Name; string itemName = item.Name;
if (item.Name.Length > 64) if (item.Name.Length > 64)
{ {
itemName = item.Name.Substring(0, 64); itemName = item.Name.Substring(0, 64);
@ -484,7 +484,7 @@ namespace OpenSim.Data.MySQL
{ {
itemDesc = item.Description.Substring(0, 128); itemDesc = item.Description.Substring(0, 128);
m_log.Warn("[INVENTORY DB]: Description field truncated from " + item.Description.Length + " to " + itemDesc.Length + " characters on add item"); m_log.Warn("[INVENTORY DB]: Description field truncated from " + item.Description.Length + " to " + itemDesc.Length + " characters on add item");
} }
try try
{ {
@ -590,12 +590,12 @@ namespace OpenSim.Data.MySQL
"REPLACE INTO inventoryfolders (folderID, agentID, parentFolderID, folderName, type, version) VALUES "; "REPLACE INTO inventoryfolders (folderID, agentID, parentFolderID, folderName, type, version) VALUES ";
sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName, ?type, ?version)"; sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName, ?type, ?version)";
string folderName = folder.Name; string folderName = folder.Name;
if (folderName.Length > 64) if (folderName.Length > 64)
{ {
folderName = folderName.Substring(0, 64); folderName = folderName.Substring(0, 64);
m_log.Warn("[INVENTORY DB]: Name field truncated from " + folder.Name.Length + " to " + folderName.Length + " characters on add folder"); m_log.Warn("[INVENTORY DB]: Name field truncated from " + folder.Name.Length + " to " + folderName.Length + " characters on add folder");
} }
database.CheckConnection(); database.CheckConnection();

View File

@ -464,7 +464,7 @@ namespace OpenSim.Data.MySQL
prim.Name, prim.UUID, prim.GroupPosition, groupID); prim.Name, prim.UUID, prim.GroupPosition, groupID);
prim.UUID = groupID; prim.UUID = groupID;
} }
grp = new SceneObjectGroup(prim); grp = new SceneObjectGroup(prim);
} }
@ -533,7 +533,7 @@ namespace OpenSim.Data.MySQL
/// <summary> /// <summary>
/// Load in a prim's persisted inventory. /// Load in a prim's persisted inventory.
/// </summary> /// </summary>
/// <param name="prim">The prim</param> /// <param name="prim">The prim</param>
private void LoadItems(SceneObjectPart prim) private void LoadItems(SceneObjectPart prim)
{ {
lock (m_Connection) lock (m_Connection)

View File

@ -632,7 +632,7 @@ namespace OpenSim.Data.MySQL
UUID zero = UUID.Zero; UUID zero = UUID.Zero;
if (user.ID == zero) if (user.ID == zero)
{ {
return; return;
} }
MySQLSuperManager dbm = GetLockedConnection("AddNewUserProfile"); MySQLSuperManager dbm = GetLockedConnection("AddNewUserProfile");
@ -666,7 +666,7 @@ namespace OpenSim.Data.MySQL
{ {
UUID zero = UUID.Zero; UUID zero = UUID.Zero;
if (agent.ProfileID == zero || agent.SessionID == zero) if (agent.ProfileID == zero || agent.SessionID == zero)
return; return;
MySQLSuperManager dbm = GetLockedConnection("AddNewUserAgent"); MySQLSuperManager dbm = GetLockedConnection("AddNewUserAgent");
try try

View File

@ -155,7 +155,7 @@ namespace OpenSim.Data.NHibernate
m_log.ErrorFormat("[NHIBERNATE] {0} of id {1} loading threw exception: " + e.ToString(), type.Name, id); m_log.ErrorFormat("[NHIBERNATE] {0} of id {1} loading threw exception: " + e.ToString(), type.Name, id);
} }
return obj; return obj;
} }
} }
/// <summary> /// <summary>

View File

@ -86,7 +86,7 @@ namespace OpenSim.Data.NHibernate
m_log.InfoFormat("[NHIBERNATE] GetUserByUUID: {0} ", uuid); m_log.InfoFormat("[NHIBERNATE] GetUserByUUID: {0} ", uuid);
user = (UserProfileData)manager.Get(typeof(UserProfileData), uuid); user = (UserProfileData)manager.Get(typeof(UserProfileData), uuid);
if (user != null) if (user != null)
{ {
UserAgentData agent = GetAgentByUUID(uuid); UserAgentData agent = GetAgentByUUID(uuid);
if (agent != null) if (agent != null)
@ -245,7 +245,7 @@ namespace OpenSim.Data.NHibernate
UserProfileData user=GetUserByUUID(agentID); UserProfileData user=GetUserByUUID(agentID);
user.WebLoginKey = webLoginKey; user.WebLoginKey = webLoginKey;
UpdateUserProfile(user); UpdateUserProfile(user);
return; return;
} }
public override void AddNewUserFriend(UUID ownerId, UUID friendId, uint perms) public override void AddNewUserFriend(UUID ownerId, UUID friendId, uint perms)
@ -258,7 +258,7 @@ namespace OpenSim.Data.NHibernate
{ {
manager.Insert(new UserFriend(UUID.Random(), friendId, ownerId, perms)); manager.Insert(new UserFriend(UUID.Random(), friendId, ownerId, perms));
} }
return; return;
} }
private bool FriendRelationExists(UUID ownerId, UUID friendId) private bool FriendRelationExists(UUID ownerId, UUID friendId)

View File

@ -137,7 +137,7 @@ namespace OpenSim.Data
public uint maturity; public uint maturity;
//Data Wrappers //Data Wrappers
public string RegionName public string RegionName
{ {
get { return regionName; } get { return regionName; }

View File

@ -496,7 +496,7 @@ namespace OpenSim.Data.SQLite
{ {
//m_log.DebugFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID); //m_log.DebugFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID);
DataTable dbItems = ds.Tables["primitems"]; DataTable dbItems = ds.Tables["primitems"];
String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); String sql = String.Format("primID = '{0}'", prim.UUID.ToString());
DataRow[] dbItemRows = dbItems.Select(sql); DataRow[] dbItemRows = dbItems.Select(sql);
IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>();

View File

@ -60,7 +60,7 @@ namespace OpenSim.Data.Tests
public UUID item2; public UUID item2;
public UUID item3; public UUID item3;
public static Random random; public static Random random;
public string itemname1 = "item1"; public string itemname1 = "item1";
@ -173,7 +173,7 @@ namespace OpenSim.Data.Tests
UUID tmp0 = UUID.Random(); UUID tmp0 = UUID.Random();
UUID tmp1 = UUID.Random(); UUID tmp1 = UUID.Random();
UUID tmp2 = UUID.Random(); UUID tmp2 = UUID.Random();
UUID tmp3 = UUID.Random(); UUID tmp3 = UUID.Random();
UUID newregion = UUID.Random(); UUID newregion = UUID.Random();
SceneObjectPart p1 = NewSOP("SoP 1",tmp1); SceneObjectPart p1 = NewSOP("SoP 1",tmp1);
SceneObjectPart p2 = NewSOP("SoP 2",tmp2); SceneObjectPart p2 = NewSOP("SoP 2",tmp2);
@ -224,7 +224,7 @@ namespace OpenSim.Data.Tests
random.NextBytes(partsys); random.NextBytes(partsys);
DateTime expires = new DateTime(2008, 12, 20); DateTime expires = new DateTime(2008, 12, 20);
DateTime rezzed = new DateTime(2009, 07, 15); DateTime rezzed = new DateTime(2009, 07, 15);
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next()); Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next()); Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next());
Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next()); Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next());
Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next()); Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next());
@ -261,7 +261,7 @@ namespace OpenSim.Data.Tests
sop.Shape = pbshap; sop.Shape = pbshap;
sop.GroupPosition = groupos; sop.GroupPosition = groupos;
sop.RotationOffset = rotoff; sop.RotationOffset = rotoff;
sop.CreatorID = creator; sop.CreatorID = creator;
sop.InventorySerial = iserial; sop.InventorySerial = iserial;
sop.TaskInventory = dic; sop.TaskInventory = dic;
sop.ObjectFlags = objf; sop.ObjectFlags = objf;
@ -306,7 +306,7 @@ namespace OpenSim.Data.Tests
Assert.That(expires,Is.EqualTo(sop.Expires), "Assert.That(expires,Is.EqualTo(sop.Expires))"); Assert.That(expires,Is.EqualTo(sop.Expires), "Assert.That(expires,Is.EqualTo(sop.Expires))");
Assert.That(rezzed,Is.EqualTo(sop.Rezzed), "Assert.That(rezzed,Is.EqualTo(sop.Rezzed))"); Assert.That(rezzed,Is.EqualTo(sop.Rezzed), "Assert.That(rezzed,Is.EqualTo(sop.Rezzed))");
Assert.That(offset,Is.EqualTo(sop.OffsetPosition), "Assert.That(offset,Is.EqualTo(sop.OffsetPosition))"); Assert.That(offset,Is.EqualTo(sop.OffsetPosition), "Assert.That(offset,Is.EqualTo(sop.OffsetPosition))");
Assert.That(velocity,Is.EqualTo(sop.Velocity), "Assert.That(velocity,Is.EqualTo(sop.Velocity))"); Assert.That(velocity,Is.EqualTo(sop.Velocity), "Assert.That(velocity,Is.EqualTo(sop.Velocity))");
Assert.That(angvelo,Is.EqualTo(sop.AngularVelocity), "Assert.That(angvelo,Is.EqualTo(sop.AngularVelocity))"); Assert.That(angvelo,Is.EqualTo(sop.AngularVelocity), "Assert.That(angvelo,Is.EqualTo(sop.AngularVelocity))");
Assert.That(accel,Is.EqualTo(sop.Acceleration), "Assert.That(accel,Is.EqualTo(sop.Acceleration))"); Assert.That(accel,Is.EqualTo(sop.Acceleration), "Assert.That(accel,Is.EqualTo(sop.Acceleration))");
Assert.That(description,Is.EqualTo(sop.Description), "Assert.That(description,Is.EqualTo(sop.Description))"); Assert.That(description,Is.EqualTo(sop.Description), "Assert.That(description,Is.EqualTo(sop.Description))");
@ -319,7 +319,7 @@ namespace OpenSim.Data.Tests
Assert.That(scale,Is.EqualTo(sop.Scale), "Assert.That(scale,Is.EqualTo(sop.Scale))"); Assert.That(scale,Is.EqualTo(sop.Scale), "Assert.That(scale,Is.EqualTo(sop.Scale))");
Assert.That(updatef,Is.EqualTo(sop.UpdateFlag), "Assert.That(updatef,Is.EqualTo(sop.UpdateFlag))"); Assert.That(updatef,Is.EqualTo(sop.UpdateFlag), "Assert.That(updatef,Is.EqualTo(sop.UpdateFlag))");
// This is necessary or object will not be inserted in DB // This is necessary or object will not be inserted in DB
sop.ObjectFlags = 0; sop.ObjectFlags = 0;
SceneObjectGroup sog = new SceneObjectGroup(sop); SceneObjectGroup sog = new SceneObjectGroup(sop);
@ -332,11 +332,11 @@ namespace OpenSim.Data.Tests
// Makes sure there are no double insertions: // Makes sure there are no double insertions:
db.StoreObject(sog,region3); db.StoreObject(sog,region3);
sogs = db.LoadObjects(region3); sogs = db.LoadObjects(region3);
Assert.That(sogs.Count, Is.EqualTo(1), "Assert.That(sogs.Count, Is.EqualTo(1))"); Assert.That(sogs.Count, Is.EqualTo(1), "Assert.That(sogs.Count, Is.EqualTo(1))");
// Tests if the parameters were inserted correctly // Tests if the parameters were inserted correctly
SceneObjectPart p = sogs[0].RootPart; SceneObjectPart p = sogs[0].RootPart;
Assert.That(regionh,Is.EqualTo(p.RegionHandle), "Assert.That(regionh,Is.EqualTo(p.RegionHandle))"); Assert.That(regionh,Is.EqualTo(p.RegionHandle), "Assert.That(regionh,Is.EqualTo(p.RegionHandle))");
//Assert.That(localid,Is.EqualTo(p.LocalId), "Assert.That(localid,Is.EqualTo(p.LocalId))"); //Assert.That(localid,Is.EqualTo(p.LocalId), "Assert.That(localid,Is.EqualTo(p.LocalId))");
Assert.That(groupos,Is.EqualTo(p.GroupPosition), "Assert.That(groupos,Is.EqualTo(p.GroupPosition))"); Assert.That(groupos,Is.EqualTo(p.GroupPosition), "Assert.That(groupos,Is.EqualTo(p.GroupPosition))");
@ -402,7 +402,7 @@ namespace OpenSim.Data.Tests
random.NextBytes(partsys); random.NextBytes(partsys);
DateTime expires = new DateTime(2010, 12, 20); DateTime expires = new DateTime(2010, 12, 20);
DateTime rezzed = new DateTime(2005, 07, 15); DateTime rezzed = new DateTime(2005, 07, 15);
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next()); Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next()); Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next());
Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next()); Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next());
Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next()); Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next());
@ -418,7 +418,7 @@ namespace OpenSim.Data.Tests
PrimitiveBaseShape pbshap = new PrimitiveBaseShape(); PrimitiveBaseShape pbshap = new PrimitiveBaseShape();
pbshap = PrimitiveBaseShape.Default; pbshap = PrimitiveBaseShape.Default;
Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next()); Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next());
byte updatef = (byte) random.Next(127); byte updatef = (byte) random.Next(127);
// Updates the region with new values // Updates the region with new values
SceneObjectGroup sog2 = FindSOG("Adam West", region3); SceneObjectGroup sog2 = FindSOG("Adam West", region3);
@ -427,7 +427,7 @@ namespace OpenSim.Data.Tests
sog2.RootPart.Shape = pbshap; sog2.RootPart.Shape = pbshap;
sog2.RootPart.GroupPosition = groupos; sog2.RootPart.GroupPosition = groupos;
sog2.RootPart.RotationOffset = rotoff; sog2.RootPart.RotationOffset = rotoff;
sog2.RootPart.CreatorID = creator; sog2.RootPart.CreatorID = creator;
sog2.RootPart.TaskInventory = dic; sog2.RootPart.TaskInventory = dic;
sog2.RootPart.Name = name; sog2.RootPart.Name = name;
sog2.RootPart.Material = material; sog2.RootPart.Material = material;
@ -492,12 +492,12 @@ namespace OpenSim.Data.Tests
{ {
UUID tmp = UUID.Random(); UUID tmp = UUID.Random();
SceneObjectPart sop = NewSOP(("Test SOP " + i.ToString()),tmp); SceneObjectPart sop = NewSOP(("Test SOP " + i.ToString()),tmp);
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next()); Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next()); Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next());
Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next()); Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next());
Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next()); Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 angvelo = new Vector3(random.Next(),random.Next(),random.Next()); Vector3 angvelo = new Vector3(random.Next(),random.Next(),random.Next());
Vector3 accel = new Vector3(random.Next(),random.Next(),random.Next()); Vector3 accel = new Vector3(random.Next(),random.Next(),random.Next());
sop.GroupPosition = groupos; sop.GroupPosition = groupos;
sop.RotationOffset = rotoff; sop.RotationOffset = rotoff;
@ -648,7 +648,7 @@ namespace OpenSim.Data.Tests
{ {
InventoryItemBase i = new InventoryItemBase(); InventoryItemBase i = new InventoryItemBase();
UUID id = UUID.Random(); UUID id = UUID.Random();
i.ID = id; i.ID = id;
UUID folder = UUID.Random(); UUID folder = UUID.Random();
i.Folder = folder; i.Folder = folder;
UUID owner = UUID.Random(); UUID owner = UUID.Random();
@ -666,13 +666,13 @@ namespace OpenSim.Data.Tests
i.NextPermissions = nextperm; i.NextPermissions = nextperm;
uint curperm = (uint) random.Next(); uint curperm = (uint) random.Next();
i.CurrentPermissions = curperm; i.CurrentPermissions = curperm;
uint baseperm = (uint) random.Next(); uint baseperm = (uint) random.Next();
i.BasePermissions = baseperm; i.BasePermissions = baseperm;
uint eoperm = (uint) random.Next(); uint eoperm = (uint) random.Next();
i.EveryOnePermissions = eoperm; i.EveryOnePermissions = eoperm;
int assettype = random.Next(); int assettype = random.Next();
i.AssetType = assettype; i.AssetType = assettype;
UUID groupid = UUID.Random(); UUID groupid = UUID.Random();
i.GroupID = groupid; i.GroupID = groupid;
bool groupown = true; bool groupown = true;
i.GroupOwned = groupown; i.GroupOwned = groupown;
@ -1010,7 +1010,7 @@ namespace OpenSim.Data.Tests
private SceneObjectPart NewSOP(string name, UUID uuid) private SceneObjectPart NewSOP(string name, UUID uuid)
{ {
SceneObjectPart sop = new SceneObjectPart(); SceneObjectPart sop = new SceneObjectPart();
sop.Name = name; sop.Name = name;
sop.Description = name; sop.Description = name;
sop.Text = RandomName(); sop.Text = RandomName();
@ -1042,12 +1042,12 @@ namespace OpenSim.Data.Tests
int size = random.Next(5,12); int size = random.Next(5,12);
char ch ; char ch ;
for (int i=0; i<size; i++) for (int i=0; i<size; i++)
{ {
ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ; ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ;
name.Append(ch); name.Append(ch);
} }
return name.ToString(); return name.ToString();
} }
// private InventoryFolderBase NewFolder(UUID id, UUID parent, UUID owner, string name) // private InventoryFolderBase NewFolder(UUID id, UUID parent, UUID owner, string name)
// { // {
// InventoryFolderBase f = new InventoryFolderBase(); // InventoryFolderBase f = new InventoryFolderBase();

View File

@ -152,7 +152,7 @@ namespace OpenSim.Data.Tests
u1.FirstName = "Ugly"; u1.FirstName = "Ugly";
db.UpdateUserProfile(u1); db.UpdateUserProfile(u1);
Assert.That("Ugly",Is.EqualTo(u1.FirstName), "Assert.That(\"Ugly\",Is.EqualTo(u1.FirstName))"); Assert.That("Ugly",Is.EqualTo(u1.FirstName), "Assert.That(\"Ugly\",Is.EqualTo(u1.FirstName))");
} }
[Test] [Test]
@ -174,7 +174,7 @@ namespace OpenSim.Data.Tests
db.AddNewUserProfile(u4); db.AddNewUserProfile(u4);
Assert.That(db.GetUserByUUID(zero),Is.Null); Assert.That(db.GetUserByUUID(zero),Is.Null);
Assert.That(db.GetUserByUUID(user4),Is.Null); Assert.That(db.GetUserByUUID(user4),Is.Null);
} }
[Test] [Test]
public void T015_UserPersistency() public void T015_UserPersistency()
@ -218,7 +218,7 @@ namespace OpenSim.Data.Tests
//HomeRegionX and HomeRegionY must only use 24 bits //HomeRegionX and HomeRegionY must only use 24 bits
homeregx = ((homeregx << 8) >> 8); homeregx = ((homeregx << 8) >> 8);
homeregy = ((homeregy << 8) >> 8); homeregy = ((homeregy << 8) >> 8);
u.ID = id; u.ID = id;
u.WebLoginKey = webloginkey; u.WebLoginKey = webloginkey;
@ -299,7 +299,7 @@ namespace OpenSim.Data.Tests
uint homeregx = (uint) random.Next(); uint homeregx = (uint) random.Next();
uint homeregy = (uint) random.Next(); uint homeregy = (uint) random.Next();
Vector3 homeloc = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5)); Vector3 homeloc = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5));
Vector3 homelookat = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5)); Vector3 homelookat = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5));
int created = random.Next(); int created = random.Next();
int lastlogin = random.Next(); int lastlogin = random.Next();
string userinvuri = RandomName(); string userinvuri = RandomName();
@ -359,7 +359,7 @@ namespace OpenSim.Data.Tests
Assert.That(email,Is.EqualTo(u1a.Email), "Assert.That(email,Is.EqualTo(u1a.Email))"); Assert.That(email,Is.EqualTo(u1a.Email), "Assert.That(email,Is.EqualTo(u1a.Email))");
Assert.That(passhash,Is.EqualTo(u1a.PasswordHash), "Assert.That(passhash,Is.EqualTo(u1a.PasswordHash))"); Assert.That(passhash,Is.EqualTo(u1a.PasswordHash), "Assert.That(passhash,Is.EqualTo(u1a.PasswordHash))");
Assert.That(passsalt,Is.EqualTo(u1a.PasswordSalt), "Assert.That(passsalt,Is.EqualTo(u1a.PasswordSalt))"); Assert.That(passsalt,Is.EqualTo(u1a.PasswordSalt), "Assert.That(passsalt,Is.EqualTo(u1a.PasswordSalt))");
Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))"); Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))");
Assert.That(homeregx,Is.EqualTo(u1a.HomeRegionX), "Assert.That(homeregx,Is.EqualTo(u1a.HomeRegionX))"); Assert.That(homeregx,Is.EqualTo(u1a.HomeRegionX), "Assert.That(homeregx,Is.EqualTo(u1a.HomeRegionX))");
Assert.That(homeregy,Is.EqualTo(u1a.HomeRegionY), "Assert.That(homeregy,Is.EqualTo(u1a.HomeRegionY))"); Assert.That(homeregy,Is.EqualTo(u1a.HomeRegionY), "Assert.That(homeregy,Is.EqualTo(u1a.HomeRegionY))");
Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))"); Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))");
@ -426,7 +426,7 @@ namespace OpenSim.Data.Tests
UserAgentData a2 = db.GetAgentByName(fname2,lname2); UserAgentData a2 = db.GetAgentByName(fname2,lname2);
UserAgentData a3 = db.GetAgentByName(name3); UserAgentData a3 = db.GetAgentByName(name3);
Assert.That(user2,Is.EqualTo(a2.ProfileID), "Assert.That(user2,Is.EqualTo(a2.ProfileID))"); Assert.That(user2,Is.EqualTo(a2.ProfileID), "Assert.That(user2,Is.EqualTo(a2.ProfileID))");
Assert.That(user3,Is.EqualTo(a3.ProfileID), "Assert.That(user3,Is.EqualTo(a3.ProfileID))"); Assert.That(user3,Is.EqualTo(a3.ProfileID), "Assert.That(user3,Is.EqualTo(a3.ProfileID))");
} }
[Test] [Test]
@ -501,11 +501,11 @@ namespace OpenSim.Data.Tests
db.AddNewUserFriend(user1,user3, 2); db.AddNewUserFriend(user1,user3, 2);
db.AddNewUserFriend(user1,user2, 4); db.AddNewUserFriend(user1,user2, 4);
List<FriendListItem> fl1 = db.GetUserFriendList(user1); List<FriendListItem> fl1 = db.GetUserFriendList(user1);
Assert.That(fl1.Count,Is.EqualTo(2), "Assert.That(fl1.Count,Is.EqualTo(2))"); Assert.That(fl1.Count,Is.EqualTo(2), "Assert.That(fl1.Count,Is.EqualTo(2))");
perms.Add(user2,1); perms.Add(user2,1);
perms.Add(user3,2); perms.Add(user3,2);
for (int i = 0; i < fl1.Count; i++) for (int i = 0; i < fl1.Count; i++)
{ {
Assert.That(user1,Is.EqualTo(fl1[i].FriendListOwner), "Assert.That(user1,Is.EqualTo(fl1[i].FriendListOwner))"); Assert.That(user1,Is.EqualTo(fl1[i].FriendListOwner), "Assert.That(user1,Is.EqualTo(fl1[i].FriendListOwner))");
friends.Add(fl1[i].Friend,1); friends.Add(fl1[i].Friend,1);
temp = perms[fl1[i].Friend]; temp = perms[fl1[i].Friend];
@ -544,7 +544,7 @@ namespace OpenSim.Data.Tests
db.UpdateUserFriendPerms(user1, user3, 4); db.UpdateUserFriendPerms(user1, user3, 4);
fl1 = db.GetUserFriendList(user1); fl1 = db.GetUserFriendList(user1);
Assert.That(fl1[0].FriendPerms,Is.EqualTo(4), "Assert.That(fl1[0].FriendPerms,Is.EqualTo(4))"); Assert.That(fl1[0].FriendPerms,Is.EqualTo(4), "Assert.That(fl1[0].FriendPerms,Is.EqualTo(4))");
} }
[Test] [Test]
@ -560,7 +560,7 @@ namespace OpenSim.Data.Tests
[Test] [Test]
public void T041_UserAppearancePersistency() public void T041_UserAppearancePersistency()
{ {
AvatarAppearance appear = new AvatarAppearance(); AvatarAppearance appear = new AvatarAppearance();
UUID owner = UUID.Random(); UUID owner = UUID.Random();
int serial = random.Next(); int serial = random.Next();
byte[] visualp = new byte[218]; byte[] visualp = new byte[218];
@ -698,7 +698,7 @@ namespace OpenSim.Data.Tests
int size = random.Next(5,12); int size = random.Next(5,12);
char ch ; char ch ;
for (int i=0; i<size; i++) for (int i=0; i<size; i++)
{ {
ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ; ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ;
name.Append(ch); name.Append(ch);
} }

View File

@ -43,7 +43,7 @@ namespace OpenSim.Data
public abstract UserAgentData GetAgentByUUID(UUID user); public abstract UserAgentData GetAgentByUUID(UUID user);
public abstract UserAgentData GetAgentByName(string name); public abstract UserAgentData GetAgentByName(string name);
public abstract UserAgentData GetAgentByName(string fname, string lname); public abstract UserAgentData GetAgentByName(string fname, string lname);
public UserProfileData GetUserByUri(Uri uri) { return null; } public UserProfileData GetUserByUri(Uri uri) { return null; }
public abstract void StoreWebLoginKey(UUID agentID, UUID webLoginKey); public abstract void StoreWebLoginKey(UUID agentID, UUID webLoginKey);
public abstract void AddNewUserProfile(UserProfileData user); public abstract void AddNewUserProfile(UserProfileData user);

View File

@ -59,7 +59,7 @@ namespace OpenSim.Framework
// Body // Body
defaultWearables[0].ItemID = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9"); defaultWearables[0].ItemID = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
defaultWearables[0].AssetID = new UUID("66c41e39-38f9-f75a-024e-585989bfab73"); defaultWearables[0].AssetID = new UUID("66c41e39-38f9-f75a-024e-585989bfab73");
// Skin // Skin
defaultWearables[1].ItemID = new UUID("77c41e39-38f9-f75a-024e-585989bfabc9"); defaultWearables[1].ItemID = new UUID("77c41e39-38f9-f75a-024e-585989bfabc9");

View File

@ -28,7 +28,7 @@
using OpenMetaverse; using OpenMetaverse;
namespace OpenSim.Framework.Capabilities namespace OpenSim.Framework.Capabilities
{ {
/// <summary> /// <summary>
/// Capabilities utility methods /// Capabilities utility methods
/// </summary> /// </summary>

View File

@ -57,7 +57,7 @@ namespace OpenSim.Framework.Client
// Porting Guide from old IM // Porting Guide from old IM
// SendIM(...) // SendIM(...)
// Loses FromAgentSession - this should be added by implementers manually. // Loses FromAgentSession - this should be added by implementers manually.
// //
public interface IClientIM public interface IClientIM
{ {

View File

@ -177,9 +177,9 @@ namespace OpenSim.Framework
} }
public void ViewerEffectHandler(IClientAPI sender, List<ViewerEffectEventHandlerArg> args) public void ViewerEffectHandler(IClientAPI sender, List<ViewerEffectEventHandlerArg> args)
{ {
// TODO: don't create new blocks if recycling an old packet // TODO: don't create new blocks if recycling an old packet
List<ViewerEffectPacket.EffectBlock> effectBlock = new List<ViewerEffectPacket.EffectBlock>(); List<ViewerEffectPacket.EffectBlock> effectBlock = new List<ViewerEffectPacket.EffectBlock>();
for (int i = 0; i < args.Count; i++) for (int i = 0; i < args.Count; i++)
{ {
ViewerEffectPacket.EffectBlock effect = new ViewerEffectPacket.EffectBlock(); ViewerEffectPacket.EffectBlock effect = new ViewerEffectPacket.EffectBlock();

View File

@ -70,7 +70,7 @@ namespace OpenSim.Framework
/// <summary> /// <summary>
/// How many operations between time checks. /// How many operations between time checks.
/// </summary> /// </summary>
private const int DefaultOperationsBetweenTimeChecks = 40; private const int DefaultOperationsBetweenTimeChecks = 40;
/// <summary> /// <summary>
@ -168,7 +168,7 @@ namespace OpenSim.Framework
private int m_version; private int m_version;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="CnmMemoryCache{TKey,TValue}"/> class. /// Initializes a new instance of the <see cref="CnmMemoryCache{TKey,TValue}"/> class.
/// </summary> /// </summary>
public CnmMemoryCache() public CnmMemoryCache()
: this(DefaultMaxSize) : this(DefaultMaxSize)
@ -277,7 +277,7 @@ namespace OpenSim.Framework
/// </param> /// </param>
protected virtual void AddToNewGeneration(int bucketIndex, TKey key, TValue value, long size) protected virtual void AddToNewGeneration(int bucketIndex, TKey key, TValue value, long size)
{ {
// Add to newest generation // Add to newest generation
if (!m_newGeneration.Set(bucketIndex, key, value, size)) if (!m_newGeneration.Set(bucketIndex, key, value, size))
{ {
// Failed to add new generation // Failed to add new generation
@ -311,7 +311,7 @@ namespace OpenSim.Framework
/// Bucket index is remainder when element key's hash value is divided by bucket count. /// Bucket index is remainder when element key's hash value is divided by bucket count.
/// </para> /// </para>
/// <para> /// <para>
/// For example: key's hash is 72, bucket count is 5, element's bucket index is 72 % 5 = 2. /// For example: key's hash is 72, bucket count is 5, element's bucket index is 72 % 5 = 2.
/// </para> /// </para>
/// </remarks> /// </remarks>
protected virtual int GetBucketIndex(TKey key) protected virtual int GetBucketIndex(TKey key)
@ -367,7 +367,7 @@ namespace OpenSim.Framework
/// </summary> /// </summary>
private void RecycleGenerations() private void RecycleGenerations()
{ {
// Rotate old generation to new generation, new generation to old generation // Rotate old generation to new generation, new generation to old generation
IGeneration temp = m_newGeneration; IGeneration temp = m_newGeneration;
m_newGeneration = m_oldGeneration; m_newGeneration = m_oldGeneration;
m_newGeneration.Clear(); m_newGeneration.Clear();
@ -522,7 +522,7 @@ namespace OpenSim.Framework
/// <summary> /// <summary>
/// Index of first element's in element chain. /// Index of first element's in element chain.
/// </summary> /// </summary>
/// <value> /// <value>
/// -1 if there is no element in bucket; otherwise first element's index in the element chain. /// -1 if there is no element in bucket; otherwise first element's index in the element chain.
/// </value> /// </value>
/// <remarks> /// <remarks>
@ -692,7 +692,7 @@ namespace OpenSim.Framework
/// </summary> /// </summary>
/// <value> /// <value>
/// 0 if element is free; otherwise larger than 0. /// 0 if element is free; otherwise larger than 0.
/// </value> /// </value>
public long Size; public long Size;
/// <summary> /// <summary>
@ -771,7 +771,7 @@ namespace OpenSim.Framework
/// </returns> /// </returns>
/// <exception cref="InvalidOperationException"> /// <exception cref="InvalidOperationException">
/// The enumerator has reach end of collection or <see cref="MoveNext"/> is not called. /// The enumerator has reach end of collection or <see cref="MoveNext"/> is not called.
/// </exception> /// </exception>
public KeyValuePair<TKey, TValue> Current public KeyValuePair<TKey, TValue> Current
{ {
get get
@ -1405,10 +1405,10 @@ namespace OpenSim.Framework
/// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
/// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
/// </para> /// </para>
/// </remarks> /// </remarks>
/// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/> /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/>
/// <seealso cref="ICnmCache{TKey,TValue}.Size"/> /// <seealso cref="ICnmCache{TKey,TValue}.Size"/>
/// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/> /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/>
/// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/> /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/>
/// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/> /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/>
public bool IsSizeLimited public bool IsSizeLimited
@ -1438,7 +1438,7 @@ namespace OpenSim.Framework
} }
/// <summary> /// <summary>
/// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time. /// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time.
/// </summary> /// </summary>
/// <value> /// <value>
/// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements; /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements;
@ -1449,7 +1449,7 @@ namespace OpenSim.Framework
/// or <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> methods in <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> , then element is automatically removed from /// or <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> methods in <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> , then element is automatically removed from
/// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may /// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may
/// stay longer in cache. /// stay longer in cache.
/// </remarks> /// </remarks>
/// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/> /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/>
/// <seealso cref="ICnmCache{TKey,TValue}.PurgeExpired"/> /// <seealso cref="ICnmCache{TKey,TValue}.PurgeExpired"/>
/// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/> /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/>
@ -1503,7 +1503,7 @@ namespace OpenSim.Framework
/// <seealso cref="ICnmCache{TKey,TValue}.Set"/> /// <seealso cref="ICnmCache{TKey,TValue}.Set"/>
/// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/> /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/>
/// <seealso cref="ICnmCache{TKey,TValue}.Size"/> /// <seealso cref="ICnmCache{TKey,TValue}.Size"/>
/// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/> /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/>
public long MaxElementSize public long MaxElementSize
{ {
get { return m_maxElementSize; } get { return m_maxElementSize; }
@ -1517,7 +1517,7 @@ namespace OpenSim.Framework
/// <value> /// <value>
/// Maximal allowed total size for elements stored to <see cref="ICnmCache{TKey,TValue}"/>. /// Maximal allowed total size for elements stored to <see cref="ICnmCache{TKey,TValue}"/>.
/// </value> /// </value>
/// <remarks> /// <remarks>
/// <para> /// <para>
/// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure. /// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure.
/// </para> /// </para>
@ -1562,10 +1562,10 @@ namespace OpenSim.Framework
/// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
/// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
/// </para> /// </para>
/// </remarks> /// </remarks>
/// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/> /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/>
/// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/> /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/>
/// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/> /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/>
/// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/> /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/>
/// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/> /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/>
public long Size public long Size
@ -1576,9 +1576,9 @@ namespace OpenSim.Framework
/// <summary> /// <summary>
/// Gets an object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>. /// Gets an object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>.
/// </summary> /// </summary>
/// <value> /// <value>
/// An object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>. /// An object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>.
/// </value> /// </value>
/// <remarks> /// <remarks>
/// <para> /// <para>
/// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/> /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/>
@ -1630,7 +1630,7 @@ namespace OpenSim.Framework
/// </para> /// </para>
/// <para> /// <para>
/// Depending on <see cref="ICnmCache{TKey,TValue}"/> implementation, some of expired elements /// Depending on <see cref="ICnmCache{TKey,TValue}"/> implementation, some of expired elements
/// may stay longer than <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> in the cache. /// may stay longer than <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> in the cache.
/// </para> /// </para>
/// </remarks> /// </remarks>
/// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/> /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/>
@ -1810,7 +1810,7 @@ namespace OpenSim.Framework
/// </summary> /// </summary>
/// <returns> /// <returns>
/// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with /// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with
/// the specified key; otherwise, <see langword="false"/>. /// the specified key; otherwise, <see langword="false"/>.
/// </returns> /// </returns>
/// <param name="key"> /// <param name="key">
/// The key whose <paramref name="value"/> to get. /// The key whose <paramref name="value"/> to get.

View File

@ -142,7 +142,7 @@ namespace OpenSim.Framework
/// </returns> /// </returns>
/// <exception cref="InvalidOperationException"> /// <exception cref="InvalidOperationException">
/// The enumerator has reach end of collection or <see cref="MoveNext"/> is not called. /// The enumerator has reach end of collection or <see cref="MoveNext"/> is not called.
/// </exception> /// </exception>
public KeyValuePair<TKey, TValue> Current public KeyValuePair<TKey, TValue> Current
{ {
get { return m_enumerator.Current; } get { return m_enumerator.Current; }
@ -327,10 +327,10 @@ namespace OpenSim.Framework
/// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
/// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
/// </para> /// </para>
/// </remarks> /// </remarks>
/// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/> /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/>
/// <seealso cref="ICnmCache{TKey,TValue}.Size"/> /// <seealso cref="ICnmCache{TKey,TValue}.Size"/>
/// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/> /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/>
/// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/> /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/>
/// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/> /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/>
public bool IsSizeLimited public bool IsSizeLimited
@ -366,7 +366,7 @@ namespace OpenSim.Framework
} }
/// <summary> /// <summary>
/// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time. /// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time.
/// </summary> /// </summary>
/// <value> /// <value>
/// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements; /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements;
@ -377,7 +377,7 @@ namespace OpenSim.Framework
/// or <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> methods in <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> , then element is automatically removed from /// or <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> methods in <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> , then element is automatically removed from
/// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may /// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may
/// stay longer in cache. /// stay longer in cache.
/// </remarks> /// </remarks>
/// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/> /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/>
/// <seealso cref="ICnmCache{TKey,TValue}.PurgeExpired"/> /// <seealso cref="ICnmCache{TKey,TValue}.PurgeExpired"/>
/// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/> /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/>
@ -440,7 +440,7 @@ namespace OpenSim.Framework
/// <seealso cref="ICnmCache{TKey,TValue}.Set"/> /// <seealso cref="ICnmCache{TKey,TValue}.Set"/>
/// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/> /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/>
/// <seealso cref="ICnmCache{TKey,TValue}.Size"/> /// <seealso cref="ICnmCache{TKey,TValue}.Size"/>
/// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/> /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/>
public long MaxElementSize public long MaxElementSize
{ {
get get
@ -458,7 +458,7 @@ namespace OpenSim.Framework
/// <value> /// <value>
/// Maximal allowed total size for elements stored to <see cref="ICnmCache{TKey,TValue}"/>. /// Maximal allowed total size for elements stored to <see cref="ICnmCache{TKey,TValue}"/>.
/// </value> /// </value>
/// <remarks> /// <remarks>
/// <para> /// <para>
/// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure. /// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure.
/// </para> /// </para>
@ -507,10 +507,10 @@ namespace OpenSim.Framework
/// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
/// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
/// </para> /// </para>
/// </remarks> /// </remarks>
/// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/> /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/>
/// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/> /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/>
/// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/> /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/>
/// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/> /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/>
/// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/> /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/>
public long Size public long Size
@ -527,9 +527,9 @@ namespace OpenSim.Framework
/// <summary> /// <summary>
/// Gets an object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>. /// Gets an object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>.
/// </summary> /// </summary>
/// <value> /// <value>
/// An object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>. /// An object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>.
/// </value> /// </value>
/// <remarks> /// <remarks>
/// <para> /// <para>
/// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/> /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/>
@ -584,7 +584,7 @@ namespace OpenSim.Framework
/// </para> /// </para>
/// <para> /// <para>
/// Depending on <see cref="ICnmCache{TKey,TValue}"/> implementation, some of expired elements /// Depending on <see cref="ICnmCache{TKey,TValue}"/> implementation, some of expired elements
/// may stay longer than <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> in the cache. /// may stay longer than <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> in the cache.
/// </para> /// </para>
/// </remarks> /// </remarks>
/// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/> /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/>
@ -704,7 +704,7 @@ namespace OpenSim.Framework
/// </summary> /// </summary>
/// <returns> /// <returns>
/// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with /// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with
/// the specified key; otherwise, <see langword="false"/>. /// the specified key; otherwise, <see langword="false"/>.
/// </returns> /// </returns>
/// <param name="key"> /// <param name="key">
/// The key whose <paramref name="value"/> to get. /// The key whose <paramref name="value"/> to get.

View File

@ -55,7 +55,7 @@ namespace OpenSim.Framework.Communications.Cache
/// Stores user profile and inventory data received from backend services for a particular user. /// Stores user profile and inventory data received from backend services for a particular user.
/// </summary> /// </summary>
public class CachedUserInfo public class CachedUserInfo
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
//// <value> //// <value>
@ -190,7 +190,7 @@ namespace OpenSim.Framework.Communications.Cache
resolvedFolders.Add(folder); resolvedFolders.Add(folder);
resolvedFolderDictionary[folder.ID] = folder; resolvedFolderDictionary[folder.ID] = folder;
parentFolder.AddChildFolder(folder); parentFolder.AddChildFolder(folder);
} }
} }
} // foreach (folder in pendingCategorizationFolders[parentFolder.ID]) } // foreach (folder in pendingCategorizationFolders[parentFolder.ID])
@ -219,7 +219,7 @@ namespace OpenSim.Framework.Communications.Cache
/// <summary> /// <summary>
/// Fetch inventory for this user. /// Fetch inventory for this user.
/// </summary> /// </summary>
/// This has to be executed as a separate step once user information is retreived. /// This has to be executed as a separate step once user information is retreived.
/// This will occur synchronously if the inventory service is in the same process as this class, and /// This will occur synchronously if the inventory service is in the same process as this class, and
/// asynchronously otherwise. /// asynchronously otherwise.
public void FetchInventory() public void FetchInventory()
@ -422,7 +422,7 @@ namespace OpenSim.Framework.Communications.Cache
/// ///
/// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE /// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE
/// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing, /// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing,
/// and needs to be changed. /// and needs to be changed.
/// ///
/// <param name="folderID"></param> /// <param name="folderID"></param>
/// <param name="type"></param> /// <param name="type"></param>
@ -500,7 +500,7 @@ namespace OpenSim.Framework.Communications.Cache
InventoryFolderImpl oldParentFolder = RootFolder.FindFolder(folder.ParentID); InventoryFolderImpl oldParentFolder = RootFolder.FindFolder(folder.ParentID);
if (oldParentFolder != null) if (oldParentFolder != null)
{ {
oldParentFolder.RemoveChildFolder(folderID); oldParentFolder.RemoveChildFolder(folderID);
parentFolder.AddChildFolder(folder); parentFolder.AddChildFolder(folder);
} }

View File

@ -60,7 +60,7 @@ namespace OpenSim.Framework.Communications.Cache
/// User profiles indexed by name /// User profiles indexed by name
/// </summary> /// </summary>
private readonly Dictionary<string, CachedUserInfo> m_userProfilesByName private readonly Dictionary<string, CachedUserInfo> m_userProfilesByName
= new Dictionary<string, CachedUserInfo>(); = new Dictionary<string, CachedUserInfo>();
/// <summary> /// <summary>
/// The root library folder. /// The root library folder.
@ -123,35 +123,35 @@ namespace OpenSim.Framework.Communications.Cache
/// <summary> /// <summary>
/// Get details of the given user. /// Get details of the given user.
/// </summary> /// </summary>
/// If the user isn't in cache then the user is requested from the profile service. /// If the user isn't in cache then the user is requested from the profile service.
/// <param name="userID"></param> /// <param name="userID"></param>
/// <returns>null if no user details are found</returns> /// <returns>null if no user details are found</returns>
public CachedUserInfo GetUserDetails(string fname, string lname) public CachedUserInfo GetUserDetails(string fname, string lname)
{ {
lock (m_userProfilesByName) lock (m_userProfilesByName)
{ {
CachedUserInfo userInfo; CachedUserInfo userInfo;
if (m_userProfilesByName.TryGetValue(string.Format(NAME_FORMAT, fname, lname), out userInfo)) if (m_userProfilesByName.TryGetValue(string.Format(NAME_FORMAT, fname, lname), out userInfo))
{ {
return userInfo; return userInfo;
} }
else else
{ {
UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(fname, lname); UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(fname, lname);
if (userProfile != null) if (userProfile != null)
return AddToCaches(userProfile); return AddToCaches(userProfile);
else else
return null; return null;
} }
} }
} }
/// <summary> /// <summary>
/// Get details of the given user. /// Get details of the given user.
/// </summary> /// </summary>
/// If the user isn't in cache then the user is requested from the profile service. /// If the user isn't in cache then the user is requested from the profile service.
/// <param name="userID"></param> /// <param name="userID"></param>
/// <returns>null if no user details are found</returns> /// <returns>null if no user details are found</returns>
public CachedUserInfo GetUserDetails(UUID userID) public CachedUserInfo GetUserDetails(UUID userID)
@ -185,20 +185,20 @@ namespace OpenSim.Framework.Communications.Cache
// probably by making sure that the update doesn't use the UserCacheInfo.UserProfile directly (possibly via // probably by making sure that the update doesn't use the UserCacheInfo.UserProfile directly (possibly via
// returning a read only class from the cache). // returning a read only class from the cache).
// public bool StoreProfile(UserProfileData userProfile) // public bool StoreProfile(UserProfileData userProfile)
// { // {
// lock (m_userProfilesById) // lock (m_userProfilesById)
// { // {
// CachedUserInfo userInfo = GetUserDetails(userProfile.ID); // CachedUserInfo userInfo = GetUserDetails(userProfile.ID);
// //
// if (userInfo != null) // if (userInfo != null)
// { // {
// userInfo.m_userProfile = userProfile; // userInfo.m_userProfile = userProfile;
// m_commsManager.UserService.UpdateUserProfile(userProfile); // m_commsManager.UserService.UpdateUserProfile(userProfile);
// //
// return true; // return true;
// } // }
// } // }
// //
// return false; // return false;
// } // }
@ -220,7 +220,7 @@ namespace OpenSim.Framework.Communications.Cache
} }
} }
return createdUserInfo; return createdUserInfo;
} }
/// <summary> /// <summary>
@ -234,7 +234,7 @@ namespace OpenSim.Framework.Communications.Cache
{ {
if (m_userProfilesById.ContainsKey(userId)) if (m_userProfilesById.ContainsKey(userId))
{ {
CachedUserInfo userInfo = m_userProfilesById[userId]; CachedUserInfo userInfo = m_userProfilesById[userId];
m_userProfilesById.Remove(userId); m_userProfilesById.Remove(userId);
lock (m_userProfilesByName) lock (m_userProfilesByName)
@ -244,7 +244,7 @@ namespace OpenSim.Framework.Communications.Cache
return true; return true;
} }
} }
return false; return false;
} }

View File

@ -90,8 +90,8 @@ namespace OpenSim.Framework.Communications
public IUserAdminService UserAdminService public IUserAdminService UserAdminService
{ {
get { return m_userAdminService; } get { return m_userAdminService; }
} }
protected IUserAdminService m_userAdminService; protected IUserAdminService m_userAdminService;
/// <summary> /// <summary>
/// Constructor /// Constructor

View File

@ -42,7 +42,7 @@ namespace OpenSim.Framework.Communications
/// Update avatar appearance information /// Update avatar appearance information
/// </summary> /// </summary>
/// <param name="user"></param> /// <param name="user"></param>
/// <param name="appearance"></param> /// <param name="appearance"></param>
void UpdateUserAppearance(UUID user, AvatarAppearance appearance); void UpdateUserAppearance(UUID user, AvatarAppearance appearance);
} }
} }

View File

@ -66,6 +66,6 @@ namespace OpenSim.Framework.Communications
/// <param name="lastName"></param> /// <param name="lastName"></param>
/// <param name="newPassword"></param> /// <param name="newPassword"></param>
/// <returns>true if the update was successful, false otherwise</returns> /// <returns>true if the update was successful, false otherwise</returns>
bool ResetUserPassword(string firstName, string lastName, string newPassword); bool ResetUserPassword(string firstName, string lastName, string newPassword);
} }
} }

View File

@ -98,7 +98,7 @@ namespace OpenSim.Framework.Communications
/// <param name="friendlistowner">The agent that who's friends list is being updated</param> /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
/// <param name="friend">The agent that is getting or loosing permissions</param> /// <param name="friend">The agent that is getting or loosing permissions</param>
/// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param> /// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param>
void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms); void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms);
/// <summary> /// <summary>
/// Logs off a user on the user server /// Logs off a user on the user server
@ -128,9 +128,9 @@ namespace OpenSim.Framework.Communications
/// ///
/// <param name="friendlistowner">The agent for whom we're retreiving the friends Data.</param> /// <param name="friendlistowner">The agent for whom we're retreiving the friends Data.</param>
/// <returns> /// <returns>
/// A List of FriendListItems that contains info about the user's friends. /// A List of FriendListItems that contains info about the user's friends.
/// Always returns a list even if the user has no friends /// Always returns a list even if the user has no friends
/// </returns> /// </returns>
List<FriendListItem> GetUserFriendList(UUID friendlistowner); List<FriendListItem> GetUserFriendList(UUID friendlistowner);
// This probably shouldn't be here, it belongs to IAuthentication // This probably shouldn't be here, it belongs to IAuthentication
@ -149,7 +149,7 @@ namespace OpenSim.Framework.Communications
/// <param name="userID"></param> /// <param name="userID"></param>
/// <param name="password"></param> /// <param name="password"></param>
/// <returns></returns> /// <returns></returns>
bool AuthenticateUserByPassword(UUID userID, string password); bool AuthenticateUserByPassword(UUID userID, string password);
// Temporary Hack until we move everything to the new service model // Temporary Hack until we move everything to the new service model
void SetInventoryService(IInventoryService invService); void SetInventoryService(IInventoryService invService);

View File

@ -47,7 +47,7 @@ namespace OpenSim.Framework.Communications.Osp
public string Name { get { return "OspInventoryWrapperPlugin"; } } public string Name { get { return "OspInventoryWrapperPlugin"; } }
public string Version { get { return "0.1"; } } public string Version { get { return "0.1"; } }
public void Initialise() {} public void Initialise() {}
public void Initialise(string connect) {} public void Initialise(string connect) {}
public void Dispose() {} public void Dispose() {}
@ -80,9 +80,9 @@ namespace OpenSim.Framework.Communications.Osp
} }
protected InventoryItemBase PostProcessItem(InventoryItemBase item) protected InventoryItemBase PostProcessItem(InventoryItemBase item)
{ {
item.CreatorIdAsUuid = OspResolver.ResolveOspa(item.CreatorId, m_commsManager); item.CreatorIdAsUuid = OspResolver.ResolveOspa(item.CreatorId, m_commsManager);
return item; return item;
} }
public List<InventoryFolderBase> getFolderHierarchy(UUID parentID) { return m_wrappedPlugin.getFolderHierarchy(parentID); } public List<InventoryFolderBase> getFolderHierarchy(UUID parentID) { return m_wrappedPlugin.getFolderHierarchy(parentID); }

View File

@ -33,13 +33,13 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
namespace OpenSim.Framework.Communications.Osp namespace OpenSim.Framework.Communications.Osp
{ {
/// <summary> /// <summary>
/// Resolves OpenSim Profile Anchors (OSPA). An OSPA is a string used to provide information for /// Resolves OpenSim Profile Anchors (OSPA). An OSPA is a string used to provide information for
/// identifying user profiles or supplying a simple name if no profile is available. /// identifying user profiles or supplying a simple name if no profile is available.
/// </summary> /// </summary>
public class OspResolver public class OspResolver
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public const string OSPA_PREFIX = "ospa:"; public const string OSPA_PREFIX = "ospa:";
@ -73,7 +73,7 @@ namespace OpenSim.Framework.Communications.Osp
{ {
return return
OSPA_PREFIX + OSPA_NAME_KEY + OSPA_PAIR_SEPARATOR + firstName + OSPA_NAME_VALUE_SEPARATOR + lastName; OSPA_PREFIX + OSPA_NAME_KEY + OSPA_PAIR_SEPARATOR + firstName + OSPA_NAME_VALUE_SEPARATOR + lastName;
} }
/// <summary> /// <summary>
/// Resolve an osp string into the most suitable internal OpenSim identifier. /// Resolve an osp string into the most suitable internal OpenSim identifier.
@ -89,13 +89,13 @@ namespace OpenSim.Framework.Communications.Osp
/// is returned. /// is returned.
/// </returns> /// </returns>
public static UUID ResolveOspa(string ospa, CommunicationsManager commsManager) public static UUID ResolveOspa(string ospa, CommunicationsManager commsManager)
{ {
if (!ospa.StartsWith(OSPA_PREFIX)) if (!ospa.StartsWith(OSPA_PREFIX))
return UUID.Zero; return UUID.Zero;
m_log.DebugFormat("[OSP RESOLVER]: Resolving {0}", ospa); m_log.DebugFormat("[OSP RESOLVER]: Resolving {0}", ospa);
string ospaMeat = ospa.Substring(OSPA_PREFIX.Length); string ospaMeat = ospa.Substring(OSPA_PREFIX.Length);
string[] ospaTuples = ospaMeat.Split(OSPA_TUPLE_SEPARATOR_ARRAY); string[] ospaTuples = ospaMeat.Split(OSPA_TUPLE_SEPARATOR_ARRAY);
foreach (string tuple in ospaTuples) foreach (string tuple in ospaTuples)
@ -162,7 +162,7 @@ namespace OpenSim.Framework.Communications.Osp
tempUserProfile.ID = HashName(tempUserProfile.Name); tempUserProfile.ID = HashName(tempUserProfile.Name);
m_log.DebugFormat( m_log.DebugFormat(
"[OSP RESOLVER]: Adding temporary user profile for {0} {1}", tempUserProfile.Name, tempUserProfile.ID); "[OSP RESOLVER]: Adding temporary user profile for {0} {1}", tempUserProfile.Name, tempUserProfile.ID);
commsManager.UserService.AddTemporaryUserProfile(tempUserProfile); commsManager.UserService.AddTemporaryUserProfile(tempUserProfile);
return tempUserProfile.ID; return tempUserProfile.ID;

View File

@ -1072,7 +1072,7 @@ namespace OpenSim.Framework.Communications.Services
/// <param name="user"></param> /// <param name="user"></param>
/// <param name="response"></param> /// <param name="response"></param>
/// <param name="remoteClient"></param> /// <param name="remoteClient"></param>
/// <returns>true if the region was successfully contacted, false otherwise</returns> /// <returns>true if the region was successfully contacted, false otherwise</returns>
protected abstract bool PrepareLoginToRegion( protected abstract bool PrepareLoginToRegion(
RegionInfo regionInfo, UserProfileData user, LoginResponse response, IPEndPoint client); RegionInfo regionInfo, UserProfileData user, LoginResponse response, IPEndPoint client);

View File

@ -33,9 +33,9 @@ using OpenMetaverse;
using OpenSim.Data; using OpenSim.Data;
namespace OpenSim.Framework.Communications namespace OpenSim.Framework.Communications
{ {
/// <summary> /// <summary>
/// Plugin for managing temporary user profiles. /// Plugin for managing temporary user profiles.
/// </summary> /// </summary>
public class TemporaryUserProfilePlugin : IUserDataPlugin public class TemporaryUserProfilePlugin : IUserDataPlugin
{ {
@ -45,7 +45,7 @@ namespace OpenSim.Framework.Communications
public string Name { get { return "TemporaryUserProfilePlugin"; } } public string Name { get { return "TemporaryUserProfilePlugin"; } }
public string Version { get { return "0.1"; } } public string Version { get { return "0.1"; } }
public void Initialise() {} public void Initialise() {}
public void Initialise(string connect) {} public void Initialise(string connect) {}
public void Dispose() {} public void Dispose() {}

View File

@ -152,8 +152,8 @@ namespace OpenSim.Framework.Communications.Tests
public virtual bool AuthenticateUserByPassword(UUID userID, string password) public virtual bool AuthenticateUserByPassword(UUID userID, string password)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
} }
} }
} }

View File

@ -133,7 +133,7 @@ namespace OpenSim.Framework.Communications.Tests
timedOut = true; timedOut = true;
lock (this) lock (this)
{ {
UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived); UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000); Monitor.Wait(this, 60000);
} }
@ -150,7 +150,7 @@ namespace OpenSim.Framework.Communications.Tests
CachedUserInfo userInfo; CachedUserInfo userInfo;
lock (this) lock (this)
{ {
userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived); userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000); Monitor.Wait(this, 60000);
} }
@ -171,7 +171,7 @@ namespace OpenSim.Framework.Communications.Tests
CachedUserInfo userInfo; CachedUserInfo userInfo;
lock (this) lock (this)
{ {
userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived); userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000); Monitor.Wait(this, 60000);
} }
@ -206,7 +206,7 @@ namespace OpenSim.Framework.Communications.Tests
CachedUserInfo userInfo; CachedUserInfo userInfo;
lock (this) lock (this)
{ {
userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived); userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000); Monitor.Wait(this, 60000);
} }
@ -271,7 +271,7 @@ namespace OpenSim.Framework.Communications.Tests
CachedUserInfo userInfo; CachedUserInfo userInfo;
lock (this) lock (this)
{ {
userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived); userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000); Monitor.Wait(this, 60000);
} }
@ -311,7 +311,7 @@ namespace OpenSim.Framework.Communications.Tests
CachedUserInfo userInfo; CachedUserInfo userInfo;
lock (this) lock (this)
{ {
userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived); userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000); Monitor.Wait(this, 60000);
} }

View File

@ -318,7 +318,7 @@ namespace OpenSim.Framework.Communications.Tests
{ {
TestHelper.InMethod(); TestHelper.InMethod();
//Console.WriteLine("Starting T023_TestAuthenticatedLoginAlreadyLoggedIn()"); //Console.WriteLine("Starting T023_TestAuthenticatedLoginAlreadyLoggedIn()");
//log4net.Config.XmlConfigurator.Configure(); //log4net.Config.XmlConfigurator.Configure();
string error_already_logged = "You appear to be already logged in. " + string error_already_logged = "You appear to be already logged in. " +

View File

@ -94,9 +94,9 @@ namespace OpenSim.Framework.Communications
public void AddPlugin(string provider, string connect) public void AddPlugin(string provider, string connect)
{ {
m_plugins.AddRange(DataPluginFactory.LoadDataPlugins<IUserDataPlugin>(provider, connect)); m_plugins.AddRange(DataPluginFactory.LoadDataPlugins<IUserDataPlugin>(provider, connect));
} }
#region UserProfile #region UserProfile
public virtual void AddTemporaryUserProfile(UserProfileData userProfile) public virtual void AddTemporaryUserProfile(UserProfileData userProfile)
{ {
@ -924,8 +924,8 @@ namespace OpenSim.Framework.Communications
if (md5PasswordHash == userProfile.PasswordHash) if (md5PasswordHash == userProfile.PasswordHash)
return true; return true;
else else
return false; return false;
} }
#endregion #endregion
} }

View File

@ -88,7 +88,7 @@ namespace OpenSim.Framework.Console
/// <param name="helpParts">Parsed parts of the help string. If empty then general help is returned.</param> /// <param name="helpParts">Parsed parts of the help string. If empty then general help is returned.</param>
/// <returns></returns> /// <returns></returns>
public List<string> GetHelp(string[] cmd) public List<string> GetHelp(string[] cmd)
{ {
List<string> help = new List<string>(); List<string> help = new List<string>();
List<string> helpParts = new List<string>(cmd); List<string> helpParts = new List<string>(cmd);
@ -115,7 +115,7 @@ namespace OpenSim.Framework.Console
/// <param name="helpParts"></param> /// <param name="helpParts"></param>
/// <returns></returns> /// <returns></returns>
private List<string> CollectHelp(List<string> helpParts) private List<string> CollectHelp(List<string> helpParts)
{ {
string originalHelpRequest = string.Join(" ", helpParts.ToArray()); string originalHelpRequest = string.Join(" ", helpParts.ToArray());
List<string> help = new List<string>(); List<string> help = new List<string>();
@ -132,7 +132,7 @@ namespace OpenSim.Framework.Console
if (dict[helpPart] is Dictionary<string, Object>) if (dict[helpPart] is Dictionary<string, Object>)
dict = (Dictionary<string, object>)dict[helpPart]; dict = (Dictionary<string, object>)dict[helpPart];
helpParts.RemoveAt(0); helpParts.RemoveAt(0);
} }
// There was a command for the given help string // There was a command for the given help string
@ -149,7 +149,7 @@ namespace OpenSim.Framework.Console
} }
return help; return help;
} }
private List<string> CollectHelp(Dictionary<string, object> dict) private List<string> CollectHelp(Dictionary<string, object> dict)
{ {
@ -180,7 +180,7 @@ namespace OpenSim.Framework.Console
/// <param name="longhelp"></param> /// <param name="longhelp"></param>
/// <param name="fn"></param> /// <param name="fn"></param>
public void AddCommand(string module, bool shared, string command, public void AddCommand(string module, bool shared, string command,
string help, string longhelp, CommandDelegate fn) string help, string longhelp, CommandDelegate fn)
{ {
AddCommand(module, shared, command, help, longhelp, AddCommand(module, shared, command, help, longhelp,
String.Empty, fn); String.Empty, fn);

View File

@ -90,13 +90,13 @@ namespace OpenSim.Framework
m_configMember.addConfigurationOption("allow_forceful_banlines", m_configMember.addConfigurationOption("allow_forceful_banlines",
ConfigurationOption.ConfigurationTypes.TYPE_STRING, ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Allow Forceful Banlines", "TRUE", true); "Allow Forceful Banlines", "TRUE", true);
m_configMember.addConfigurationOption("allow_region_registration", m_configMember.addConfigurationOption("allow_region_registration",
ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
"Allow regions to register immediately upon grid server startup? true/false", "Allow regions to register immediately upon grid server startup? true/false",
"True", "True",
false); false);
m_configMember.addConfigurationOption("console_user", ConfigurationOption.ConfigurationTypes.TYPE_STRING, m_configMember.addConfigurationOption("console_user", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Remote console access user name [Default: disabled]", "", false); "Remote console access user name [Default: disabled]", "", false);
@ -147,7 +147,7 @@ namespace OpenSim.Framework
break; break;
case "allow_region_registration": case "allow_region_registration":
AllowRegionRegistration = (bool)configuration_result; AllowRegionRegistration = (bool)configuration_result;
break; break;
case "console_user": case "console_user":
ConsoleUser = (string)configuration_result; ConsoleUser = (string)configuration_result;
break; break;

View File

@ -34,23 +34,23 @@ namespace OpenSim.Framework
/// <summary> /// <summary>
/// Interface to the local asset cache. This is the mechanism through which assets can be added and requested. /// Interface to the local asset cache. This is the mechanism through which assets can be added and requested.
/// </summary> /// </summary>
public interface IAssetCache : IPlugin public interface IAssetCache : IPlugin
{ {
/// <value> /// <value>
/// The 'server' from which assets can be requested and to which assets are persisted. /// The 'server' from which assets can be requested and to which assets are persisted.
/// </value> /// </value>
void Initialise(ConfigSettings cs); void Initialise(ConfigSettings cs);
/// <summary> /// <summary>
/// Report statistical data to the log. /// Report statistical data to the log.
/// </summary> /// </summary>
void ShowState(); void ShowState();
/// <summary> /// <summary>
/// Clear the asset cache. /// Clear the asset cache.
/// </summary> /// </summary>
void Clear(); void Clear();
/// <summary> /// <summary>
@ -58,7 +58,7 @@ namespace OpenSim.Framework
/// </summary> /// </summary>
/// <param name="assetId"></param> /// <param name="assetId"></param>
/// <param name="asset"></param> /// <param name="asset"></param>
/// <returns>true if the asset was in the cache, false if it was not</returns> /// <returns>true if the asset was in the cache, false if it was not</returns>
bool TryGetCachedAsset(UUID assetID, out AssetBase asset); bool TryGetCachedAsset(UUID assetID, out AssetBase asset);
/// <summary> /// <summary>
@ -69,7 +69,7 @@ namespace OpenSim.Framework
/// <param name="isTexture"></param> /// <param name="isTexture"></param>
/// A callback invoked when the asset has either been found or not found. /// A callback invoked when the asset has either been found or not found.
/// If the asset was found this is called with the asset UUID and the asset data /// If the asset was found this is called with the asset UUID and the asset data
/// If the asset was not found this is still called with the asset UUID but with a null asset data reference</param> /// If the asset was not found this is still called with the asset UUID but with a null asset data reference</param>
void GetAsset(UUID assetID, AssetRequestCallback callback, bool isTexture); void GetAsset(UUID assetID, AssetRequestCallback callback, bool isTexture);
/// <summary> /// <summary>
@ -84,13 +84,13 @@ namespace OpenSim.Framework
/// ///
/// <param name="assetID"></param> /// <param name="assetID"></param>
/// <param name="isTexture"></param> /// <param name="isTexture"></param>
/// <returns>null if the asset could not be retrieved</returns> /// <returns>null if the asset could not be retrieved</returns>
AssetBase GetAsset(UUID assetID, bool isTexture); AssetBase GetAsset(UUID assetID, bool isTexture);
/// <summary> /// <summary>
/// Add an asset to both the persistent store and the cache. /// Add an asset to both the persistent store and the cache.
/// </summary> /// </summary>
/// <param name="asset"></param> /// <param name="asset"></param>
void AddAsset(AssetBase asset); void AddAsset(AssetBase asset);
/// <summary> /// <summary>
@ -100,14 +100,14 @@ namespace OpenSim.Framework
/// of the asset cache. This is needed because the osdynamic /// of the asset cache. This is needed because the osdynamic
/// texture code grows the asset cache without bounds. The /// texture code grows the asset cache without bounds. The
/// real solution here is a much better cache archicture, but /// real solution here is a much better cache archicture, but
/// this is a stop gap measure until we have such a thing. /// this is a stop gap measure until we have such a thing.
void ExpireAsset(UUID assetID); void ExpireAsset(UUID assetID);
/// <summary> /// <summary>
/// Handle an asset request from the client. The result will be sent back asynchronously. /// Handle an asset request from the client. The result will be sent back asynchronously.
/// </summary> /// </summary>
/// <param name="userInfo"></param> /// <param name="userInfo"></param>
/// <param name="transferRequest"></param> /// <param name="transferRequest"></param>
void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest); void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest);
} }

View File

@ -810,7 +810,7 @@ namespace OpenSim.Framework
/// </summary> /// </summary>
void Start(); void Start();
void Stop(); void Stop();
// void ActivateGesture(UUID assetId, UUID gestureId); // void ActivateGesture(UUID assetId, UUID gestureId);
@ -824,7 +824,7 @@ namespace OpenSim.Framework
/// </summary> /// </summary>
/// <param name="agentID">The id of the agent associated with the appearance</param> /// <param name="agentID">The id of the agent associated with the appearance</param>
/// <param name="visualParams"></param> /// <param name="visualParams"></param>
/// <param name="textureEntry"></param> /// <param name="textureEntry"></param>
void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry); void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry);
void SendStartPingCheck(byte seq); void SendStartPingCheck(byte seq);
@ -833,7 +833,7 @@ namespace OpenSim.Framework
/// Tell the client that an object has been deleted /// Tell the client that an object has been deleted
/// </summary> /// </summary>
/// <param name="regionHandle"></param> /// <param name="regionHandle"></param>
/// <param name="localID"></param> /// <param name="localID"></param>
void SendKillObject(ulong regionHandle, uint localID); void SendKillObject(ulong regionHandle, uint localID);
void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs); void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs);

View File

@ -180,16 +180,16 @@ namespace OpenSim.Framework
/// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
/// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
/// </para> /// </para>
/// </remarks> /// </remarks>
/// <seealso cref="MaxElementSize"/> /// <seealso cref="MaxElementSize"/>
/// <seealso cref="Size"/> /// <seealso cref="Size"/>
/// <seealso cref="MaxSize"/> /// <seealso cref="MaxSize"/>
/// <seealso cref="IsCountLimited"/> /// <seealso cref="IsCountLimited"/>
/// <seealso cref="IsTimeLimited"/> /// <seealso cref="IsTimeLimited"/>
bool IsSizeLimited { get; } bool IsSizeLimited { get; }
/// <summary> /// <summary>
/// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time. /// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time.
/// </summary> /// </summary>
/// <value> /// <value>
/// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements; /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements;
@ -200,7 +200,7 @@ namespace OpenSim.Framework
/// or <see cref="TryGetValue"/> methods in <see cref="ExpirationTime"/> , then element is automatically removed from /// or <see cref="TryGetValue"/> methods in <see cref="ExpirationTime"/> , then element is automatically removed from
/// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may /// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may
/// stay longer in cache. /// stay longer in cache.
/// </remarks> /// </remarks>
/// <seealso cref="ExpirationTime"/> /// <seealso cref="ExpirationTime"/>
/// <seealso cref="PurgeExpired"/> /// <seealso cref="PurgeExpired"/>
/// <seealso cref="IsCountLimited"/> /// <seealso cref="IsCountLimited"/>
@ -237,7 +237,7 @@ namespace OpenSim.Framework
/// <seealso cref="Set"/> /// <seealso cref="Set"/>
/// <seealso cref="IsSizeLimited"/> /// <seealso cref="IsSizeLimited"/>
/// <seealso cref="Size"/> /// <seealso cref="Size"/>
/// <seealso cref="MaxSize"/> /// <seealso cref="MaxSize"/>
long MaxElementSize { get; } long MaxElementSize { get; }
/// <summary> /// <summary>
@ -246,7 +246,7 @@ namespace OpenSim.Framework
/// <value> /// <value>
/// Maximal allowed total size for elements stored to <see cref="ICnmCache{TKey,TValue}"/>. /// Maximal allowed total size for elements stored to <see cref="ICnmCache{TKey,TValue}"/>.
/// </value> /// </value>
/// <remarks> /// <remarks>
/// <para> /// <para>
/// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure. /// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure.
/// </para> /// </para>
@ -278,10 +278,10 @@ namespace OpenSim.Framework
/// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
/// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
/// </para> /// </para>
/// </remarks> /// </remarks>
/// <seealso cref="MaxElementSize"/> /// <seealso cref="MaxElementSize"/>
/// <seealso cref="IsSizeLimited"/> /// <seealso cref="IsSizeLimited"/>
/// <seealso cref="MaxSize"/> /// <seealso cref="MaxSize"/>
/// <seealso cref="IsCountLimited"/> /// <seealso cref="IsCountLimited"/>
/// <seealso cref="ExpirationTime"/> /// <seealso cref="ExpirationTime"/>
long Size { get; } long Size { get; }
@ -289,9 +289,9 @@ namespace OpenSim.Framework
/// <summary> /// <summary>
/// Gets an object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>. /// Gets an object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>.
/// </summary> /// </summary>
/// <value> /// <value>
/// An object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>. /// An object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>.
/// </value> /// </value>
/// <remarks> /// <remarks>
/// <para> /// <para>
/// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/> /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/>
@ -322,7 +322,7 @@ namespace OpenSim.Framework
/// </para> /// </para>
/// <para> /// <para>
/// Depending on <see cref="ICnmCache{TKey,TValue}"/> implementation, some of expired elements /// Depending on <see cref="ICnmCache{TKey,TValue}"/> implementation, some of expired elements
/// may stay longer than <see cref="ExpirationTime"/> in the cache. /// may stay longer than <see cref="ExpirationTime"/> in the cache.
/// </para> /// </para>
/// </remarks> /// </remarks>
/// <seealso cref="IsTimeLimited"/> /// <seealso cref="IsTimeLimited"/>
@ -418,7 +418,7 @@ namespace OpenSim.Framework
/// </summary> /// </summary>
/// <returns> /// <returns>
/// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with /// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with
/// the specified key; otherwise, <see langword="false"/>. /// the specified key; otherwise, <see langword="false"/>.
/// </returns> /// </returns>
/// <param name="key"> /// <param name="key">
/// The key whose <paramref name="value"/> to get. /// The key whose <paramref name="value"/> to get.

View File

@ -55,7 +55,7 @@ namespace OpenSim.Framework
GodTakeCopy = 5, GodTakeCopy = 5,
Delete = 6, Delete = 6,
Return = 9 Return = 9
}; };
public interface IScene public interface IScene
{ {

View File

@ -32,7 +32,7 @@ namespace OpenSim.Framework
{ {
public interface ISceneObject public interface ISceneObject
{ {
UUID UUID { get; } UUID UUID { get; }
ISceneObject CloneForNewScene(); ISceneObject CloneForNewScene();
string ToXml2(); string ToXml2();
string ExtraToXmlString(); string ExtraToXmlString();

View File

@ -89,7 +89,7 @@ namespace OpenSim.Framework
ID = id; ID = id;
Name = name; Name = name;
Owner = owner; Owner = owner;
ParentID = parent; ParentID = parent;
} }
public InventoryFolderBase(UUID id, string name, UUID owner, short type, UUID parent, ushort version) public InventoryFolderBase(UUID id, string name, UUID owner, short type, UUID parent, ushort version)

View File

@ -304,7 +304,7 @@ namespace OpenSim.Framework
/// <summary> /// <summary>
/// Find a folder given a PATH_DELIMITER delimited path starting from this folder /// Find a folder given a PATH_DELIMITER delimited path starting from this folder
/// </summary> /// </summary>
/// ///
/// This method does not handle paths that contain multiple delimitors /// This method does not handle paths that contain multiple delimitors
/// ///
@ -314,7 +314,7 @@ namespace OpenSim.Framework
/// FIXME: Delimitors which occur in names themselves are not currently escapable. /// FIXME: Delimitors which occur in names themselves are not currently escapable.
/// ///
/// <param name="path"> /// <param name="path">
/// The path to the required folder. /// The path to the required folder.
/// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned. /// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned.
/// </param> /// </param>
/// <returns>null if the folder is not found</returns> /// <returns>null if the folder is not found</returns>

View File

@ -34,10 +34,10 @@ namespace OpenSim.Framework
/// Inventory Item - contains all the properties associated with an individual inventory piece. /// Inventory Item - contains all the properties associated with an individual inventory piece.
/// </summary> /// </summary>
public class InventoryItemBase : InventoryNodeBase, ICloneable public class InventoryItemBase : InventoryNodeBase, ICloneable
{ {
/// <value> /// <value>
/// The inventory type of the item. This is slightly different from the asset type in some situations. /// The inventory type of the item. This is slightly different from the asset type in some situations.
/// </value> /// </value>
public int InvType public int InvType
{ {
get get
@ -54,7 +54,7 @@ namespace OpenSim.Framework
/// <value> /// <value>
/// The folder this item is contained in /// The folder this item is contained in
/// </value> /// </value>
public UUID Folder public UUID Folder
{ {
get get
@ -71,7 +71,7 @@ namespace OpenSim.Framework
/// <value> /// <value>
/// The creator of this item /// The creator of this item
/// </value> /// </value>
public string CreatorId public string CreatorId
{ {
get get
@ -114,7 +114,7 @@ namespace OpenSim.Framework
{ {
m_creatorIdAsUuid = value; m_creatorIdAsUuid = value;
} }
} }
protected UUID m_creatorIdAsUuid = UUID.Zero; protected UUID m_creatorIdAsUuid = UUID.Zero;
/// <value> /// <value>
@ -130,13 +130,13 @@ namespace OpenSim.Framework
set set
{ {
m_description = value; m_description = value;
} }
} }
protected string m_description = String.Empty; protected string m_description = String.Empty;
/// <value> /// <value>
/// ///
/// </value> /// </value>
public uint NextPermissions public uint NextPermissions
{ {
get get
@ -153,7 +153,7 @@ namespace OpenSim.Framework
/// <value> /// <value>
/// A mask containing permissions for the current owner (cannot be enforced) /// A mask containing permissions for the current owner (cannot be enforced)
/// </value> /// </value>
public uint CurrentPermissions public uint CurrentPermissions
{ {
get get
@ -170,7 +170,7 @@ namespace OpenSim.Framework
/// <value> /// <value>
/// ///
/// </value> /// </value>
public uint BasePermissions public uint BasePermissions
{ {
get get
@ -187,7 +187,7 @@ namespace OpenSim.Framework
/// <value> /// <value>
/// ///
/// </value> /// </value>
public uint EveryOnePermissions public uint EveryOnePermissions
{ {
get get
@ -204,7 +204,7 @@ namespace OpenSim.Framework
/// <value> /// <value>
/// ///
/// </value> /// </value>
public uint GroupPermissions public uint GroupPermissions
{ {
get get
@ -221,7 +221,7 @@ namespace OpenSim.Framework
/// <value> /// <value>
/// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc) /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
/// </value> /// </value>
public int AssetType public int AssetType
{ {
get get
@ -238,7 +238,7 @@ namespace OpenSim.Framework
/// <value> /// <value>
/// The UUID of the associated asset on the asset server /// The UUID of the associated asset on the asset server
/// </value> /// </value>
public UUID AssetID public UUID AssetID
{ {
get get
@ -255,7 +255,7 @@ namespace OpenSim.Framework
/// <value> /// <value>
/// ///
/// </value> /// </value>
public UUID GroupID public UUID GroupID
{ {
get get
@ -272,13 +272,13 @@ namespace OpenSim.Framework
/// <value> /// <value>
/// ///
/// </value> /// </value>
public bool GroupOwned public bool GroupOwned
{ {
get get
{ {
return m_groupOwned; return m_groupOwned;
} }
set set
{ {
@ -289,7 +289,7 @@ namespace OpenSim.Framework
/// <value> /// <value>
/// ///
/// </value> /// </value>
public int SalePrice public int SalePrice
{ {
get get
@ -306,7 +306,7 @@ namespace OpenSim.Framework
/// <value> /// <value>
/// ///
/// </value> /// </value>
public byte SaleType public byte SaleType
{ {
get get
@ -323,7 +323,7 @@ namespace OpenSim.Framework
/// <value> /// <value>
/// ///
/// </value> /// </value>
public uint Flags public uint Flags
{ {
get get
@ -340,7 +340,7 @@ namespace OpenSim.Framework
/// <value> /// <value>
/// ///
/// </value> /// </value>
public int CreationDate public int CreationDate
{ {
get get

View File

@ -31,12 +31,12 @@ namespace OpenSim.Framework
{ {
/// <summary> /// <summary>
/// Common base class for inventory nodes of different types (files, folders, etc.) /// Common base class for inventory nodes of different types (files, folders, etc.)
/// </summary> /// </summary>
public class InventoryNodeBase public class InventoryNodeBase
{ {
/// <summary> /// <summary>
/// The name of the node (64 characters or less) /// The name of the node (64 characters or less)
/// </summary> /// </summary>
public virtual string Name public virtual string Name
{ {
get { return m_name; } get { return m_name; }
@ -51,17 +51,17 @@ namespace OpenSim.Framework
{ {
get { return m_id; } get { return m_id; }
set { m_id = value; } set { m_id = value; }
} }
private UUID m_id; private UUID m_id;
/// <summary> /// <summary>
/// The agent who's inventory this is contained by /// The agent who's inventory this is contained by
/// </summary> /// </summary>
public virtual UUID Owner public virtual UUID Owner
{ {
get { return m_owner; } get { return m_owner; }
set { m_owner = value; } set { m_owner = value; }
} }
private UUID m_owner; private UUID m_owner;
} }
} }

View File

@ -32,7 +32,7 @@ namespace OpenSim.Framework
{ {
public class NetworkServersInfo public class NetworkServersInfo
{ {
public string AssetSendKey = String.Empty; public string AssetSendKey = String.Empty;
public string AssetURL = "http://127.0.0.1:" + ConfigSettings.DefaultAssetServerHttpPort.ToString() + "/"; public string AssetURL = "http://127.0.0.1:" + ConfigSettings.DefaultAssetServerHttpPort.ToString() + "/";
public string GridRecvKey = String.Empty; public string GridRecvKey = String.Empty;

View File

@ -1040,7 +1040,7 @@ namespace OpenSim.Framework
public static RegionInfo Create(UUID regionID, string regionName, uint regX, uint regY, string externalHostName, uint httpPort, uint simPort, uint remotingPort, string serverURI) public static RegionInfo Create(UUID regionID, string regionName, uint regX, uint regY, string externalHostName, uint httpPort, uint simPort, uint remotingPort, string serverURI)
{ {
RegionInfo regionInfo; RegionInfo regionInfo;
IPEndPoint neighbourInternalEndPoint = new IPEndPoint(Util.GetHostFromDNS(externalHostName), (int)simPort); IPEndPoint neighbourInternalEndPoint = new IPEndPoint(Util.GetHostFromDNS(externalHostName), (int)simPort);
regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalHostName); regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalHostName);
regionInfo.RemotingPort = remotingPort; regionInfo.RemotingPort = remotingPort;
regionInfo.RemotingAddress = externalHostName; regionInfo.RemotingAddress = externalHostName;

View File

@ -155,7 +155,7 @@ namespace OpenSim.Framework.Serialization.External
xtw.WriteElementString("OwnerID", landData.OwnerID.ToString()); xtw.WriteElementString("OwnerID", landData.OwnerID.ToString());
xtw.WriteStartElement("ParcelAccessList"); xtw.WriteStartElement("ParcelAccessList");
foreach(ParcelManager.ParcelAccessEntry pal in landData.ParcelAccessList) foreach (ParcelManager.ParcelAccessEntry pal in landData.ParcelAccessList)
{ {
xtw.WriteStartElement("ParcelAccessEntry"); xtw.WriteStartElement("ParcelAccessEntry");
xtw.WriteElementString("AgentID", pal.AgentID.ToString()); xtw.WriteElementString("AgentID", pal.AgentID.ToString());

View File

@ -158,7 +158,7 @@ namespace OpenSim.Framework.Serialization.External
settings.Elevation2NE = double.Parse(xtr.ReadElementContentAsString()); settings.Elevation2NE = double.Parse(xtr.ReadElementContentAsString());
break; break;
} }
} }
xtr.ReadEndElement(); xtr.ReadEndElement();
xtr.ReadStartElement("Terrain"); xtr.ReadStartElement("Terrain");
@ -200,8 +200,8 @@ namespace OpenSim.Framework.Serialization.External
xtw.WriteStartElement("RegionSettings"); xtw.WriteStartElement("RegionSettings");
xtw.WriteStartElement("General"); xtw.WriteStartElement("General");
xtw.WriteElementString("AllowDamage", settings.AllowDamage.ToString()); xtw.WriteElementString("AllowDamage", settings.AllowDamage.ToString());
xtw.WriteElementString("AllowLandResell", settings.AllowLandResell.ToString()); xtw.WriteElementString("AllowLandResell", settings.AllowLandResell.ToString());
xtw.WriteElementString("AllowLandJoinDivide", settings.AllowLandJoinDivide.ToString()); xtw.WriteElementString("AllowLandJoinDivide", settings.AllowLandJoinDivide.ToString());
xtw.WriteElementString("BlockFly", settings.BlockFly.ToString()); xtw.WriteElementString("BlockFly", settings.BlockFly.ToString());

View File

@ -36,7 +36,7 @@ namespace OpenSim.Framework.Serialization.External
/// Serialize and deserialize region settings as an external format. /// Serialize and deserialize region settings as an external format.
/// </summary> /// </summary>
public class UserProfileSerializer public class UserProfileSerializer
{ {
public const int MAJOR_VERSION = 0; public const int MAJOR_VERSION = 0;
public const int MINOR_VERSION = 1; public const int MINOR_VERSION = 1;
@ -65,6 +65,6 @@ namespace OpenSim.Framework.Serialization.External
sw.Close(); sw.Close();
return sw.ToString(); return sw.ToString();
} }
} }
} }

View File

@ -158,7 +158,7 @@ namespace OpenSim.Framework.Servers
m_consoleAppender.Threshold = Level.All; m_consoleAppender.Threshold = Level.All;
Notice(String.Format("Console log level is {0}", m_consoleAppender.Threshold)); Notice(String.Format("Console log level is {0}", m_consoleAppender.Threshold));
} }
m_console.Commands.AddCommand("base", false, "quit", m_console.Commands.AddCommand("base", false, "quit",
"quit", "quit",
@ -196,7 +196,7 @@ namespace OpenSim.Framework.Servers
/// <summary> /// <summary>
/// Should be overriden and referenced by descendents if they need to perform extra shutdown processing /// Should be overriden and referenced by descendents if they need to perform extra shutdown processing
/// </summary> /// </summary>
public virtual void ShutdownSpecific() {} public virtual void ShutdownSpecific() {}
/// <summary> /// <summary>
@ -286,7 +286,7 @@ namespace OpenSim.Framework.Servers
/// </summary> /// </summary>
public virtual void Startup() public virtual void Startup()
{ {
m_log.Info("[STARTUP]: Beginning startup processing"); m_log.Info("[STARTUP]: Beginning startup processing");
EnhanceVersionInformation(); EnhanceVersionInformation();
@ -301,7 +301,7 @@ namespace OpenSim.Framework.Servers
/// <summary> /// <summary>
/// Should be overriden and referenced by descendents if they need to perform extra shutdown processing /// Should be overriden and referenced by descendents if they need to perform extra shutdown processing
/// </summary> /// </summary>
public virtual void Shutdown() public virtual void Shutdown()
{ {
ShutdownSpecific(); ShutdownSpecific();
@ -367,7 +367,7 @@ namespace OpenSim.Framework.Servers
} }
public virtual void HandleShow(string module, string[] cmd) public virtual void HandleShow(string module, string[] cmd)
{ {
List<string> args = new List<string>(cmd); List<string> args = new List<string>(cmd);
args.RemoveAt(0); args.RemoveAt(0);
@ -375,7 +375,7 @@ namespace OpenSim.Framework.Servers
string[] showParams = args.ToArray(); string[] showParams = args.ToArray();
switch (showParams[0]) switch (showParams[0])
{ {
case "info": case "info":
Notice("Version: " + m_version); Notice("Version: " + m_version);
Notice("Startup directory: " + m_startupDirectory); Notice("Startup directory: " + m_startupDirectory);

View File

@ -168,7 +168,7 @@ namespace OpenSim.Framework.Servers.HttpServer
"[ASYNC REQUEST]: Request {0} {1} callback failed with exception {2}", verb, requestUrl, e); "[ASYNC REQUEST]: Request {0} {1} callback failed with exception {2}", verb, requestUrl, e);
} }
}, null); }, null);
} }
} }
} }

View File

@ -110,7 +110,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public BaseHttpServer(uint port, bool ssl) : this (port) public BaseHttpServer(uint port, bool ssl) : this (port)
{ {
m_ssl = ssl; m_ssl = ssl;
} }
public BaseHttpServer(uint port, bool ssl, uint sslport, string CN) : this (port, ssl) public BaseHttpServer(uint port, bool ssl, uint sslport, string CN) : this (port, ssl)
@ -156,7 +156,7 @@ namespace OpenSim.Framework.Servers.HttpServer
lock (m_rpcHandlers) lock (m_rpcHandlers)
{ {
m_rpcHandlers[method] = handler; m_rpcHandlers[method] = handler;
m_rpcHandlersKeepAlive[method] = keepAlive; // default m_rpcHandlersKeepAlive[method] = keepAlive; // default
} }
return true; return true;
@ -323,7 +323,7 @@ namespace OpenSim.Framework.Servers.HttpServer
OSHttpRequest request = objstate.oreq; OSHttpRequest request = objstate.oreq;
OSHttpResponse resp = objstate.oresp; OSHttpResponse resp = objstate.oresp;
HandleRequest(request,resp); HandleRequest(request,resp);
} }
public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response) public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response)
@ -712,7 +712,7 @@ namespace OpenSim.Framework.Servers.HttpServer
lock (m_rpcHandlers) lock (m_rpcHandlers)
{ {
methodWasFound = m_rpcHandlers.TryGetValue(methodName, out method); methodWasFound = m_rpcHandlers.TryGetValue(methodName, out method);
} }
if (methodWasFound) if (methodWasFound)
{ {
@ -931,7 +931,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (IOException e) catch (IOException e)
{ {
m_log.DebugFormat("[BASE HTTP SERVER] LLSD IOException {0}.", e); m_log.DebugFormat("[BASE HTTP SERVER] LLSD IOException {0}.", e);
} }
catch (SocketException e) catch (SocketException e)
{ {
@ -1368,7 +1368,7 @@ namespace OpenSim.Framework.Servers.HttpServer
bestMatch = pattern; bestMatch = pattern;
} }
} }
} }
if (String.IsNullOrEmpty(bestMatch)) if (String.IsNullOrEmpty(bestMatch))
{ {
@ -1480,7 +1480,7 @@ namespace OpenSim.Framework.Servers.HttpServer
{ {
m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message); m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message);
} }
} }
} }
public void SendHTML404(OSHttpResponse response, string host) public void SendHTML404(OSHttpResponse response, string host)
@ -1589,7 +1589,7 @@ namespace OpenSim.Framework.Servers.HttpServer
// if you want more detailed trace information from the HttpServer // if you want more detailed trace information from the HttpServer
//m_httpListener2.UseTraceLogs = true; //m_httpListener2.UseTraceLogs = true;
//m_httpListener2.DisconnectHandler = httpServerDisconnectMonitor; //m_httpListener2.DisconnectHandler = httpServerDisconnectMonitor;
} }
else else
{ {
@ -1624,7 +1624,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
public void httpServerDisconnectMonitor(IHttpClientContext source, SocketError err) public void httpServerDisconnectMonitor(IHttpClientContext source, SocketError err)
{ {
switch (err) switch (err)
{ {
case SocketError.NotSocket: case SocketError.NotSocket:
@ -1635,7 +1635,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
public void httpServerException(object source, Exception exception) public void httpServerException(object source, Exception exception)
{ {
m_log.ErrorFormat("[HTTPSERVER]: {0} had an exception {1}", source.ToString(), exception.ToString()); m_log.ErrorFormat("[HTTPSERVER]: {0} had an exception {1}", source.ToString(), exception.ToString());
/* /*
if (HTTPDRunning)// && NotSocketErrors > 5) if (HTTPDRunning)// && NotSocketErrors > 5)
@ -1662,7 +1662,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
catch (NullReferenceException) catch (NullReferenceException)
{ {
m_log.Warn("[BASEHTTPSERVER]: Null Reference when stopping HttpServer."); m_log.Warn("[BASEHTTPSERVER]: Null Reference when stopping HttpServer.");
} }
} }

View File

@ -128,6 +128,6 @@ namespace OpenSim.Framework.Servers.HttpServer
string GetHTTP404(string host); string GetHTTP404(string host);
string GetHTTP500(); string GetHTTP500();
} }
} }

View File

@ -56,7 +56,7 @@ namespace OpenSim
public const int VERSIONINFO_VERSION_LENGTH = 27; public const int VERSIONINFO_VERSION_LENGTH = 27;
/// <value> /// <value>
/// This is the external interface version. It is separate from the OpenSimulator project version. /// This is the external interface version. It is separate from the OpenSimulator project version.
/// ///
/// This version number should be /// This version number should be
/// increased by 1 every time a code change makes the previous OpenSimulator revision incompatible /// increased by 1 every time a code change makes the previous OpenSimulator revision incompatible
@ -67,7 +67,7 @@ namespace OpenSim
/// ///
/// Having this version number allows the grid service to reject connections from regions running a version /// Having this version number allows the grid service to reject connections from regions running a version
/// of the code that is too old. /// of the code that is too old.
/// ///
/// </value> /// </value>
public readonly static int MajorInterfaceVersion = 6; public readonly static int MajorInterfaceVersion = 6;
} }

View File

@ -35,9 +35,9 @@ namespace OpenSim.Framework
/// ///
/// TODO: This looks very much like the OpenMetaverse SimStatsPacket. It should be much more generic stats /// TODO: This looks very much like the OpenMetaverse SimStatsPacket. It should be much more generic stats
/// storage. /// storage.
/// </summary> /// </summary>
public class SimStats public class SimStats
{ {
public uint RegionX public uint RegionX
{ {
get { return m_regionX; } get { return m_regionX; }
@ -47,25 +47,25 @@ namespace OpenSim.Framework
public uint RegionY public uint RegionY
{ {
get { return m_regionY; } get { return m_regionY; }
} }
private uint m_regionY; private uint m_regionY;
public SimStatsPacket.RegionBlock RegionBlock public SimStatsPacket.RegionBlock RegionBlock
{ {
get { return m_regionBlock; } get { return m_regionBlock; }
} }
private SimStatsPacket.RegionBlock m_regionBlock; private SimStatsPacket.RegionBlock m_regionBlock;
public SimStatsPacket.StatBlock[] StatsBlock public SimStatsPacket.StatBlock[] StatsBlock
{ {
get { return m_statsBlock; } get { return m_statsBlock; }
} }
private SimStatsPacket.StatBlock[] m_statsBlock; private SimStatsPacket.StatBlock[] m_statsBlock;
public uint RegionFlags public uint RegionFlags
{ {
get { return m_regionFlags; } get { return m_regionFlags; }
} }
private uint m_regionFlags; private uint m_regionFlags;
public uint ObjectCapacity public uint ObjectCapacity
@ -76,7 +76,7 @@ namespace OpenSim.Framework
public UUID RegionUUID public UUID RegionUUID
{ {
get { return regionUUID;} get { return regionUUID; }
} }
private UUID regionUUID; private UUID regionUUID;

View File

@ -38,7 +38,7 @@ namespace OpenSim.Framework
/// A dictionary for task inventory. /// A dictionary for task inventory.
/// </summary> /// </summary>
/// This class is not thread safe. Callers must synchronize on Dictionary methods or Clone() this object before /// This class is not thread safe. Callers must synchronize on Dictionary methods or Clone() this object before
/// iterating over it. /// iterating over it.
public class TaskInventoryDictionary : Dictionary<UUID, TaskInventoryItem>, public class TaskInventoryDictionary : Dictionary<UUID, TaskInventoryItem>,
ICloneable, IXmlSerializable ICloneable, IXmlSerializable
{ {

View File

@ -57,7 +57,7 @@ namespace OpenSim.Framework
} }
private static void ThreadTrackerThreadLoop() private static void ThreadTrackerThreadLoop()
{ {
try try
{ {
while (true) while (true)
@ -70,8 +70,8 @@ namespace OpenSim.Framework
{ {
m_log.ErrorFormat( m_log.ErrorFormat(
"[THREAD TRACKER]: Thread tracker cleanup thread terminating with exception. Please report this error. Exception is {0}", "[THREAD TRACKER]: Thread tracker cleanup thread terminating with exception. Please report this error. Exception is {0}",
e); e);
} }
} }
public static void Add(Thread thread) public static void Add(Thread thread)

View File

@ -133,7 +133,7 @@ namespace OpenSim.Framework
m_configMember.addConfigurationOption("library_location", m_configMember.addConfigurationOption("library_location",
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"Path to library control file", "Path to library control file",
string.Format(".{0}inventory{0}Libraries.xml", Path.DirectorySeparatorChar), false); string.Format(".{0}inventory{0}Libraries.xml", Path.DirectorySeparatorChar), false);
m_configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, m_configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"DLL for database provider", "OpenSim.Data.MySQL.dll", false); "DLL for database provider", "OpenSim.Data.MySQL.dll", false);

View File

@ -217,7 +217,7 @@ namespace OpenSim.Framework
public string Name public string Name
{ {
get { return String.Format("{0} {1}", m_firstname, m_surname); } get { return String.Format("{0} {1}", m_firstname, m_surname); }
} }
public string Email public string Email
{ {

View File

@ -54,7 +54,7 @@ namespace OpenSim.Framework
/// </summary> /// </summary>
public class Util public class Util
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static uint nextXferID = 5000; private static uint nextXferID = 5000;
private static Random randomClass = new Random(); private static Random randomClass = new Random();
@ -136,7 +136,7 @@ namespace OpenSim.Framework
float dx = a.X - b.X; float dx = a.X - b.X;
float dy = a.Y - b.Y; float dy = a.Y - b.Y;
float dz = a.Z - b.Z; float dz = a.Z - b.Z;
return (dx*dx + dy*dy + dz*dz) < (amount*amount); return (dx*dx + dy*dy + dz*dz) < (amount*amount);
} }
/// <summary> /// <summary>
@ -975,7 +975,7 @@ namespace OpenSim.Framework
else else
{ {
os = ReadEtcIssue(); os = ReadEtcIssue();
} }
if (os.Length > 45) if (os.Length > 45)
{ {

View File

@ -70,6 +70,6 @@ namespace OpenSim.Grid.MessagingServer.Modules
{ {
//throw new Exception("The method or operation is not implemented."); //throw new Exception("The method or operation is not implemented.");
return null; return null;
} }
} }
} }

View File

@ -47,7 +47,7 @@ namespace OpenSim.Grid.UserServer.Modules
/// <summary> /// <summary>
/// Hypergrid login service used in grid mode. /// Hypergrid login service used in grid mode.
/// </summary> /// </summary>
public class UserLoginAuthService : HGLoginAuthService public class UserLoginAuthService : HGLoginAuthService
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

View File

@ -55,7 +55,7 @@ namespace OpenSim.Grid.UserServer.Modules
/// <summary> /// <summary>
/// Login service used in grid mode. /// Login service used in grid mode.
/// </summary> /// </summary>
public class UserLoginService : LoginService public class UserLoginService : LoginService
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

View File

@ -229,7 +229,7 @@ namespace OpenSim.Grid.UserServer.Modules
UserProfileData userProfile = m_userDataBaseService.GetUserProfile(userUuid); UserProfileData userProfile = m_userDataBaseService.GetUserProfile(userUuid);
if (null == userProfile) if (null == userProfile)
return Util.CreateUnknownUserErrorResponse(); return Util.CreateUnknownUserErrorResponse();
string authed; string authed;
@ -249,12 +249,12 @@ namespace OpenSim.Grid.UserServer.Modules
// "[USER MANAGER]: Authentication by password result from {0} for {1} is {2}", // "[USER MANAGER]: Authentication by password result from {0} for {1} is {2}",
// remoteClient, userUuid, authed); // remoteClient, userUuid, authed);
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable(); Hashtable responseData = new Hashtable();
responseData["auth_user"] = authed; responseData["auth_user"] = authed;
response.Value = responseData; response.Value = responseData;
return response; return response;
} }
public XmlRpcResponse XmlRPCGetAvatarPickerAvatar(XmlRpcRequest request, IPEndPoint remoteClient) public XmlRpcResponse XmlRPCGetAvatarPickerAvatar(XmlRpcRequest request, IPEndPoint remoteClient)

View File

@ -187,13 +187,13 @@ namespace OpenSim.Grid.UserServer
/// <param name="inventoryService"></param> /// <param name="inventoryService"></param>
protected virtual void StartupUserServerModules() protected virtual void StartupUserServerModules()
{ {
m_log.Info("[STARTUP]: Establishing data connection"); m_log.Info("[STARTUP]: Establishing data connection");
//we only need core components so we can request them from here //we only need core components so we can request them from here
IInterServiceInventoryServices inventoryService; IInterServiceInventoryServices inventoryService;
TryGet<IInterServiceInventoryServices>(out inventoryService); TryGet<IInterServiceInventoryServices>(out inventoryService);
CommunicationsManager commsManager = new UserServerCommsManager(inventoryService); CommunicationsManager commsManager = new UserServerCommsManager(inventoryService);
//setup database access service, for now this has to be created before the other modules. //setup database access service, for now this has to be created before the other modules.
m_userDataBaseService = new UserDataBaseService(commsManager); m_userDataBaseService = new UserDataBaseService(commsManager);

View File

@ -28,9 +28,9 @@
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
namespace OpenSim.Grid.UserServer namespace OpenSim.Grid.UserServer
{ {
public class UserServerCommsManager : CommunicationsManager public class UserServerCommsManager : CommunicationsManager
{ {
public UserServerCommsManager(IInterServiceInventoryServices interServiceInventoryService) public UserServerCommsManager(IInterServiceInventoryServices interServiceInventoryService)
: base(null, null) : base(null, null)
{ {

View File

@ -91,7 +91,7 @@ namespace OpenSim
m_log.Info("[OPENSIM MAIN]: configured log4net using default OpenSim.exe.config"); m_log.Info("[OPENSIM MAIN]: configured log4net using default OpenSim.exe.config");
} }
// Check if the system is compatible with OpenSimulator. // Check if the system is compatible with OpenSimulator.
// Ensures that the minimum system requirements are met // Ensures that the minimum system requirements are met
m_log.Info("Performing compatibility checks... "); m_log.Info("Performing compatibility checks... ");
string supported = String.Empty; string supported = String.Empty;

View File

@ -1245,20 +1245,20 @@ namespace OpenSim
protected void LoadOar(string module, string[] cmdparams) protected void LoadOar(string module, string[] cmdparams)
{ {
try try
{ {
if (cmdparams.Length > 2) if (cmdparams.Length > 2)
{ {
m_sceneManager.LoadArchiveToCurrentScene(cmdparams[2]); m_sceneManager.LoadArchiveToCurrentScene(cmdparams[2]);
} }
else else
{ {
m_sceneManager.LoadArchiveToCurrentScene(DEFAULT_OAR_BACKUP_FILENAME); m_sceneManager.LoadArchiveToCurrentScene(DEFAULT_OAR_BACKUP_FILENAME);
} }
} }
catch (Exception e) catch (Exception e)
{ {
m_log.Error(e.Message); m_log.Error(e.Message);
} }
} }
/// <summary> /// <summary>

View File

@ -98,7 +98,7 @@ namespace OpenSim
/// <value> /// <value>
/// The config information passed into the OpenSimulator region server. /// The config information passed into the OpenSimulator region server.
/// </value> /// </value>
public OpenSimConfigSource ConfigSource public OpenSimConfigSource ConfigSource
{ {
get { return m_config; } get { return m_config; }
@ -383,14 +383,14 @@ namespace OpenSim
scene.SetModuleInterfaces(); scene.SetModuleInterfaces();
// Prims have to be loaded after module configuration since some modules may be invoked during the load // Prims have to be loaded after module configuration since some modules may be invoked during the load
scene.LoadPrimsFromStorage(regionInfo.originRegionID); scene.LoadPrimsFromStorage(regionInfo.originRegionID);
// moved these here as the terrain texture has to be created after the modules are initialized // moved these here as the terrain texture has to be created after the modules are initialized
// and has to happen before the region is registered with the grid. // and has to happen before the region is registered with the grid.
scene.CreateTerrainTexture(false); scene.CreateTerrainTexture(false);
// TODO : Try setting resource for region xstats here on scene // TODO : Try setting resource for region xstats here on scene
MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo));
try try
@ -507,7 +507,7 @@ namespace OpenSim
/// Remove a region from the simulator without deleting it permanently. /// Remove a region from the simulator without deleting it permanently.
/// </summary> /// </summary>
/// <param name="scene"></param> /// <param name="scene"></param>
/// <returns></returns> /// <returns></returns>
public void CloseRegion(Scene scene) public void CloseRegion(Scene scene)
{ {
// only need to check this if we are not at the // only need to check this if we are not at the
@ -526,7 +526,7 @@ namespace OpenSim
/// Remove a region from the simulator without deleting it permanently. /// Remove a region from the simulator without deleting it permanently.
/// </summary> /// </summary>
/// <param name="name"></param> /// <param name="name"></param>
/// <returns></returns> /// <returns></returns>
public void CloseRegion(string name) public void CloseRegion(string name)
{ {
Scene target; Scene target;
@ -539,7 +539,7 @@ namespace OpenSim
/// </summary> /// </summary>
/// <param name="regionInfo"></param> /// <param name="regionInfo"></param>
/// <param name="clientServer"> </param> /// <param name="clientServer"> </param>
/// <returns></returns> /// <returns></returns>
protected Scene SetupScene(RegionInfo regionInfo, out IClientNetworkServer clientServer) protected Scene SetupScene(RegionInfo regionInfo, out IClientNetworkServer clientServer)
{ {
return SetupScene(regionInfo, 0, null, out clientServer); return SetupScene(regionInfo, 0, null, out clientServer);
@ -750,7 +750,7 @@ namespace OpenSim
} }
public string Path public string Path
{ {
// This is for the OpenSimulator instance and is the osSecret hashed // This is for the OpenSimulator instance and is the osSecret hashed
get { return "/" + osXStatsURI + "/"; } get { return "/" + osXStatsURI + "/"; }
} }
@ -791,7 +791,7 @@ namespace OpenSim
} }
public string Path public string Path
{ {
// This is for the OpenSimulator instance and is the user provided URI // This is for the OpenSimulator instance and is the user provided URI
get { return "/" + osUXStatsURI + "/"; } get { return "/" + osUXStatsURI + "/"; }
} }

View File

@ -87,9 +87,9 @@ namespace OpenSim.Region.ClientStack
public IClientNetworkServer CreateServer( public IClientNetworkServer CreateServer(
IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port,
AgentCircuitManager authenticateClass) AgentCircuitManager authenticateClass)
{ {
return CreateServer( return CreateServer(
_listenIP, ref port, proxyPortOffset, allow_alternate_port, null, authenticateClass); _listenIP, ref port, proxyPortOffset, allow_alternate_port, null, authenticateClass);
} }
/// <summary> /// <summary>
@ -104,11 +104,11 @@ namespace OpenSim.Region.ClientStack
/// </param> /// </param>
/// <param name="assetCache"></param> /// <param name="assetCache"></param>
/// <param name="authenticateClass"></param> /// <param name="authenticateClass"></param>
/// <returns></returns> /// <returns></returns>
public IClientNetworkServer CreateServer( public IClientNetworkServer CreateServer(
IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, IConfigSource configSource, IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, IConfigSource configSource,
AgentCircuitManager authenticateClass) AgentCircuitManager authenticateClass)
{ {
if (plugin != null) if (plugin != null)
{ {
IClientNetworkServer server = IClientNetworkServer server =

View File

@ -32,7 +32,7 @@ namespace OpenSim.Region.ClientStack
/// ///
/// At the moment this is very incomplete - other tweakable settings could be added. This is also somewhat LL client /// At the moment this is very incomplete - other tweakable settings could be added. This is also somewhat LL client
/// oriented right now. /// oriented right now.
/// </summary> /// </summary>
public class ClientStackUserSettings public class ClientStackUserSettings
{ {
/// <summary> /// <summary>

View File

@ -31,7 +31,7 @@ using OpenMetaverse.Packets;
using OpenSim.Framework; using OpenSim.Framework;
namespace OpenSim.Region.ClientStack.LindenUDP namespace OpenSim.Region.ClientStack.LindenUDP
{ {
public delegate void PacketStats(int inPackets, int outPackets, int unAckedBytes); public delegate void PacketStats(int inPackets, int outPackets, int unAckedBytes);
public delegate void PacketDrop(Packet pack, Object id); public delegate void PacketDrop(Packet pack, Object id);
public delegate bool SynchronizeClientHandler(IScene scene, Packet packet, UUID agentID, ThrottleOutPacketType throttlePacketType); public delegate bool SynchronizeClientHandler(IScene scene, Packet packet, UUID agentID, ThrottleOutPacketType throttlePacketType);
@ -61,7 +61,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <summary> /// <summary>
/// Take action depending on the type and contents of an received packet. /// Take action depending on the type and contents of an received packet.
/// </summary> /// </summary>
/// <param name="item"></param> /// <param name="item"></param>
void ProcessInPacket(LLQueItem item); void ProcessInPacket(LLQueItem item);
void ProcessOutPacket(LLQueItem item); void ProcessOutPacket(LLQueItem item);

View File

@ -127,7 +127,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
else else
{ {
m_asset = asset; m_asset = asset;
} }
RunUpdate(); RunUpdate();
} }
@ -198,7 +198,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
try try
{ {
Buffer.BlockCopy(m_asset.Data, 0, firstImageData, 0, (int)cFirstPacketSize); Buffer.BlockCopy(m_asset.Data, 0, firstImageData, 0, (int)cFirstPacketSize);
client.SendImageFirstPart(TexturePacketCount(), m_requestedUUID, (uint)m_asset.Data.Length, firstImageData, 2); client.SendImageFirstPart(TexturePacketCount(), m_requestedUUID, (uint)m_asset.Data.Length, firstImageData, 2);
} }
catch (Exception) catch (Exception)
{ {

View File

@ -2332,7 +2332,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return itemBlock; return itemBlock;
} }
public void SendBulkUpdateInventory(InventoryNodeBase node) public void SendBulkUpdateInventory(InventoryNodeBase node)
{ {
if (node is InventoryItemBase) if (node is InventoryItemBase)
SendBulkUpdateInventoryItem((InventoryItemBase)node); SendBulkUpdateInventoryItem((InventoryItemBase)node);
@ -2937,7 +2937,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
else if (m_avatarTerseUpdates.Count == 1) else if (m_avatarTerseUpdates.Count == 1)
{ {
lock (m_avatarTerseUpdateTimer) lock (m_avatarTerseUpdateTimer)
m_avatarTerseUpdateTimer.Start(); m_avatarTerseUpdateTimer.Start();
} }
} }
} }

View File

@ -143,7 +143,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
TextureThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 2, 4000, userSettings.ClientThrottleMultipler); TextureThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 2, 4000, userSettings.ClientThrottleMultipler);
// Total Throttle trumps all - it is the number of bits in total that are allowed to go out per second. // Total Throttle trumps all - it is the number of bits in total that are allowed to go out per second.
ThrottleSettings totalThrottleSettings = userSettings.TotalThrottleSettings; ThrottleSettings totalThrottleSettings = userSettings.TotalThrottleSettings;
@ -410,7 +410,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
LLQueItem qpack = ResendOutgoingPacketQueue.Dequeue(); LLQueItem qpack = ResendOutgoingPacketQueue.Dequeue();
SendQueue.Enqueue(qpack); SendQueue.Enqueue(qpack);
TotalThrottle.AddBytes(qpack.Length); TotalThrottle.AddBytes(qpack.Length);
ResendThrottle.AddBytes(qpack.Length); ResendThrottle.AddBytes(qpack.Length);
@ -470,7 +470,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
LLQueItem qpack = TextureOutgoingPacketQueue.Dequeue(); LLQueItem qpack = TextureOutgoingPacketQueue.Dequeue();
SendQueue.Enqueue(qpack); SendQueue.Enqueue(qpack);
TotalThrottle.AddBytes(qpack.Length); TotalThrottle.AddBytes(qpack.Length);
TextureThrottle.AddBytes(qpack.Length); TextureThrottle.AddBytes(qpack.Length);
qchanged = true; qchanged = true;

View File

@ -48,11 +48,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <summary> /// <summary>
/// Tweakable user settings /// Tweakable user settings
/// </summary> /// </summary>
private ClientStackUserSettings m_userSettings; private ClientStackUserSettings m_userSettings;
public LLPacketServer(ILLClientStackNetworkHandler networkHandler, ClientStackUserSettings userSettings) public LLPacketServer(ILLClientStackNetworkHandler networkHandler, ClientStackUserSettings userSettings)
{ {
m_userSettings = userSettings; m_userSettings = userSettings;
m_networkHandler = networkHandler; m_networkHandler = networkHandler;
m_networkHandler.RegisterPacketServer(this); m_networkHandler.RegisterPacketServer(this);
@ -114,7 +114,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
sessionInfo = circuitManager.AuthenticateSession(sessionId, agentId, circuitCode); sessionInfo = circuitManager.AuthenticateSession(sessionId, agentId, circuitCode);
if (!sessionInfo.Authorised) if (!sessionInfo.Authorised)
return false; return false;
return true; return true;
} }
@ -129,7 +129,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <param name="proxyEP"></param> /// <param name="proxyEP"></param>
/// <returns> /// <returns>
/// true if a new circuit was created, false if a circuit with the given circuit code already existed /// true if a new circuit was created, false if a circuit with the given circuit code already existed
/// </returns> /// </returns>
public virtual bool AddNewClient( public virtual bool AddNewClient(
EndPoint epSender, UseCircuitCodePacket useCircuit, EndPoint epSender, UseCircuitCodePacket useCircuit,
AuthenticateResponse sessionInfo, EndPoint proxyEP) AuthenticateResponse sessionInfo, EndPoint proxyEP)

View File

@ -26,7 +26,7 @@
*/ */
namespace OpenSim.Region.ClientStack.LindenUDP namespace OpenSim.Region.ClientStack.LindenUDP
{ {
public class LLPacketThrottle public class LLPacketThrottle
{ {
private readonly int m_maxAllowableThrottle; private readonly int m_maxAllowableThrottle;
@ -49,7 +49,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public int Min public int Min
{ {
get { return m_minAllowableThrottle; } get { return m_minAllowableThrottle; }
} }
public int Current public int Current
{ {
@ -105,13 +105,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public int Throttle public int Throttle
{ {
get { return m_currentThrottle; } get { return m_currentThrottle; }
set set
{ {
if (value < m_minAllowableThrottle) if (value < m_minAllowableThrottle)
{ {
m_currentThrottle = m_minAllowableThrottle; m_currentThrottle = m_minAllowableThrottle;
} }
else if (value > m_maxAllowableThrottle) else if (value > m_maxAllowableThrottle)
{ {
m_currentThrottle = m_maxAllowableThrottle; m_currentThrottle = m_maxAllowableThrottle;

View File

@ -166,7 +166,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
userSettings.ClientThrottleMultipler = config.GetFloat("client_throttle_multiplier"); userSettings.ClientThrottleMultipler = config.GetFloat("client_throttle_multiplier");
if (config.Contains("client_socket_rcvbuf_size")) if (config.Contains("client_socket_rcvbuf_size"))
m_clientSocketReceiveBuffer = config.GetInt("client_socket_rcvbuf_size"); m_clientSocketReceiveBuffer = config.GetInt("client_socket_rcvbuf_size");
} }
m_log.DebugFormat("[CLIENT]: client_throttle_multiplier = {0}", userSettings.ClientThrottleMultipler); m_log.DebugFormat("[CLIENT]: client_throttle_multiplier = {0}", userSettings.ClientThrottleMultipler);
m_log.DebugFormat("[CLIENT]: client_socket_rcvbuf_size = {0}", (m_clientSocketReceiveBuffer != 0 ? m_log.DebugFormat("[CLIENT]: client_socket_rcvbuf_size = {0}", (m_clientSocketReceiveBuffer != 0 ?
@ -228,7 +228,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
m_log.Debug("[CLIENT]: " + e); m_log.Debug("[CLIENT]: " + e);
} }
} }
if (proxyPortOffset != 0) if (proxyPortOffset != 0)
@ -254,7 +254,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (packet != null) if (packet != null)
{ {
if (packet.Type == PacketType.UseCircuitCode) if (packet.Type == PacketType.UseCircuitCode)
AddNewClient((UseCircuitCodePacket)packet, epSender, epProxy); AddNewClient((UseCircuitCodePacket)packet, epSender, epProxy);
else else
ProcessInPacket(packet, epSender); ProcessInPacket(packet, epSender);
} }
@ -290,7 +290,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
catch (Exception e) catch (Exception e)
{ {
m_log.Error("[CLIENT]: Exception in processing packet - ignoring: ", e); m_log.Error("[CLIENT]: Exception in processing packet - ignoring: ", e);
} }
} }
/// <summary> /// <summary>
@ -299,7 +299,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected virtual void BeginReceive() protected virtual void BeginReceive()
{ {
m_socket.BeginReceiveFrom( m_socket.BeginReceiveFrom(
RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref reusedEpSender, ReceivedData, null); RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref reusedEpSender, ReceivedData, null);
} }
/// <summary> /// <summary>
@ -322,7 +322,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// ENDLESS LOOP ON PURPOSE! // ENDLESS LOOP ON PURPOSE!
// Reset connection and get next UDP packet off the buffer // Reset connection and get next UDP packet off the buffer
// If the UDP packet is part of the same stream, this will happen several hundreds of times before // If the UDP packet is part of the same stream, this will happen several hundreds of times before
// the next set of UDP data is for a valid client. // the next set of UDP data is for a valid client.
try try
{ {
@ -347,7 +347,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_log.ErrorFormat("[CLIENT]: Exception thrown during BeginReceive(): {0}", ex); m_log.ErrorFormat("[CLIENT]: Exception thrown during BeginReceive(): {0}", ex);
} }
} }
} }
/// <summary> /// <summary>
/// Close a client circuit. This is done in response to an exception on receive, and should not be called /// Close a client circuit. This is done in response to an exception on receive, and should not be called
@ -363,12 +363,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
m_packetServer.CloseCircuit(circuit); m_packetServer.CloseCircuit(circuit);
if (e != null) if (e != null)
m_log.ErrorFormat( m_log.ErrorFormat(
"[CLIENT]: Closed circuit {0} {1} due to exception {2}", circuit, reusedEpSender, e); "[CLIENT]: Closed circuit {0} {1} due to exception {2}", circuit, reusedEpSender, e);
} }
} }
} }
/// <summary> /// <summary>
/// Finish the process of asynchronously receiving the next bit of raw data /// Finish the process of asynchronously receiving the next bit of raw data
@ -410,7 +410,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
m_log.DebugFormat("[CLIENT]: ObjectDisposedException: Object {0} disposed.", e.ObjectName); m_log.DebugFormat("[CLIENT]: ObjectDisposedException: Object {0} disposed.", e.ObjectName);
// Uhh, what object, and why? this needs better handling. // Uhh, what object, and why? this needs better handling.
} }
return hasReceivedOkay; return hasReceivedOkay;
} }
@ -422,10 +422,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <param name="epSender"></param> /// <param name="epSender"></param>
/// <param name="epProxy"></param> /// <param name="epProxy"></param>
protected virtual void AddNewClient(UseCircuitCodePacket useCircuit, EndPoint epSender, EndPoint epProxy) protected virtual void AddNewClient(UseCircuitCodePacket useCircuit, EndPoint epSender, EndPoint epProxy)
{ {
//Slave regions don't accept new clients //Slave regions don't accept new clients
if (m_localScene.RegionStatus != RegionStatus.SlaveScene) if (m_localScene.RegionStatus != RegionStatus.SlaveScene)
{ {
AuthenticateResponse sessionInfo; AuthenticateResponse sessionInfo;
bool isNewCircuit = false; bool isNewCircuit = false;
@ -441,8 +441,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
lock (clientCircuits) lock (clientCircuits)
{ {
if (!clientCircuits.ContainsKey(epSender)) if (!clientCircuits.ContainsKey(epSender))
{ {
clientCircuits.Add(epSender, useCircuit.CircuitCode.Code); clientCircuits.Add(epSender, useCircuit.CircuitCode.Code);
isNewCircuit = true; isNewCircuit = true;
} }
} }
@ -461,9 +461,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//m_log.DebugFormat( //m_log.DebugFormat(
// "[CONNECTION SUCCESS]: Incoming client {0} (circuit code {1}) received and authenticated for {2}", // "[CONNECTION SUCCESS]: Incoming client {0} (circuit code {1}) received and authenticated for {2}",
// useCircuit.CircuitCode.ID, useCircuit.CircuitCode.Code, m_localScene.RegionInfo.RegionName); // useCircuit.CircuitCode.ID, useCircuit.CircuitCode.Code, m_localScene.RegionInfo.RegionName);
} }
} }
// Ack the UseCircuitCode packet // Ack the UseCircuitCode packet
PacketAckPacket ack_it = (PacketAckPacket)PacketPool.Instance.GetPacket(PacketType.PacketAck); PacketAckPacket ack_it = (PacketAckPacket)PacketPool.Instance.GetPacket(PacketType.PacketAck);
@ -605,7 +605,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
useCircuit.CircuitCode.ID, useCircuit.CircuitCode.Code); useCircuit.CircuitCode.ID, useCircuit.CircuitCode.Code);
return; return;
} }
lock (clientCircuits) lock (clientCircuits)
{ {

View File

@ -28,7 +28,7 @@
using OpenMetaverse; using OpenMetaverse;
namespace OpenSim.Region.ClientStack.LindenUDP namespace OpenSim.Region.ClientStack.LindenUDP
{ {
public class LLUtil public class LLUtil
{ {
/// <summary> /// <summary>

View File

@ -54,7 +54,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
catch catch
{ {
// I don't care, just leave log4net off // I don't care, just leave log4net off
} }
} }
/// <summary> /// <summary>
@ -63,20 +63,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
/// <param name="scene"></param> /// <param name="scene"></param>
/// <param name="testLLUDPServer"></param> /// <param name="testLLUDPServer"></param>
/// <param name="testPacketServer"></param> /// <param name="testPacketServer"></param>
/// <param name="acm">Agent circuit manager used in setting up the stack</param> /// <param name="acm">Agent circuit manager used in setting up the stack</param>
protected void SetupStack( protected void SetupStack(
IScene scene, out TestLLUDPServer testLLUDPServer, out TestLLPacketServer testPacketServer, IScene scene, out TestLLUDPServer testLLUDPServer, out TestLLPacketServer testPacketServer,
out AgentCircuitManager acm) out AgentCircuitManager acm)
{ {
IConfigSource configSource = new IniConfigSource(); IConfigSource configSource = new IniConfigSource();
ClientStackUserSettings userSettings = new ClientStackUserSettings(); ClientStackUserSettings userSettings = new ClientStackUserSettings();
testLLUDPServer = new TestLLUDPServer(); testLLUDPServer = new TestLLUDPServer();
acm = new AgentCircuitManager(); acm = new AgentCircuitManager();
uint port = 666; uint port = 666;
testLLUDPServer.Initialise(null, ref port, 0, false, configSource, acm); testLLUDPServer.Initialise(null, ref port, 0, false, configSource, acm);
testPacketServer = new TestLLPacketServer(testLLUDPServer, userSettings); testPacketServer = new TestLLPacketServer(testLLUDPServer, userSettings);
testLLUDPServer.LocalScene = scene; testLLUDPServer.LocalScene = scene;
} }
/// <summary> /// <summary>
@ -124,7 +124,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
acm.AddNewCircuit(circuitCode, acd); acm.AddNewCircuit(circuitCode, acd);
testLLUDPServer.LoadReceive(uccp, epSender); testLLUDPServer.LoadReceive(uccp, epSender);
testLLUDPServer.ReceiveData(null); testLLUDPServer.ReceiveData(null);
} }
@ -142,15 +142,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
onp.ObjectData = new ObjectNamePacket.ObjectDataBlock[] { odb }; onp.ObjectData = new ObjectNamePacket.ObjectDataBlock[] { odb };
onp.Header.Zerocoded = false; onp.Header.Zerocoded = false;
return onp; return onp;
} }
/// <summary> /// <summary>
/// Test adding a client to the stack /// Test adding a client to the stack
/// </summary> /// </summary>
[Test, LongRunning] [Test, LongRunning]
public void TestAddClient() public void TestAddClient()
{ {
TestHelper.InMethod(); TestHelper.InMethod();
uint myCircuitCode = 123456; uint myCircuitCode = 123456;
@ -177,7 +177,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
EndPoint testEp = new IPEndPoint(IPAddress.Loopback, 999); EndPoint testEp = new IPEndPoint(IPAddress.Loopback, 999);
testLLUDPServer.LoadReceive(uccp, testEp); testLLUDPServer.LoadReceive(uccp, testEp);
testLLUDPServer.ReceiveData(null); testLLUDPServer.ReceiveData(null);
// Circuit shouildn't exist since the circuit manager doesn't know about this circuit for authentication yet // Circuit shouildn't exist since the circuit manager doesn't know about this circuit for authentication yet
@ -185,8 +185,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
acm.AddNewCircuit(myCircuitCode, acd); acm.AddNewCircuit(myCircuitCode, acd);
testLLUDPServer.LoadReceive(uccp, testEp); testLLUDPServer.LoadReceive(uccp, testEp);
testLLUDPServer.ReceiveData(null); testLLUDPServer.ReceiveData(null);
// Should succeed now // Should succeed now
Assert.IsTrue(testLLUDPServer.HasCircuit(myCircuitCode)); Assert.IsTrue(testLLUDPServer.HasCircuit(myCircuitCode));
@ -196,24 +196,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
/// <summary> /// <summary>
/// Test removing a client from the stack /// Test removing a client from the stack
/// </summary> /// </summary>
[Test] [Test]
public void TestRemoveClient() public void TestRemoveClient()
{ {
TestHelper.InMethod(); TestHelper.InMethod();
uint myCircuitCode = 123457; uint myCircuitCode = 123457;
TestLLUDPServer testLLUDPServer; TestLLUDPServer testLLUDPServer;
TestLLPacketServer testLLPacketServer; TestLLPacketServer testLLPacketServer;
AgentCircuitManager acm; AgentCircuitManager acm;
SetupStack(new MockScene(), out testLLUDPServer, out testLLPacketServer, out acm); SetupStack(new MockScene(), out testLLUDPServer, out testLLPacketServer, out acm);
AddClient(myCircuitCode, new IPEndPoint(IPAddress.Loopback, 1000), testLLUDPServer, acm); AddClient(myCircuitCode, new IPEndPoint(IPAddress.Loopback, 1000), testLLUDPServer, acm);
testLLUDPServer.RemoveClientCircuit(myCircuitCode); testLLUDPServer.RemoveClientCircuit(myCircuitCode);
Assert.IsFalse(testLLUDPServer.HasCircuit(myCircuitCode)); Assert.IsFalse(testLLUDPServer.HasCircuit(myCircuitCode));
// Check that removing a non-existant circuit doesn't have any bad effects // Check that removing a non-existant circuit doesn't have any bad effects
testLLUDPServer.RemoveClientCircuit(101); testLLUDPServer.RemoveClientCircuit(101);
Assert.IsFalse(testLLUDPServer.HasCircuit(101)); Assert.IsFalse(testLLUDPServer.HasCircuit(101));
} }
@ -232,8 +232,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
TestLLUDPServer testLLUDPServer; TestLLUDPServer testLLUDPServer;
TestLLPacketServer testLLPacketServer; TestLLPacketServer testLLPacketServer;
AgentCircuitManager acm; AgentCircuitManager acm;
SetupStack(scene, out testLLUDPServer, out testLLPacketServer, out acm); SetupStack(scene, out testLLUDPServer, out testLLPacketServer, out acm);
AddClient(myCircuitCode, testEp, testLLUDPServer, acm); AddClient(myCircuitCode, testEp, testLLUDPServer, acm);
byte[] data = new byte[] { 0x01, 0x02, 0x03, 0x04 }; byte[] data = new byte[] { 0x01, 0x02, 0x03, 0x04 };
@ -252,7 +252,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(1, "helloooo"), testEp); testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(1, "helloooo"), testEp);
testLLUDPServer.ReceiveData(null); testLLUDPServer.ReceiveData(null);
Assert.That(testLLPacketServer.GetTotalPacketsReceived(), Is.EqualTo(1)); Assert.That(testLLPacketServer.GetTotalPacketsReceived(), Is.EqualTo(1));
Assert.That(testLLPacketServer.GetPacketsReceivedFor(PacketType.ObjectName), Is.EqualTo(1)); Assert.That(testLLPacketServer.GetPacketsReceivedFor(PacketType.ObjectName), Is.EqualTo(1));
} }
@ -270,17 +270,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
uint circuitCodeA = 130000; uint circuitCodeA = 130000;
EndPoint epA = new IPEndPoint(IPAddress.Loopback, 1300); EndPoint epA = new IPEndPoint(IPAddress.Loopback, 1300);
UUID agentIdA = UUID.Parse("00000000-0000-0000-0000-000000001300"); UUID agentIdA = UUID.Parse("00000000-0000-0000-0000-000000001300");
UUID sessionIdA = UUID.Parse("00000000-0000-0000-0000-000000002300"); UUID sessionIdA = UUID.Parse("00000000-0000-0000-0000-000000002300");
uint circuitCodeB = 130001; uint circuitCodeB = 130001;
EndPoint epB = new IPEndPoint(IPAddress.Loopback, 1301); EndPoint epB = new IPEndPoint(IPAddress.Loopback, 1301);
UUID agentIdB = UUID.Parse("00000000-0000-0000-0000-000000001301"); UUID agentIdB = UUID.Parse("00000000-0000-0000-0000-000000001301");
UUID sessionIdB = UUID.Parse("00000000-0000-0000-0000-000000002301"); UUID sessionIdB = UUID.Parse("00000000-0000-0000-0000-000000002301");
TestLLUDPServer testLLUDPServer; TestLLUDPServer testLLUDPServer;
TestLLPacketServer testLLPacketServer; TestLLPacketServer testLLPacketServer;
AgentCircuitManager acm; AgentCircuitManager acm;
SetupStack(scene, out testLLUDPServer, out testLLPacketServer, out acm); SetupStack(scene, out testLLUDPServer, out testLLPacketServer, out acm);
AddClient(circuitCodeA, epA, agentIdA, sessionIdA, testLLUDPServer, acm); AddClient(circuitCodeA, epA, agentIdA, sessionIdA, testLLUDPServer, acm);
AddClient(circuitCodeB, epB, agentIdB, sessionIdB, testLLUDPServer, acm); AddClient(circuitCodeB, epB, agentIdB, sessionIdB, testLLUDPServer, acm);
@ -292,8 +292,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
Assert.IsFalse(testLLUDPServer.HasCircuit(circuitCodeA)); Assert.IsFalse(testLLUDPServer.HasCircuit(circuitCodeA));
Assert.That(testLLPacketServer.GetTotalPacketsReceived(), Is.EqualTo(3)); Assert.That(testLLPacketServer.GetTotalPacketsReceived(), Is.EqualTo(3));
Assert.That(testLLPacketServer.GetPacketsReceivedFor(PacketType.ObjectName), Is.EqualTo(3)); Assert.That(testLLPacketServer.GetPacketsReceivedFor(PacketType.ObjectName), Is.EqualTo(3));
} }
} }
} }

View File

@ -45,7 +45,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
[Test] [Test]
/// <summary> /// <summary>
/// More a placeholder, really /// More a placeholder, really
/// </summary> /// </summary>
public void InPacketTest() public void InPacketTest()
{ {
TestHelper.InMethod(); TestHelper.InMethod();
@ -87,20 +87,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
/// <param name="scene"></param> /// <param name="scene"></param>
/// <param name="testLLUDPServer"></param> /// <param name="testLLUDPServer"></param>
/// <param name="testPacketServer"></param> /// <param name="testPacketServer"></param>
/// <param name="acm">Agent circuit manager used in setting up the stack</param> /// <param name="acm">Agent circuit manager used in setting up the stack</param>
protected void SetupStack( protected void SetupStack(
IScene scene, out TestLLUDPServer testLLUDPServer, out TestLLPacketServer testPacketServer, IScene scene, out TestLLUDPServer testLLUDPServer, out TestLLPacketServer testPacketServer,
out AgentCircuitManager acm) out AgentCircuitManager acm)
{ {
IConfigSource configSource = new IniConfigSource(); IConfigSource configSource = new IniConfigSource();
ClientStackUserSettings userSettings = new ClientStackUserSettings(); ClientStackUserSettings userSettings = new ClientStackUserSettings();
testLLUDPServer = new TestLLUDPServer(); testLLUDPServer = new TestLLUDPServer();
acm = new AgentCircuitManager(); acm = new AgentCircuitManager();
uint port = 666; uint port = 666;
testLLUDPServer.Initialise(null, ref port, 0, false, configSource, acm); testLLUDPServer.Initialise(null, ref port, 0, false, configSource, acm);
testPacketServer = new TestLLPacketServer(testLLUDPServer, userSettings); testPacketServer = new TestLLPacketServer(testLLUDPServer, userSettings);
testLLUDPServer.LocalScene = scene; testLLUDPServer.LocalScene = scene;
} }
} }
} }

View File

@ -31,7 +31,7 @@ using OpenMetaverse.Packets;
namespace OpenSim.Region.ClientStack.LindenUDP.Tests namespace OpenSim.Region.ClientStack.LindenUDP.Tests
{ {
public class TestLLPacketServer : LLPacketServer public class TestLLPacketServer : LLPacketServer
{ {
/// <summary> /// <summary>
/// Record counts of packets received /// Record counts of packets received
/// </summary> /// </summary>
@ -49,7 +49,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
m_packetsReceived[packet.Type]++; m_packetsReceived[packet.Type]++;
else else
m_packetsReceived[packet.Type] = 1; m_packetsReceived[packet.Type] = 1;
} }
public int GetTotalPacketsReceived() public int GetTotalPacketsReceived()
{ {

View File

@ -66,7 +66,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
ChunkSenderTuple tuple = m_chunksToLoad.Dequeue(); ChunkSenderTuple tuple = m_chunksToLoad.Dequeue();
RecvBuffer = tuple.Data; RecvBuffer = tuple.Data;
numBytes = tuple.Data.Length; numBytes = tuple.Data.Length;
epSender = tuple.Sender; epSender = tuple.Sender;
return true; return true;
} }
@ -114,7 +114,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
{ {
while (m_chunksToLoad.Count > 0) while (m_chunksToLoad.Count > 0)
OnReceivedData(result); OnReceivedData(result);
} }
/// <summary> /// <summary>
/// Has a circuit with the given code been established? /// Has a circuit with the given code been established?
@ -134,7 +134,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
/// Record the data and sender tuple /// Record the data and sender tuple
/// </summary> /// </summary>
public class ChunkSenderTuple public class ChunkSenderTuple
{ {
public byte[] Data; public byte[] Data;
public EndPoint Sender; public EndPoint Sender;
public bool BeginReceiveException; public bool BeginReceiveException;

View File

@ -61,7 +61,7 @@ namespace OpenSim.Region.ClientStack
get { return m_commsManager; } get { return m_commsManager; }
set { m_commsManager = value; } set { m_commsManager = value; }
} }
protected CommunicationsManager m_commsManager; protected CommunicationsManager m_commsManager;
protected StorageManager m_storageManager; protected StorageManager m_storageManager;
@ -80,15 +80,15 @@ namespace OpenSim.Region.ClientStack
/// </summary> /// </summary>
/// ///
/// <param name="osSceneIdentifier"> /// <param name="osSceneIdentifier">
/// The name of the OpenSim scene this physics scene is serving. This will be used in log messages. /// The name of the OpenSim scene this physics scene is serving. This will be used in log messages.
/// </param> /// </param>
/// <returns></returns> /// <returns></returns>
protected abstract PhysicsScene GetPhysicsScene(string osSceneIdentifier); protected abstract PhysicsScene GetPhysicsScene(string osSceneIdentifier);
protected abstract StorageManager CreateStorageManager(); protected abstract StorageManager CreateStorageManager();
protected abstract ClientStackManager CreateClientStackManager(); protected abstract ClientStackManager CreateClientStackManager();
protected abstract Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, protected abstract Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager,
AgentCircuitManager circuitManager); AgentCircuitManager circuitManager);
protected override void StartupSpecific() protected override void StartupSpecific()
{ {
@ -121,7 +121,7 @@ namespace OpenSim.Region.ClientStack
/// <param name="meshEngine">The name of the mesh engine to use</param> /// <param name="meshEngine">The name of the mesh engine to use</param>
/// <param name="config">The configuration data to pass to the physics and mesh engines</param> /// <param name="config">The configuration data to pass to the physics and mesh engines</param>
/// <param name="osSceneIdentifier"> /// <param name="osSceneIdentifier">
/// The name of the OpenSim scene this physics scene is serving. This will be used in log messages. /// The name of the OpenSim scene this physics scene is serving. This will be used in log messages.
/// </param> /// </param>
/// <returns></returns> /// <returns></returns>
protected PhysicsScene GetPhysicsScene( protected PhysicsScene GetPhysicsScene(

View File

@ -26,12 +26,12 @@
*/ */
namespace OpenSim.Region.ClientStack namespace OpenSim.Region.ClientStack
{ {
/// <summary> /// <summary>
/// Represent throttle settings for a client stack. These settings are in bytes per second /// Represent throttle settings for a client stack. These settings are in bytes per second
/// </summary> /// </summary>
public class ThrottleSettings public class ThrottleSettings
{ {
/// <summary> /// <summary>
/// Minimum bytes per second that the throttle can be set to. /// Minimum bytes per second that the throttle can be set to.
/// </summary> /// </summary>
@ -39,13 +39,13 @@ namespace OpenSim.Region.ClientStack
/// <summary> /// <summary>
/// Maximum bytes per second that the throttle can be set to. /// Maximum bytes per second that the throttle can be set to.
/// </summary> /// </summary>
public int Max; public int Max;
/// <summary> /// <summary>
/// Current bytes per second that the throttle should be set to. /// Current bytes per second that the throttle should be set to.
/// </summary> /// </summary>
public int Current; public int Current;
public ThrottleSettings(int min, int max, int current) public ThrottleSettings(int min, int max, int current)
{ {

View File

@ -50,11 +50,11 @@ namespace OpenSim.Region.Communications.Hypergrid
HGUserServices userServices = new HGUserServices(this); HGUserServices userServices = new HGUserServices(this);
// This plugin arrangement could eventually be configurable rather than hardcoded here. // This plugin arrangement could eventually be configurable rather than hardcoded here.
userServices.AddPlugin(new TemporaryUserProfilePlugin()); userServices.AddPlugin(new TemporaryUserProfilePlugin());
userServices.AddPlugin(new HGUserDataPlugin(this, userServices)); userServices.AddPlugin(new HGUserDataPlugin(this, userServices));
m_userService = userServices; m_userService = userServices;
m_messageService = userServices; m_messageService = userServices;
m_avatarService = userServices; m_avatarService = userServices;
} }
} }
} }

View File

@ -41,13 +41,13 @@ namespace OpenSim.Region.Communications.Hypergrid
public class HGCommunicationsStandalone : CommunicationsManager public class HGCommunicationsStandalone : CommunicationsManager
{ {
public HGCommunicationsStandalone( public HGCommunicationsStandalone(
ConfigSettings configSettings, ConfigSettings configSettings,
NetworkServersInfo serversInfo, NetworkServersInfo serversInfo,
BaseHttpServer httpServer, BaseHttpServer httpServer,
LibraryRootFolder libraryRootFolder, LibraryRootFolder libraryRootFolder,
bool dumpAssetsToFile) bool dumpAssetsToFile)
: base(serversInfo, libraryRootFolder) : base(serversInfo, libraryRootFolder)
{ {
LocalUserServices localUserService = LocalUserServices localUserService =
new LocalUserServices( new LocalUserServices(
serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this); serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this);
@ -58,8 +58,8 @@ namespace OpenSim.Region.Communications.Hypergrid
hgUserService.AddPlugin(new TemporaryUserProfilePlugin()); hgUserService.AddPlugin(new TemporaryUserProfilePlugin());
hgUserService.AddPlugin(new HGUserDataPlugin(this, hgUserService)); hgUserService.AddPlugin(new HGUserDataPlugin(this, hgUserService));
m_userService = hgUserService; m_userService = hgUserService;
m_userAdminService = hgUserService; m_userAdminService = hgUserService;
m_avatarService = hgUserService; m_avatarService = hgUserService;
m_messageService = hgUserService; m_messageService = hgUserService;

View File

@ -87,7 +87,7 @@ namespace OpenSim.Region.Communications.Hypergrid
return m_localUserServices.AddUserAgent(agentdata); return m_localUserServices.AddUserAgent(agentdata);
return base.AddUserAgent(agentdata); return base.AddUserAgent(agentdata);
} }
public override UserAgentData GetAgentByUUID(UUID userId) public override UserAgentData GetAgentByUUID(UUID userId)
{ {

View File

@ -37,7 +37,7 @@ namespace OpenSim.Region.Communications.Local
public class CommunicationsLocal : CommunicationsManager public class CommunicationsLocal : CommunicationsManager
{ {
public CommunicationsLocal( public CommunicationsLocal(
ConfigSettings configSettings, ConfigSettings configSettings,
NetworkServersInfo serversInfo, NetworkServersInfo serversInfo,
LibraryRootFolder libraryRootFolder) LibraryRootFolder libraryRootFolder)
: base(serversInfo, libraryRootFolder) : base(serversInfo, libraryRootFolder)
@ -47,13 +47,13 @@ namespace OpenSim.Region.Communications.Local
= new LocalUserServices( = new LocalUserServices(
serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this); serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this);
lus.AddPlugin(new TemporaryUserProfilePlugin()); lus.AddPlugin(new TemporaryUserProfilePlugin());
lus.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource); lus.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource);
m_userService = lus; m_userService = lus;
m_userAdminService = lus; m_userAdminService = lus;
m_avatarService = lus; m_avatarService = lus;
m_messageService = lus; m_messageService = lus;
//LocalLoginService loginService = CreateLoginService(libraryRootFolder, inventoryService, userService, backendService); //LocalLoginService loginService = CreateLoginService(libraryRootFolder, inventoryService, userService, backendService);
} }
} }
} }

View File

@ -94,7 +94,7 @@ namespace OpenSim.Region.Communications.Local
if (md5PasswordHash == userProfile.PasswordHash) if (md5PasswordHash == userProfile.PasswordHash)
return true; return true;
else else
return false; return false;
} }
} }
} }

View File

@ -40,7 +40,7 @@ namespace OpenSim.Region.Communications.OGS1
: base(serversInfo, libraryRootFolder) : base(serversInfo, libraryRootFolder)
{ {
// This plugin arrangement could eventually be configurable rather than hardcoded here. // This plugin arrangement could eventually be configurable rather than hardcoded here.
OGS1UserServices userServices = new OGS1UserServices(this); OGS1UserServices userServices = new OGS1UserServices(this);
userServices.AddPlugin(new TemporaryUserProfilePlugin()); userServices.AddPlugin(new TemporaryUserProfilePlugin());
userServices.AddPlugin(new OGS1UserDataPlugin(this)); userServices.AddPlugin(new OGS1UserDataPlugin(this));

View File

@ -81,7 +81,7 @@ namespace OpenSim.Region.Communications.OGS1
public virtual void AddTemporaryUserProfile(UserProfileData userProfile) public virtual void AddTemporaryUserProfile(UserProfileData userProfile)
{ {
// Not interested // Not interested
} }
public UserProfileData GetUserByUri(Uri uri) public UserProfileData GetUserByUri(Uri uri)
{ {
@ -695,7 +695,7 @@ namespace OpenSim.Region.Communications.OGS1
userData.Partner = UUID.Zero; userData.Partner = UUID.Zero;
return userData; return userData;
} }
protected AvatarAppearance ConvertXMLRPCDataToAvatarAppearance(Hashtable data) protected AvatarAppearance ConvertXMLRPCDataToAvatarAppearance(Hashtable data)
{ {
@ -766,6 +766,6 @@ namespace OpenSim.Region.Communications.OGS1
} }
return buddylist; return buddylist;
} }
} }
} }

Some files were not shown because too many files have changed in this diff Show More