Added patch from Johan. First attempt to solve the LibSL.Packet GC problem. Works with LibSL rev>1532

afrisby
Jeff Ames 2007-12-20 05:43:02 +00:00
parent 8d84156551
commit be2ad79e52
43 changed files with 270 additions and 217 deletions

View File

@ -139,8 +139,8 @@ namespace OpenSim.Framework
{ {
InventoryItem Item = InventoryItems[itemID]; InventoryItem Item = InventoryItems[itemID];
Item.AssetID = asset.FullID; Item.AssetID = asset.FullID;
System.Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated() + System.Console.WriteLine("updated inventory item " + itemID.ToString() +
" so it now is set to asset " + asset.FullID.ToStringHyphenated()); " so it now is set to asset " + asset.FullID.ToString());
//TODO need to update the rest of the info //TODO need to update the rest of the info
} }
return true; return true;
@ -154,7 +154,7 @@ namespace OpenSim.Framework
System.Console.WriteLine("changing name to " + Util.FieldToString(packet.Name)); System.Console.WriteLine("changing name to " + Util.FieldToString(packet.Name));
InventoryItem Item = InventoryItems[itemID]; InventoryItem Item = InventoryItems[itemID];
Item.Name = Util.FieldToString(packet.Name); Item.Name = Util.FieldToString(packet.Name);
System.Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated()); System.Console.WriteLine("updated inventory item " + itemID.ToString());
//TODO need to update the rest of the info //TODO need to update the rest of the info
} }
return true; return true;

View File

@ -232,7 +232,7 @@ namespace OpenSim.Framework.Communications.Cache
for (int i = 0; i < source.Configs.Count; i++) for (int i = 0; i < source.Configs.Count; i++)
{ {
// System.Console.WriteLine("loading asset into database"); // System.Console.WriteLine("loading asset into database");
string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToStringHyphenated()); string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToString());
string name = source.Configs[i].GetString("name", ""); string name = source.Configs[i].GetString("name", "");
sbyte type = (sbyte) source.Configs[i].GetInt("assetType", 0); sbyte type = (sbyte) source.Configs[i].GetInt("assetType", 0);
sbyte invType = (sbyte) source.Configs[i].GetInt("inventoryType", 0); sbyte invType = (sbyte) source.Configs[i].GetInt("inventoryType", 0);

View File

@ -355,7 +355,7 @@ namespace OpenSim.Framework.Communications.Cache
LLUUID inventoryItemID = this.inventoryItemID; LLUUID inventoryItemID = this.inventoryItemID;
string text = ""; string text = "";
LLSDAssetUploadComplete complete = new LLSDAssetUploadComplete(); LLSDAssetUploadComplete complete = new LLSDAssetUploadComplete();
complete.new_asset = newAssetID.ToStringHyphenated(); complete.new_asset = newAssetID.ToString();
complete.new_inventory_item = inventoryItemID; complete.new_inventory_item = inventoryItemID;
complete.state = "complete"; complete.state = "complete";
text = LLSDHelpers.SerialiseLLSDReply(complete); text = LLSDHelpers.SerialiseLLSDReply(complete);
@ -408,7 +408,7 @@ namespace OpenSim.Framework.Communications.Cache
LLUUID inventoryItemID = this.inventoryItemID; LLUUID inventoryItemID = this.inventoryItemID;
string text = ""; string text = "";
LLSDAssetUploadComplete complete = new LLSDAssetUploadComplete(); LLSDAssetUploadComplete complete = new LLSDAssetUploadComplete();
complete.new_asset = newAssetID.ToStringHyphenated(); complete.new_asset = newAssetID.ToString();
complete.new_inventory_item = inventoryItemID; complete.new_inventory_item = inventoryItemID;
complete.state = "complete"; complete.state = "complete";
text = LLSDHelpers.SerialiseLLSDReply(complete); text = LLSDHelpers.SerialiseLLSDReply(complete);

View File

@ -144,8 +144,8 @@ namespace OpenSim.Framework.Communications.Cache
item.avatarID = libOwner; item.avatarID = libOwner;
item.creatorsID = libOwner; item.creatorsID = libOwner;
item.inventoryID = item.inventoryID =
new LLUUID(source.Configs[i].GetString("inventoryID", LLUUID.Random().ToStringHyphenated())); new LLUUID(source.Configs[i].GetString("inventoryID", LLUUID.Random().ToString()));
item.assetID = new LLUUID(source.Configs[i].GetString("assetID", LLUUID.Random().ToStringHyphenated())); item.assetID = new LLUUID(source.Configs[i].GetString("assetID", LLUUID.Random().ToString()));
item.inventoryDescription = source.Configs[i].GetString("description", ""); item.inventoryDescription = source.Configs[i].GetString("description", "");
item.inventoryName = source.Configs[i].GetString("name", ""); item.inventoryName = source.Configs[i].GetString("name", "");
item.assetType = source.Configs[i].GetInt("assetType", 0); item.assetType = source.Configs[i].GetInt("assetType", 0);
@ -167,4 +167,4 @@ namespace OpenSim.Framework.Communications.Cache
} }
} }
} }
} }

View File

@ -421,7 +421,7 @@ namespace OpenSim.Region.Capabilities
LLUUID inv = inventoryItemID; LLUUID inv = inventoryItemID;
string res = ""; string res = "";
LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete(); LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
uploadComplete.new_asset = newAssetID.ToStringHyphenated(); uploadComplete.new_asset = newAssetID.ToString();
uploadComplete.new_inventory_item = inv; uploadComplete.new_inventory_item = inv;
uploadComplete.state = "complete"; uploadComplete.state = "complete";
@ -489,7 +489,7 @@ namespace OpenSim.Region.Capabilities
assetID = OnUpLoad(inv, data); assetID = OnUpLoad(inv, data);
} }
uploadComplete.new_asset = assetID.ToStringHyphenated(); uploadComplete.new_asset = assetID.ToString();
uploadComplete.new_inventory_item = inv; uploadComplete.new_inventory_item = inv;
uploadComplete.state = "complete"; uploadComplete.state = "complete";

View File

@ -159,7 +159,7 @@ namespace OpenSim.Region.Capabilities
{ {
LLUUID u = (LLUUID)obj; LLUUID u = (LLUUID)obj;
writer.WriteStartElement(String.Empty, "uuid", String.Empty); writer.WriteStartElement(String.Empty, "uuid", String.Empty);
writer.WriteString(u.ToStringHyphenated()); writer.WriteString(u.ToString());
writer.WriteEndElement(); writer.WriteEndElement();
} }
else if (obj is Hashtable) else if (obj is Hashtable)
@ -475,7 +475,7 @@ namespace OpenSim.Region.Capabilities
} }
else if (obj is LLUUID) else if (obj is LLUUID)
{ {
return GetSpaces(indent) + "- uuid " + ((LLUUID)obj).ToStringHyphenated() + Environment.NewLine; return GetSpaces(indent) + "- uuid " + ((LLUUID)obj).ToString() + Environment.NewLine;
} }
else if (obj is Hashtable) else if (obj is Hashtable)
{ {

View File

@ -266,9 +266,9 @@ namespace OpenSim.Framework.UserManagement
responseData["sim_port"] = (Int32) SimPort; responseData["sim_port"] = (Int32) SimPort;
responseData["sim_ip"] = SimAddress; responseData["sim_ip"] = SimAddress;
responseData["agent_id"] = AgentID.ToStringHyphenated(); responseData["agent_id"] = AgentID.ToString();
responseData["session_id"] = SessionID.ToStringHyphenated(); responseData["session_id"] = SessionID.ToString();
responseData["secure_session_id"] = SecureSessionID.ToStringHyphenated(); responseData["secure_session_id"] = SecureSessionID.ToString();
responseData["circuit_code"] = CircuitCode; responseData["circuit_code"] = CircuitCode;
responseData["seconds_since_epoch"] = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; responseData["seconds_since_epoch"] = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
responseData["login-flags"] = loginFlags; responseData["login-flags"] = loginFlags;
@ -585,7 +585,7 @@ namespace OpenSim.Framework.UserManagement
Hashtable hTable = new Hashtable(); Hashtable hTable = new Hashtable();
hTable["buddy_rights_has"] = BuddyRightsHave; hTable["buddy_rights_has"] = BuddyRightsHave;
hTable["buddy_rights_given"] = BuddyRightsGiven; hTable["buddy_rights_given"] = BuddyRightsGiven;
hTable["buddy_id"] = BuddyID.ToStringHyphenated(); hTable["buddy_id"] = BuddyID.ToString();
return hTable; return hTable;
} }
} }

View File

@ -126,7 +126,7 @@ namespace OpenSim.Framework.UserManagement
ArrayList AgentInventoryArray = inventData.InventoryArray; ArrayList AgentInventoryArray = inventData.InventoryArray;
Hashtable InventoryRootHash = new Hashtable(); Hashtable InventoryRootHash = new Hashtable();
InventoryRootHash["folder_id"] = inventData.RootFolderID.ToStringHyphenated(); InventoryRootHash["folder_id"] = inventData.RootFolderID.ToString();
ArrayList InventoryRoot = new ArrayList(); ArrayList InventoryRoot = new ArrayList();
InventoryRoot.Add(InventoryRootHash); InventoryRoot.Add(InventoryRootHash);
userProfile.rootInventoryFolderID = inventData.RootFolderID; userProfile.rootInventoryFolderID = inventData.RootFolderID;
@ -136,9 +136,9 @@ namespace OpenSim.Framework.UserManagement
logResponse.Lastname = userProfile.surname; logResponse.Lastname = userProfile.surname;
logResponse.Firstname = userProfile.username; logResponse.Firstname = userProfile.username;
logResponse.AgentID = agentID.ToStringHyphenated(); logResponse.AgentID = agentID.ToString();
logResponse.SessionID = userProfile.currentAgent.sessionID.ToStringHyphenated(); logResponse.SessionID = userProfile.currentAgent.sessionID.ToString();
logResponse.SecureSessionID = userProfile.currentAgent.secureSessionID.ToStringHyphenated(); logResponse.SecureSessionID = userProfile.currentAgent.secureSessionID.ToString();
logResponse.InventoryRoot = InventoryRoot; logResponse.InventoryRoot = InventoryRoot;
logResponse.InventorySkeleton = AgentInventoryArray; logResponse.InventorySkeleton = AgentInventoryArray;
logResponse.InventoryLibrary = GetInventoryLibrary(); logResponse.InventoryLibrary = GetInventoryLibrary();
@ -263,7 +263,7 @@ namespace OpenSim.Framework.UserManagement
//return new ArrayList(); //return new ArrayList();
Hashtable TempHash = new Hashtable(); Hashtable TempHash = new Hashtable();
TempHash["name"] = "OpenSim Library"; TempHash["name"] = "OpenSim Library";
TempHash["parent_id"] = LLUUID.Zero.ToStringHyphenated(); TempHash["parent_id"] = LLUUID.Zero.ToString();
TempHash["version"] = 1; TempHash["version"] = 1;
TempHash["type_default"] = -1; TempHash["type_default"] = -1;
TempHash["folder_id"] = "00000112-000f-0000-0000-000100bba000"; TempHash["folder_id"] = "00000112-000f-0000-0000-000100bba000";
@ -305,10 +305,10 @@ namespace OpenSim.Framework.UserManagement
{ {
TempHash = new Hashtable(); TempHash = new Hashtable();
TempHash["name"] = InvFolder.FolderName; TempHash["name"] = InvFolder.FolderName;
TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); TempHash["parent_id"] = InvFolder.ParentID.ToString();
TempHash["version"] = (Int32) InvFolder.Version; TempHash["version"] = (Int32) InvFolder.Version;
TempHash["type_default"] = (Int32) InvFolder.DefaultType; TempHash["type_default"] = (Int32) InvFolder.DefaultType;
TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); TempHash["folder_id"] = InvFolder.FolderID.ToString();
AgentInventoryArray.Add(TempHash); AgentInventoryArray.Add(TempHash);
} }
@ -327,4 +327,4 @@ namespace OpenSim.Framework.UserManagement
} }
} }
} }
} }

View File

@ -95,7 +95,7 @@ namespace OpenSim.Framework.Data.DB4o
if (manager.simProfiles.ContainsKey(uuid)) if (manager.simProfiles.ContainsKey(uuid))
return manager.simProfiles[uuid]; return manager.simProfiles[uuid];
} }
throw new Exception("Unable to find profile with UUID (" + uuid.ToStringHyphenated() + throw new Exception("Unable to find profile with UUID (" + uuid.ToString() +
"). Total Registered Regions: " + manager.simProfiles.Count); "). Total Registered Regions: " + manager.simProfiles.Count);
} }

View File

@ -72,7 +72,7 @@ namespace OpenSim.Framework.Data.MSSQL
AssetBase asset = null; AssetBase asset = null;
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["id"] = assetID.ToStringHyphenated(); param["id"] = assetID.ToString();
IDbCommand result = database.Query("SELECT * FROM assets WHERE id = @id", param); IDbCommand result = database.Query("SELECT * FROM assets WHERE id = @id", param);
IDataReader reader = result.ExecuteReader(); IDataReader reader = result.ExecuteReader();
@ -105,8 +105,8 @@ namespace OpenSim.Framework.Data.MSSQL
{ {
//SqlParameter p = cmd.Parameters.Add("id", SqlDbType.NVarChar); //SqlParameter p = cmd.Parameters.Add("id", SqlDbType.NVarChar);
//p.Value = asset.FullID.ToStringHyphenated(); //p.Value = asset.FullID.ToString();
cmd.Parameters.AddWithValue("id", asset.FullID.ToStringHyphenated()); cmd.Parameters.AddWithValue("id", asset.FullID.ToString());
cmd.Parameters.AddWithValue("name", asset.Name); cmd.Parameters.AddWithValue("name", asset.Name);
cmd.Parameters.AddWithValue("description", asset.Description); cmd.Parameters.AddWithValue("description", asset.Description);
SqlParameter e = cmd.Parameters.Add("assetType", SqlDbType.TinyInt); SqlParameter e = cmd.Parameters.Add("assetType", SqlDbType.TinyInt);
@ -145,7 +145,7 @@ namespace OpenSim.Framework.Data.MSSQL
"temporary = @temporary," + "temporary = @temporary," +
"data = @data where " + "data = @data where " +
"id = @keyId;", database.getConnection()); "id = @keyId;", database.getConnection());
SqlParameter param1 = new SqlParameter("@id", asset.FullID.ToStringHyphenated()); SqlParameter param1 = new SqlParameter("@id", asset.FullID.ToString());
SqlParameter param2 = new SqlParameter("@name", asset.Name); SqlParameter param2 = new SqlParameter("@name", asset.Name);
SqlParameter param3 = new SqlParameter("@description", asset.Description); SqlParameter param3 = new SqlParameter("@description", asset.Description);
SqlParameter param4 = new SqlParameter("@assetType", asset.Type); SqlParameter param4 = new SqlParameter("@assetType", asset.Type);
@ -153,7 +153,7 @@ namespace OpenSim.Framework.Data.MSSQL
SqlParameter param6 = new SqlParameter("@local", asset.Local); SqlParameter param6 = new SqlParameter("@local", asset.Local);
SqlParameter param7 = new SqlParameter("@temporary", asset.Temporary); SqlParameter param7 = new SqlParameter("@temporary", asset.Temporary);
SqlParameter param8 = new SqlParameter("@data", asset.Data); SqlParameter param8 = new SqlParameter("@data", asset.Data);
SqlParameter param9 = new SqlParameter("@keyId", asset.FullID.ToStringHyphenated()); SqlParameter param9 = new SqlParameter("@keyId", asset.FullID.ToString());
command.Parameters.Add(param1); command.Parameters.Add(param1);
command.Parameters.Add(param2); command.Parameters.Add(param2);
command.Parameters.Add(param3); command.Parameters.Add(param3);
@ -224,4 +224,4 @@ namespace OpenSim.Framework.Data.MSSQL
#endregion #endregion
} }
} }

View File

@ -300,7 +300,7 @@ namespace OpenSim.Framework.Data.MSSQL
SHA512Managed HashProvider = new SHA512Managed(); SHA512Managed HashProvider = new SHA512Managed();
ASCIIEncoding TextProvider = new ASCIIEncoding(); ASCIIEncoding TextProvider = new ASCIIEncoding();
byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge); byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge);
byte[] hash = HashProvider.ComputeHash(stream); byte[] hash = HashProvider.ComputeHash(stream);
return false; return false;
} }

View File

@ -141,7 +141,7 @@ namespace OpenSim.Framework.Data.MSSQL
List<InventoryItemBase> items = new List<InventoryItemBase>(); List<InventoryItemBase> items = new List<InventoryItemBase>();
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["parentFolderID"] = folderID.ToStringHyphenated(); param["parentFolderID"] = folderID.ToString();
IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE parentFolderID = @parentFolderID", param); IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE parentFolderID = @parentFolderID", param);
IDataReader reader = result.ExecuteReader(); IDataReader reader = result.ExecuteReader();
@ -176,8 +176,8 @@ namespace OpenSim.Framework.Data.MSSQL
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["uuid"] = user.ToStringHyphenated(); param["uuid"] = user.ToString();
param["zero"] = LLUUID.Zero.ToStringHyphenated(); param["zero"] = LLUUID.Zero.ToString();
IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param); IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param);
IDataReader reader = result.ExecuteReader(); IDataReader reader = result.ExecuteReader();
@ -209,8 +209,8 @@ namespace OpenSim.Framework.Data.MSSQL
lock (database) lock (database)
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["uuid"] = user.ToStringHyphenated(); param["uuid"] = user.ToString();
param["zero"] = LLUUID.Zero.ToStringHyphenated(); param["zero"] = LLUUID.Zero.ToString();
IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param); IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param);
IDataReader reader = result.ExecuteReader(); IDataReader reader = result.ExecuteReader();
@ -256,7 +256,7 @@ namespace OpenSim.Framework.Data.MSSQL
lock (database) lock (database)
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["parentFolderID"] = parentID.ToStringHyphenated(); param["parentFolderID"] = parentID.ToString();
IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @parentFolderID", param); IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @parentFolderID", param);
@ -328,7 +328,7 @@ namespace OpenSim.Framework.Data.MSSQL
lock (database) lock (database)
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["inventoryID"] = itemID.ToStringHyphenated(); param["inventoryID"] = itemID.ToString();
IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE inventoryID = @inventoryID", param); IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE inventoryID = @inventoryID", param);
IDataReader reader = result.ExecuteReader(); IDataReader reader = result.ExecuteReader();
@ -390,7 +390,7 @@ namespace OpenSim.Framework.Data.MSSQL
lock (database) lock (database)
{ {
Dictionary<string, string> param = new Dictionary<string,string>(); Dictionary<string, string> param = new Dictionary<string,string>();
param["uuid"] = folderID.ToStringHyphenated(); param["uuid"] = folderID.ToString();
IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE folderID = @uuid", param); IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE folderID = @uuid", param);
IDataReader reader = result.ExecuteReader(); IDataReader reader = result.ExecuteReader();
@ -424,17 +424,17 @@ namespace OpenSim.Framework.Data.MSSQL
try try
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["inventoryID"] = item.inventoryID.ToStringHyphenated(); param["inventoryID"] = item.inventoryID.ToString();
param["assetID"] = item.assetID.ToStringHyphenated(); param["assetID"] = item.assetID.ToString();
param["assetType"] = item.assetType.ToString(); param["assetType"] = item.assetType.ToString();
param["parentFolderID"] = item.parentFolderID.ToStringHyphenated(); param["parentFolderID"] = item.parentFolderID.ToString();
param["avatarID"] = item.avatarID.ToStringHyphenated(); param["avatarID"] = item.avatarID.ToString();
param["inventoryName"] = item.inventoryName; param["inventoryName"] = item.inventoryName;
param["inventoryDescription"] = item.inventoryDescription; param["inventoryDescription"] = item.inventoryDescription;
param["inventoryNextPermissions"] = item.inventoryNextPermissions.ToString(); param["inventoryNextPermissions"] = item.inventoryNextPermissions.ToString();
param["inventoryCurrentPermissions"] = item.inventoryCurrentPermissions.ToString(); param["inventoryCurrentPermissions"] = item.inventoryCurrentPermissions.ToString();
param["invType"] = Convert.ToString(item.invType); param["invType"] = Convert.ToString(item.invType);
param["creatorID"] = item.creatorsID.ToStringHyphenated(); param["creatorID"] = item.creatorsID.ToString();
param["inventoryBasePermissions"] = Convert.ToString(item.inventoryBasePermissions); param["inventoryBasePermissions"] = Convert.ToString(item.inventoryBasePermissions);
param["inventoryEveryOnePermissions"] = Convert.ToString(item.inventoryEveryOnePermissions); param["inventoryEveryOnePermissions"] = Convert.ToString(item.inventoryEveryOnePermissions);
@ -469,7 +469,7 @@ namespace OpenSim.Framework.Data.MSSQL
"inventoryBasePermissions = @inventoryBasePermissions" + "inventoryBasePermissions = @inventoryBasePermissions" +
"inventoryEveryOnePermissions = @inventoryEveryOnePermissions) where " + "inventoryEveryOnePermissions = @inventoryEveryOnePermissions) where " +
"invenoryID = @keyInventoryID;", database.getConnection()); "invenoryID = @keyInventoryID;", database.getConnection());
SqlParameter param1 = new SqlParameter("@inventoryID", item.inventoryID.ToStringHyphenated()); SqlParameter param1 = new SqlParameter("@inventoryID", item.inventoryID.ToString());
SqlParameter param2 = new SqlParameter("@assetID", item.assetID); SqlParameter param2 = new SqlParameter("@assetID", item.assetID);
SqlParameter param3 = new SqlParameter("@assetType", item.assetType); SqlParameter param3 = new SqlParameter("@assetType", item.assetType);
SqlParameter param4 = new SqlParameter("@parentFolderID", item.parentFolderID); SqlParameter param4 = new SqlParameter("@parentFolderID", item.parentFolderID);
@ -482,7 +482,7 @@ namespace OpenSim.Framework.Data.MSSQL
SqlParameter param11 = new SqlParameter("@creatorID", item.creatorsID); SqlParameter param11 = new SqlParameter("@creatorID", item.creatorsID);
SqlParameter param12 = new SqlParameter("@inventoryBasePermissions", item.inventoryBasePermissions); SqlParameter param12 = new SqlParameter("@inventoryBasePermissions", item.inventoryBasePermissions);
SqlParameter param13 = new SqlParameter("@inventoryEveryOnePermissions", item.inventoryEveryOnePermissions); SqlParameter param13 = new SqlParameter("@inventoryEveryOnePermissions", item.inventoryEveryOnePermissions);
SqlParameter param14 = new SqlParameter("@keyInventoryID", item.inventoryID.ToStringHyphenated()); SqlParameter param14 = new SqlParameter("@keyInventoryID", item.inventoryID.ToString());
command.Parameters.Add(param1); command.Parameters.Add(param1);
command.Parameters.Add(param2); command.Parameters.Add(param2);
command.Parameters.Add(param3); command.Parameters.Add(param3);
@ -518,7 +518,7 @@ namespace OpenSim.Framework.Data.MSSQL
try try
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["uuid"] = itemID.ToStringHyphenated(); param["uuid"] = itemID.ToString();
IDbCommand cmd = database.Query("DELETE FROM inventoryitems WHERE inventoryID=@uuid", param); IDbCommand cmd = database.Query("DELETE FROM inventoryitems WHERE inventoryID=@uuid", param);
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
@ -544,9 +544,9 @@ namespace OpenSim.Framework.Data.MSSQL
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["folderID"] = folder.folderID.ToStringHyphenated(); param["folderID"] = folder.folderID.ToString();
param["agentID"] = folder.agentID.ToStringHyphenated(); param["agentID"] = folder.agentID.ToString();
param["parentFolderID"] = folder.parentID.ToStringHyphenated(); param["parentFolderID"] = folder.parentID.ToString();
param["folderName"] = folder.name; param["folderName"] = folder.name;
param["type"] = Convert.ToString(folder.type); param["type"] = Convert.ToString(folder.type);
param["version"] = Convert.ToString(folder.version); param["version"] = Convert.ToString(folder.version);
@ -577,13 +577,13 @@ namespace OpenSim.Framework.Data.MSSQL
"type = @type," + "type = @type," +
"version = @version where " + "version = @version where " +
"folderID = @keyFolderID;", database.getConnection()); "folderID = @keyFolderID;", database.getConnection());
SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToStringHyphenated()); SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToString());
SqlParameter param2 = new SqlParameter("@agentID", folder.agentID.ToStringHyphenated()); SqlParameter param2 = new SqlParameter("@agentID", folder.agentID.ToString());
SqlParameter param3 = new SqlParameter("@parentFolderID", folder.parentID.ToStringHyphenated()); SqlParameter param3 = new SqlParameter("@parentFolderID", folder.parentID.ToString());
SqlParameter param4 = new SqlParameter("@folderName", folder.name); SqlParameter param4 = new SqlParameter("@folderName", folder.name);
SqlParameter param5 = new SqlParameter("@type", folder.type); SqlParameter param5 = new SqlParameter("@type", folder.type);
SqlParameter param6 = new SqlParameter("@version", folder.version); SqlParameter param6 = new SqlParameter("@version", folder.version);
SqlParameter param7 = new SqlParameter("@keyFolderID", folder.folderID.ToStringHyphenated()); SqlParameter param7 = new SqlParameter("@keyFolderID", folder.folderID.ToString());
command.Parameters.Add(param1); command.Parameters.Add(param1);
command.Parameters.Add(param2); command.Parameters.Add(param2);
command.Parameters.Add(param3); command.Parameters.Add(param3);
@ -614,9 +614,9 @@ namespace OpenSim.Framework.Data.MSSQL
SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " + SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " +
"parentFolderID = @parentFolderID," + "parentFolderID = @parentFolderID," +
"folderID = @keyFolderID;", database.getConnection()); "folderID = @keyFolderID;", database.getConnection());
SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToStringHyphenated()); SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToString());
SqlParameter param2 = new SqlParameter("@parentFolderID", folder.parentID.ToStringHyphenated()); SqlParameter param2 = new SqlParameter("@parentFolderID", folder.parentID.ToString());
SqlParameter param3 = new SqlParameter("@keyFolderID", folder.folderID.ToStringHyphenated()); SqlParameter param3 = new SqlParameter("@keyFolderID", folder.folderID.ToString());
command.Parameters.Add(param1); command.Parameters.Add(param1);
command.Parameters.Add(param2); command.Parameters.Add(param2);
command.Parameters.Add(param3); command.Parameters.Add(param3);
@ -667,7 +667,7 @@ namespace OpenSim.Framework.Data.MSSQL
try try
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["folderID"] = folderID.ToStringHyphenated(); param["folderID"] = folderID.ToString();
IDbCommand cmd = database.Query("DELETE FROM inventoryfolders WHERE folderID=@folderID", param); IDbCommand cmd = database.Query("DELETE FROM inventoryfolders WHERE folderID=@folderID", param);
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
@ -686,7 +686,7 @@ namespace OpenSim.Framework.Data.MSSQL
try try
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["parentFolderID"] = folderID.ToStringHyphenated(); param["parentFolderID"] = folderID.ToString();
IDbCommand cmd = database.Query("DELETE FROM inventoryitems WHERE parentFolderID=@parentFolderID", param); IDbCommand cmd = database.Query("DELETE FROM inventoryitems WHERE parentFolderID=@parentFolderID", param);

View File

@ -490,7 +490,7 @@ namespace OpenSim.Framework.Data.MSSQL
parameters["regionUserURI"] = profile.regionUserURI; parameters["regionUserURI"] = profile.regionUserURI;
parameters["regionUserRecvKey"] = profile.regionUserRecvKey; parameters["regionUserRecvKey"] = profile.regionUserRecvKey;
parameters["regionUserSendKey"] = profile.regionUserSendKey; parameters["regionUserSendKey"] = profile.regionUserSendKey;
parameters["regionMapTexture"] = profile.regionMapTextureID.ToStringHyphenated(); parameters["regionMapTexture"] = profile.regionMapTextureID.ToString();
parameters["serverHttpPort"] = profile.httpPort.ToString(); parameters["serverHttpPort"] = profile.httpPort.ToString();
parameters["serverRemotingPort"] = profile.remotingPort.ToString(); parameters["serverRemotingPort"] = profile.remotingPort.ToString();
@ -604,7 +604,7 @@ namespace OpenSim.Framework.Data.MSSQL
sql += "@profileFirstText, @profileImage, @profileFirstImage);"; sql += "@profileFirstText, @profileImage, @profileFirstImage);";
Dictionary<string, string> parameters = new Dictionary<string, string>(); Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters["UUID"] = uuid.ToStringHyphenated(); parameters["UUID"] = uuid.ToString();
parameters["username"] = username.ToString(); parameters["username"] = username.ToString();
parameters["lastname"] = lastname.ToString(); parameters["lastname"] = lastname.ToString();
parameters["passwordHash"] = passwordHash.ToString(); parameters["passwordHash"] = passwordHash.ToString();
@ -624,8 +624,8 @@ namespace OpenSim.Framework.Data.MSSQL
parameters["profileWantDoMask"] = "0"; parameters["profileWantDoMask"] = "0";
parameters["profileAboutText"] = ""; parameters["profileAboutText"] = "";
parameters["profileFirstText"] = ""; parameters["profileFirstText"] = "";
parameters["profileImage"] = libsecondlife.LLUUID.Zero.ToStringHyphenated(); parameters["profileImage"] = libsecondlife.LLUUID.Zero.ToString();
parameters["profileFirstImage"] = libsecondlife.LLUUID.Zero.ToStringHyphenated(); parameters["profileFirstImage"] = libsecondlife.LLUUID.Zero.ToString();
bool returnval = false; bool returnval = false;

View File

@ -186,7 +186,7 @@ namespace OpenSim.Framework.Data.MSSQL
lock (database) lock (database)
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["uuid"] = uuid.ToStringHyphenated(); param["uuid"] = uuid.ToString();
IDbCommand result = database.Query("SELECT * FROM users WHERE UUID = @uuid", param); IDbCommand result = database.Query("SELECT * FROM users WHERE UUID = @uuid", param);
IDataReader reader = result.ExecuteReader(); IDataReader reader = result.ExecuteReader();
@ -241,7 +241,7 @@ namespace OpenSim.Framework.Data.MSSQL
lock (database) lock (database)
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["uuid"] = uuid.ToStringHyphenated(); param["uuid"] = uuid.ToString();
IDbCommand result = database.Query("SELECT * FROM agents WHERE UUID = @uuid", param); IDbCommand result = database.Query("SELECT * FROM agents WHERE UUID = @uuid", param);
IDataReader reader = result.ExecuteReader(); IDataReader reader = result.ExecuteReader();
@ -321,7 +321,7 @@ namespace OpenSim.Framework.Data.MSSQL
"profileImage = @profileImage," + "profileImage = @profileImage," +
"profileFirstImage = @profileFirstImage where " + "profileFirstImage = @profileFirstImage where " +
"UUID = @keyUUUID;", database.getConnection()); "UUID = @keyUUUID;", database.getConnection());
SqlParameter param1 = new SqlParameter("@uuid", user.UUID.ToStringHyphenated()); SqlParameter param1 = new SqlParameter("@uuid", user.UUID.ToString());
SqlParameter param2 = new SqlParameter("@username", user.username); SqlParameter param2 = new SqlParameter("@username", user.username);
SqlParameter param3 = new SqlParameter("@lastname", user.surname); SqlParameter param3 = new SqlParameter("@lastname", user.surname);
SqlParameter param4 = new SqlParameter("@passwordHash", user.passwordHash); SqlParameter param4 = new SqlParameter("@passwordHash", user.passwordHash);
@ -341,9 +341,9 @@ namespace OpenSim.Framework.Data.MSSQL
SqlParameter param18 = new SqlParameter("@profileWantDoMask", Convert.ToInt32(user.profileWantDoMask)); SqlParameter param18 = new SqlParameter("@profileWantDoMask", Convert.ToInt32(user.profileWantDoMask));
SqlParameter param19 = new SqlParameter("@profileAboutText", user.profileAboutText); SqlParameter param19 = new SqlParameter("@profileAboutText", user.profileAboutText);
SqlParameter param20 = new SqlParameter("@profileFirstText", user.profileFirstText); SqlParameter param20 = new SqlParameter("@profileFirstText", user.profileFirstText);
SqlParameter param21 = new SqlParameter("@profileImage", libsecondlife.LLUUID.Zero.ToStringHyphenated()); SqlParameter param21 = new SqlParameter("@profileImage", libsecondlife.LLUUID.Zero.ToString());
SqlParameter param22 = new SqlParameter("@profileFirstImage", libsecondlife.LLUUID.Zero.ToStringHyphenated()); SqlParameter param22 = new SqlParameter("@profileFirstImage", libsecondlife.LLUUID.Zero.ToString());
SqlParameter param23 = new SqlParameter("@keyUUUID", user.UUID.ToStringHyphenated()); SqlParameter param23 = new SqlParameter("@keyUUUID", user.UUID.ToString());
command.Parameters.Add(param1); command.Parameters.Add(param1);
command.Parameters.Add(param2); command.Parameters.Add(param2);
command.Parameters.Add(param3); command.Parameters.Add(param3);

View File

@ -304,7 +304,7 @@ namespace OpenSim.Framework.Data.MySQL
lock (database) lock (database)
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["?uuid"] = uuid.ToStringHyphenated(); param["?uuid"] = uuid.ToString();
IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = ?uuid", param); IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = ?uuid", param);
IDataReader reader = result.ExecuteReader(); IDataReader reader = result.ExecuteReader();
@ -377,7 +377,7 @@ namespace OpenSim.Framework.Data.MySQL
SHA512Managed HashProvider = new SHA512Managed(); SHA512Managed HashProvider = new SHA512Managed();
ASCIIEncoding TextProvider = new ASCIIEncoding(); ASCIIEncoding TextProvider = new ASCIIEncoding();
byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge); byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge);
byte[] hash = HashProvider.ComputeHash(stream); byte[] hash = HashProvider.ComputeHash(stream);
return false; return false;

View File

@ -155,7 +155,7 @@ namespace OpenSim.Framework.Data.MySQL
MySqlCommand result = MySqlCommand result =
new MySqlCommand("SELECT * FROM inventoryitems WHERE parentFolderID = ?uuid", new MySqlCommand("SELECT * FROM inventoryitems WHERE parentFolderID = ?uuid",
database.Connection); database.Connection);
result.Parameters.AddWithValue("?uuid", folderID.ToStringHyphenated()); result.Parameters.AddWithValue("?uuid", folderID.ToString());
MySqlDataReader reader = result.ExecuteReader(); MySqlDataReader reader = result.ExecuteReader();
while (reader.Read()) while (reader.Read())
@ -190,8 +190,8 @@ namespace OpenSim.Framework.Data.MySQL
new MySqlCommand( new MySqlCommand(
"SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid",
database.Connection); database.Connection);
result.Parameters.AddWithValue("?uuid", user.ToStringHyphenated()); result.Parameters.AddWithValue("?uuid", user.ToString());
result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToStringHyphenated()); result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToString());
MySqlDataReader reader = result.ExecuteReader(); MySqlDataReader reader = result.ExecuteReader();
List<InventoryFolderBase> items = new List<InventoryFolderBase>(); List<InventoryFolderBase> items = new List<InventoryFolderBase>();
@ -224,8 +224,8 @@ namespace OpenSim.Framework.Data.MySQL
new MySqlCommand( new MySqlCommand(
"SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid",
database.Connection); database.Connection);
result.Parameters.AddWithValue("?uuid", user.ToStringHyphenated()); result.Parameters.AddWithValue("?uuid", user.ToString());
result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToStringHyphenated()); result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToString());
MySqlDataReader reader = result.ExecuteReader(); MySqlDataReader reader = result.ExecuteReader();
@ -275,7 +275,7 @@ namespace OpenSim.Framework.Data.MySQL
MySqlCommand result = MySqlCommand result =
new MySqlCommand("SELECT * FROM inventoryfolders WHERE parentFolderID = ?uuid", new MySqlCommand("SELECT * FROM inventoryfolders WHERE parentFolderID = ?uuid",
database.Connection); database.Connection);
result.Parameters.AddWithValue("?uuid", parentID.ToStringHyphenated()); result.Parameters.AddWithValue("?uuid", parentID.ToString());
MySqlDataReader reader = result.ExecuteReader(); MySqlDataReader reader = result.ExecuteReader();
List<InventoryFolderBase> items = new List<InventoryFolderBase>(); List<InventoryFolderBase> items = new List<InventoryFolderBase>();
@ -346,7 +346,7 @@ namespace OpenSim.Framework.Data.MySQL
MySqlCommand result = MySqlCommand result =
new MySqlCommand("SELECT * FROM inventoryitems WHERE inventoryID = ?uuid", database.Connection); new MySqlCommand("SELECT * FROM inventoryitems WHERE inventoryID = ?uuid", database.Connection);
result.Parameters.AddWithValue("?uuid", itemID.ToStringHyphenated()); result.Parameters.AddWithValue("?uuid", itemID.ToString());
MySqlDataReader reader = result.ExecuteReader(); MySqlDataReader reader = result.ExecuteReader();
InventoryItemBase item = null; InventoryItemBase item = null;
@ -407,7 +407,7 @@ namespace OpenSim.Framework.Data.MySQL
{ {
MySqlCommand result = MySqlCommand result =
new MySqlCommand("SELECT * FROM inventoryfolders WHERE folderID = ?uuid", database.Connection); new MySqlCommand("SELECT * FROM inventoryfolders WHERE folderID = ?uuid", database.Connection);
result.Parameters.AddWithValue("?uuid", folderID.ToStringHyphenated()); result.Parameters.AddWithValue("?uuid", folderID.ToString());
MySqlDataReader reader = result.ExecuteReader(); MySqlDataReader reader = result.ExecuteReader();
reader.Read(); reader.Read();
@ -440,18 +440,18 @@ namespace OpenSim.Framework.Data.MySQL
try try
{ {
MySqlCommand result = new MySqlCommand(sql, database.Connection); MySqlCommand result = new MySqlCommand(sql, database.Connection);
result.Parameters.AddWithValue("?inventoryID", item.inventoryID.ToStringHyphenated()); result.Parameters.AddWithValue("?inventoryID", item.inventoryID.ToString());
result.Parameters.AddWithValue("?assetID", item.assetID.ToStringHyphenated()); result.Parameters.AddWithValue("?assetID", item.assetID.ToString());
result.Parameters.AddWithValue("?assetType", item.assetType.ToString()); result.Parameters.AddWithValue("?assetType", item.assetType.ToString());
result.Parameters.AddWithValue("?parentFolderID", item.parentFolderID.ToStringHyphenated()); result.Parameters.AddWithValue("?parentFolderID", item.parentFolderID.ToString());
result.Parameters.AddWithValue("?avatarID", item.avatarID.ToStringHyphenated()); result.Parameters.AddWithValue("?avatarID", item.avatarID.ToString());
result.Parameters.AddWithValue("?inventoryName", item.inventoryName); result.Parameters.AddWithValue("?inventoryName", item.inventoryName);
result.Parameters.AddWithValue("?inventoryDescription", item.inventoryDescription); result.Parameters.AddWithValue("?inventoryDescription", item.inventoryDescription);
result.Parameters.AddWithValue("?inventoryNextPermissions", item.inventoryNextPermissions.ToString()); result.Parameters.AddWithValue("?inventoryNextPermissions", item.inventoryNextPermissions.ToString());
result.Parameters.AddWithValue("?inventoryCurrentPermissions", result.Parameters.AddWithValue("?inventoryCurrentPermissions",
item.inventoryCurrentPermissions.ToString()); item.inventoryCurrentPermissions.ToString());
result.Parameters.AddWithValue("?invType", item.invType); result.Parameters.AddWithValue("?invType", item.invType);
result.Parameters.AddWithValue("?creatorID", item.creatorsID.ToStringHyphenated()); result.Parameters.AddWithValue("?creatorID", item.creatorsID.ToString());
result.Parameters.AddWithValue("?inventoryBasePermissions", item.inventoryBasePermissions); result.Parameters.AddWithValue("?inventoryBasePermissions", item.inventoryBasePermissions);
result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.inventoryEveryOnePermissions); result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.inventoryEveryOnePermissions);
result.ExecuteNonQuery(); result.ExecuteNonQuery();
@ -482,7 +482,7 @@ namespace OpenSim.Framework.Data.MySQL
{ {
MySqlCommand cmd = MySqlCommand cmd =
new MySqlCommand("DELETE FROM inventoryitems WHERE inventoryID=?uuid", database.Connection); new MySqlCommand("DELETE FROM inventoryitems WHERE inventoryID=?uuid", database.Connection);
cmd.Parameters.AddWithValue("?uuid", itemID.ToStringHyphenated()); cmd.Parameters.AddWithValue("?uuid", itemID.ToString());
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
catch (MySqlException e) catch (MySqlException e)
@ -503,9 +503,9 @@ namespace OpenSim.Framework.Data.MySQL
sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName, ?type, ?version)"; sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName, ?type, ?version)";
MySqlCommand cmd = new MySqlCommand(sql, database.Connection); MySqlCommand cmd = new MySqlCommand(sql, database.Connection);
cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToStringHyphenated()); cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToString());
cmd.Parameters.AddWithValue("?agentID", folder.agentID.ToStringHyphenated()); cmd.Parameters.AddWithValue("?agentID", folder.agentID.ToString());
cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToStringHyphenated()); cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToString());
cmd.Parameters.AddWithValue("?folderName", folder.name); cmd.Parameters.AddWithValue("?folderName", folder.name);
cmd.Parameters.AddWithValue("?type", (short) folder.type); cmd.Parameters.AddWithValue("?type", (short) folder.type);
cmd.Parameters.AddWithValue("?version", folder.version); cmd.Parameters.AddWithValue("?version", folder.version);
@ -538,8 +538,8 @@ namespace OpenSim.Framework.Data.MySQL
"UPDATE inventoryfolders SET parentFolderID=?parentFolderID WHERE folderID=?folderID"; "UPDATE inventoryfolders SET parentFolderID=?parentFolderID WHERE folderID=?folderID";
MySqlCommand cmd = new MySqlCommand(sql, database.Connection); MySqlCommand cmd = new MySqlCommand(sql, database.Connection);
cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToStringHyphenated()); cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToString());
cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToStringHyphenated()); cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToString());
try try
@ -587,7 +587,7 @@ namespace OpenSim.Framework.Data.MySQL
{ {
MySqlCommand cmd = MySqlCommand cmd =
new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid", database.Connection); new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid", database.Connection);
cmd.Parameters.AddWithValue("?uuid", folderID.ToStringHyphenated()); cmd.Parameters.AddWithValue("?uuid", folderID.ToString());
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
catch (MySqlException e) catch (MySqlException e)
@ -603,7 +603,7 @@ namespace OpenSim.Framework.Data.MySQL
{ {
MySqlCommand cmd = MySqlCommand cmd =
new MySqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=?uuid", database.Connection); new MySqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=?uuid", database.Connection);
cmd.Parameters.AddWithValue("?uuid", folderID.ToStringHyphenated()); cmd.Parameters.AddWithValue("?uuid", folderID.ToString());
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
catch (MySqlException e) catch (MySqlException e)

View File

@ -549,7 +549,7 @@ namespace OpenSim.Framework.Data.MySQL
sql += "?profileFirstText, ?profileImage, ?profileFirstImage)"; sql += "?profileFirstText, ?profileImage, ?profileFirstImage)";
Dictionary<string, string> parameters = new Dictionary<string, string>(); Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters["?UUID"] = uuid.ToStringHyphenated(); parameters["?UUID"] = uuid.ToString();
parameters["?username"] = username.ToString(); parameters["?username"] = username.ToString();
parameters["?lastname"] = lastname.ToString(); parameters["?lastname"] = lastname.ToString();
parameters["?passwordHash"] = passwordHash.ToString(); parameters["?passwordHash"] = passwordHash.ToString();
@ -569,8 +569,8 @@ namespace OpenSim.Framework.Data.MySQL
parameters["?profileWantDoMask"] = "0"; parameters["?profileWantDoMask"] = "0";
parameters["?profileAboutText"] = ""; parameters["?profileAboutText"] = "";
parameters["?profileFirstText"] = ""; parameters["?profileFirstText"] = "";
parameters["?profileImage"] = LLUUID.Zero.ToStringHyphenated(); parameters["?profileImage"] = LLUUID.Zero.ToString();
parameters["?profileFirstImage"] = LLUUID.Zero.ToStringHyphenated(); parameters["?profileFirstImage"] = LLUUID.Zero.ToString();
bool returnval = false; bool returnval = false;
@ -618,7 +618,7 @@ namespace OpenSim.Framework.Data.MySQL
parameters["?regionHandle"] = regiondata.regionHandle.ToString(); parameters["?regionHandle"] = regiondata.regionHandle.ToString();
parameters["?regionName"] = regiondata.regionName.ToString(); parameters["?regionName"] = regiondata.regionName.ToString();
parameters["?uuid"] = regiondata.UUID.ToStringHyphenated(); parameters["?uuid"] = regiondata.UUID.ToString();
parameters["?regionRecvKey"] = regiondata.regionRecvKey.ToString(); parameters["?regionRecvKey"] = regiondata.regionRecvKey.ToString();
parameters["?regionSecret"] = regiondata.regionSecret.ToString(); parameters["?regionSecret"] = regiondata.regionSecret.ToString();
parameters["?regionSendKey"] = regiondata.regionSendKey.ToString(); parameters["?regionSendKey"] = regiondata.regionSendKey.ToString();
@ -639,7 +639,7 @@ namespace OpenSim.Framework.Data.MySQL
parameters["?regionUserURI"] = regiondata.regionUserURI.ToString(); parameters["?regionUserURI"] = regiondata.regionUserURI.ToString();
parameters["?regionUserRecvKey"] = regiondata.regionUserRecvKey.ToString(); parameters["?regionUserRecvKey"] = regiondata.regionUserRecvKey.ToString();
parameters["?regionUserSendKey"] = regiondata.regionUserSendKey.ToString(); parameters["?regionUserSendKey"] = regiondata.regionUserSendKey.ToString();
parameters["?regionMapTexture"] = regiondata.regionMapTextureID.ToStringHyphenated(); parameters["?regionMapTexture"] = regiondata.regionMapTextureID.ToString();
parameters["?serverHttpPort"] = regiondata.httpPort.ToString(); parameters["?serverHttpPort"] = regiondata.httpPort.ToString();
parameters["?serverRemotingPort"] = regiondata.remotingPort.ToString(); parameters["?serverRemotingPort"] = regiondata.remotingPort.ToString();

View File

@ -237,7 +237,7 @@ namespace OpenSim.Framework.Data.MySQL
lock (database) lock (database)
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["?uuid"] = uuid.ToStringHyphenated(); param["?uuid"] = uuid.ToString();
IDbCommand result = database.Query("SELECT * FROM users WHERE UUID = ?uuid", param); IDbCommand result = database.Query("SELECT * FROM users WHERE UUID = ?uuid", param);
IDataReader reader = result.ExecuteReader(); IDataReader reader = result.ExecuteReader();
@ -292,7 +292,7 @@ namespace OpenSim.Framework.Data.MySQL
lock (database) lock (database)
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["?uuid"] = uuid.ToStringHyphenated(); param["?uuid"] = uuid.ToString();
IDbCommand result = database.Query("SELECT * FROM agents WHERE UUID = ?uuid", param); IDbCommand result = database.Query("SELECT * FROM agents WHERE UUID = ?uuid", param);
IDataReader reader = result.ExecuteReader(); IDataReader reader = result.ExecuteReader();

View File

@ -119,7 +119,7 @@ namespace OpenSim.Framework.Data.SQLite
public RegionProfileData GetProfileByLLUUID(LLUUID uuid) public RegionProfileData GetProfileByLLUUID(LLUUID uuid)
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["uuid"] = uuid.ToStringHyphenated(); param["uuid"] = uuid.ToString();
IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param);
IDataReader reader = result.ExecuteReader(); IDataReader reader = result.ExecuteReader();
@ -190,7 +190,7 @@ namespace OpenSim.Framework.Data.SQLite
SHA512Managed HashProvider = new SHA512Managed(); SHA512Managed HashProvider = new SHA512Managed();
ASCIIEncoding TextProvider = new ASCIIEncoding(); ASCIIEncoding TextProvider = new ASCIIEncoding();
byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge); byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge);
byte[] hash = HashProvider.ComputeHash(stream); byte[] hash = HashProvider.ComputeHash(stream);
return false; return false;

View File

@ -269,7 +269,7 @@ namespace OpenSim.Framework
public void LoadFromNiniSource(IConfigSource source, string sectionName) public void LoadFromNiniSource(IConfigSource source, string sectionName)
{ {
string errorMessage = ""; string errorMessage = "";
this.RegionID = new LLUUID(source.Configs[sectionName].GetString("Region_ID", LLUUID.Random().ToStringHyphenated())); this.RegionID = new LLUUID(source.Configs[sectionName].GetString("Region_ID", LLUUID.Random().ToString()));
this.RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test"); this.RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test");
this.m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000")); this.m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000"));
this.m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000")); this.m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000"));
@ -317,8 +317,8 @@ namespace OpenSim.Framework
configMember.addConfigurationOption("internal_ip_address", ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS, "Internal IP Address for incoming UDP client connections", "0.0.0.0", false); configMember.addConfigurationOption("internal_ip_address", ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS, "Internal IP Address for incoming UDP client connections", "0.0.0.0", false);
configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Internal IP Port for incoming UDP client connections", NetworkServersInfo.DefaultHttpListenerPort.ToString(), false); configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Internal IP Port for incoming UDP client connections", NetworkServersInfo.DefaultHttpListenerPort.ToString(), false);
configMember.addConfigurationOption("external_host_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "External Host Name", "127.0.0.1", false); configMember.addConfigurationOption("external_host_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "External Host Name", "127.0.0.1", false);
configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Master Avatar UUID", LLUUID.Zero.ToStringHyphenated(), true); configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Master Avatar UUID", LLUUID.Zero.ToString(), true);
configMember.addConfigurationOption("estate_covanant_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Estate Covenant", LLUUID.Zero.ToStringHyphenated(), true); configMember.addConfigurationOption("estate_covanant_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Estate Covenant", LLUUID.Zero.ToString(), true);
configMember.addConfigurationOption("master_avatar_first", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "First Name of Master Avatar", "Test", false,(ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked); configMember.addConfigurationOption("master_avatar_first", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "First Name of Master Avatar", "Test", false,(ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked);
configMember.addConfigurationOption("master_avatar_last", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Last Name of Master Avatar", "User", false, (ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked); configMember.addConfigurationOption("master_avatar_last", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Last Name of Master Avatar", "User", false, (ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked);
configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "(Sandbox Mode Only)Password for Master Avatar account", "test", false, (ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked); configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "(Sandbox Mode Only)Password for Master Avatar account", "test", false, (ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked);
@ -326,7 +326,7 @@ namespace OpenSim.Framework
public bool shouldMasterAvatarDetailsBeAsked(string configuration_key) public bool shouldMasterAvatarDetailsBeAsked(string configuration_key)
{ {
if (MasterAvatarAssignedUUID.Equals(null) || MasterAvatarAssignedUUID.ToStringHyphenated() == LLUUID.Zero.ToStringHyphenated()) if (MasterAvatarAssignedUUID.Equals(null) || MasterAvatarAssignedUUID.ToString() == LLUUID.Zero.ToString())
{ {
return true; return true;
} }

View File

@ -152,7 +152,7 @@ namespace OpenSim.Framework
public static string GetRandomCapsPath() public static string GetRandomCapsPath()
{ {
LLUUID caps = LLUUID.Random(); LLUUID caps = LLUUID.Random();
string capsPath = caps.ToStringHyphenated(); string capsPath = caps.ToString();
capsPath = capsPath.Remove(capsPath.Length - 4, 4); capsPath = capsPath.Remove(capsPath.Length - 4, 4);
return capsPath; return capsPath;
} }

View File

@ -206,7 +206,7 @@ namespace OpenSim.Grid.AssetServer
for (int i = 0; i < source.Configs.Count; i++) for (int i = 0; i < source.Configs.Count; i++)
{ {
string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToStringHyphenated()); string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToString());
string name = source.Configs[i].GetString("name", ""); string name = source.Configs[i].GetString("name", "");
sbyte type = (sbyte) source.Configs[i].GetInt("assetType", 0); sbyte type = (sbyte) source.Configs[i].GetInt("assetType", 0);
sbyte invType = (sbyte) source.Configs[i].GetInt("inventoryType", 0); sbyte invType = (sbyte) source.Configs[i].GetInt("inventoryType", 0);

View File

@ -234,7 +234,7 @@ namespace OpenSim.Grid.GridServer
{ {
TheSim = getRegion(new LLUUID((string) requestData["UUID"])); TheSim = getRegion(new LLUUID((string) requestData["UUID"]));
// logToDB((new LLUUID((string)requestData["UUID"])).ToStringHyphenated(),"XmlRpcSimulatorLoginMethod","", 5,"Region attempting login with UUID."); // logToDB((new LLUUID((string)requestData["UUID"])).ToString(),"XmlRpcSimulatorLoginMethod","", 5,"Region attempting login with UUID.");
} }
else if (requestData.ContainsKey("region_handle")) else if (requestData.ContainsKey("region_handle"))
{ {
@ -316,7 +316,7 @@ namespace OpenSim.Grid.GridServer
catch (Exception e) catch (Exception e)
{ {
MainLog.Instance.Warn("storage", MainLog.Instance.Warn("storage",
"Unable to add region " + TheSim.UUID.ToStringHyphenated() + " via " + kvp.Key); "Unable to add region " + TheSim.UUID.ToString() + " via " + kvp.Key);
MainLog.Instance.Warn("storage", e.ToString()); MainLog.Instance.Warn("storage", e.ToString());
} }
@ -502,7 +502,7 @@ namespace OpenSim.Grid.GridServer
simProfileBlock["sim_ip"] = aSim.Value.serverIP.ToString(); simProfileBlock["sim_ip"] = aSim.Value.serverIP.ToString();
simProfileBlock["sim_port"] = aSim.Value.serverPort.ToString(); simProfileBlock["sim_port"] = aSim.Value.serverPort.ToString();
simProfileBlock["sim_uri"] = aSim.Value.serverURI.ToString(); simProfileBlock["sim_uri"] = aSim.Value.serverURI.ToString();
simProfileBlock["uuid"] = aSim.Value.UUID.ToStringHyphenated(); simProfileBlock["uuid"] = aSim.Value.UUID.ToString();
simProfileBlock["remoting_port"] = aSim.Value.remotingPort; simProfileBlock["remoting_port"] = aSim.Value.remotingPort;
simProfileList.Add(simProfileBlock); simProfileList.Add(simProfileBlock);
@ -529,14 +529,14 @@ namespace OpenSim.Grid.GridServer
simProfileBlock["region-flags"] = 0; simProfileBlock["region-flags"] = 0;
simProfileBlock["water-height"] = 20; simProfileBlock["water-height"] = 20;
simProfileBlock["agents"] = 1; simProfileBlock["agents"] = 1;
simProfileBlock["map-image-id"] = simProfile.regionMapTextureID.ToStringHyphenated(); simProfileBlock["map-image-id"] = simProfile.regionMapTextureID.ToString();
// For Sugilite compatibility // For Sugilite compatibility
simProfileBlock["regionhandle"] = simProfile.regionHandle.ToString(); simProfileBlock["regionhandle"] = simProfile.regionHandle.ToString();
simProfileBlock["sim_ip"] = simProfile.serverIP.ToString(); simProfileBlock["sim_ip"] = simProfile.serverIP.ToString();
simProfileBlock["sim_port"] = simProfile.serverPort.ToString(); simProfileBlock["sim_port"] = simProfile.serverPort.ToString();
simProfileBlock["sim_uri"] = simProfile.serverURI.ToString(); simProfileBlock["sim_uri"] = simProfile.serverURI.ToString();
simProfileBlock["uuid"] = simProfile.UUID.ToStringHyphenated(); simProfileBlock["uuid"] = simProfile.UUID.ToString();
simProfileList.Add(simProfileBlock); simProfileList.Add(simProfileBlock);
} }
@ -721,7 +721,7 @@ namespace OpenSim.Grid.GridServer
{ {
kvp.Value.AddProfile(TheSim); kvp.Value.AddProfile(TheSim);
MainLog.Instance.Verbose("grid", "New sim added to grid (" + TheSim.regionName + ")"); MainLog.Instance.Verbose("grid", "New sim added to grid (" + TheSim.regionName + ")");
logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, logToDB(TheSim.UUID.ToString(), "RestSetSimMethod", "", 5,
"Region successfully updated and connected to grid."); "Region successfully updated and connected to grid.");
} }
else else

View File

@ -108,7 +108,7 @@ namespace OpenSim.Grid.InventoryServer
{ {
LLUUID userID = new LLUUID(rawUserID); LLUUID userID = new LLUUID(rawUserID);
MainLog.Instance.Verbose("INVENTORY", "Request for inventory for " + userID.ToStringHyphenated()); MainLog.Instance.Verbose("INVENTORY", "Request for inventory for " + userID.ToString());
InventoryCollection invCollection = new InventoryCollection(); InventoryCollection invCollection = new InventoryCollection();
List<InventoryFolderBase> folders; List<InventoryFolderBase> folders;
@ -127,7 +127,7 @@ namespace OpenSim.Grid.InventoryServer
LLUUID userID = new LLUUID(rawUserID); LLUUID userID = new LLUUID(rawUserID);
MainLog.Instance.Verbose( MainLog.Instance.Verbose(
"INVENTORY", "Creating new set of inventory folders for " + userID.ToStringHyphenated()); "INVENTORY", "Creating new set of inventory folders for " + userID.ToString());
CreateNewUserInventory(userID); CreateNewUserInventory(userID);
return true; return true;
@ -154,7 +154,7 @@ namespace OpenSim.Grid.InventoryServer
// Right now, this actions act more like an update/insert combination than a simple create. // Right now, this actions act more like an update/insert combination than a simple create.
MainLog.Instance.Verbose( MainLog.Instance.Verbose(
"INVENTORY", "INVENTORY",
"Updating in " + folder.parentID.ToStringHyphenated() "Updating in " + folder.parentID.ToString()
+ ", folder " + folder.name); + ", folder " + folder.name);
AddNewInventoryFolder(folder.agentID, folder); AddNewInventoryFolder(folder.agentID, folder);
@ -166,7 +166,7 @@ namespace OpenSim.Grid.InventoryServer
MainLog.Instance.Verbose( MainLog.Instance.Verbose(
"INVENTORY", "INVENTORY",
"Moving folder " + folder.folderID "Moving folder " + folder.folderID
+ " to " + folder.parentID.ToStringHyphenated()); + " to " + folder.parentID.ToString());
MoveExistingInventoryFolder(folder); MoveExistingInventoryFolder(folder);
return true; return true;
@ -177,7 +177,7 @@ namespace OpenSim.Grid.InventoryServer
// Right now, this actions act more like an update/insert combination than a simple create. // Right now, this actions act more like an update/insert combination than a simple create.
MainLog.Instance.Verbose( MainLog.Instance.Verbose(
"INVENTORY", "INVENTORY",
"Updating in " + item.parentFolderID.ToStringHyphenated() "Updating in " + item.parentFolderID.ToString()
+ ", item " + item.inventoryName); + ", item " + item.inventoryName);
AddNewInventoryItem(item.avatarID, item); AddNewInventoryItem(item.avatarID, item);
@ -189,7 +189,7 @@ namespace OpenSim.Grid.InventoryServer
// extra spaces to align with other inventory messages // extra spaces to align with other inventory messages
MainLog.Instance.Verbose( MainLog.Instance.Verbose(
"INVENTORY", "INVENTORY",
"Deleting in " + item.parentFolderID.ToStringHyphenated() "Deleting in " + item.parentFolderID.ToString()
+ ", item " + item.inventoryName); + ", item " + item.inventoryName);
DeleteItem(item); DeleteItem(item);

View File

@ -164,13 +164,13 @@ namespace OpenSim.Grid.InventoryServer
private byte[] GetUserInventory(LLUUID userID) private byte[] GetUserInventory(LLUUID userID)
{ {
MainLog.Instance.Notice(OpenInventory_Main.LogName, "Getting Inventory for user {0}", userID.ToStringHyphenated()); MainLog.Instance.Notice(OpenInventory_Main.LogName, "Getting Inventory for user {0}", userID.ToString());
byte[] result = new byte[] { }; byte[] result = new byte[] { };
InventoryFolderBase fb = _manager._databasePlugin.getUserRootFolder(userID); InventoryFolderBase fb = _manager._databasePlugin.getUserRootFolder(userID);
if (fb == null) if (fb == null)
{ {
MainLog.Instance.Notice(OpenInventory_Main.LogName, "Inventory not found for user {0}, creating new", userID.ToStringHyphenated()); MainLog.Instance.Notice(OpenInventory_Main.LogName, "Inventory not found for user {0}, creating new", userID.ToString());
CreateDefaultInventory(userID); CreateDefaultInventory(userID);
} }

View File

@ -820,7 +820,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler
public string llGetOwner() public string llGetOwner()
{ {
return m_host.ObjectOwner.ToStringHyphenated(); return m_host.ObjectOwner.ToString();
} }
public void llInstantMessage(string user, string message) public void llInstantMessage(string user, string message)
@ -840,7 +840,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler
public string llGetKey() public string llGetKey()
{ {
return m_host.UUID.ToStringHyphenated(); return m_host.UUID.ToString();
} }
public void llSetBuoyancy(double buoyancy) public void llSetBuoyancy(double buoyancy)
@ -1234,7 +1234,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler
public string llList2Key(List<string> src, int index) public string llList2Key(List<string> src, int index)
{ {
//return OpenSim.Framework.ToStringHyphenated(src[index]); //return OpenSim.Framework.ToString(src[index]);
return src[index].ToString(); return src[index].ToString();
} }
@ -1923,7 +1923,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler
public string llGetCreator() public string llGetCreator()
{ {
return m_host.ObjectCreator.ToStringHyphenated(); return m_host.ObjectCreator.ToString();
} }
public string llGetTimestamp() public string llGetTimestamp()
@ -2265,14 +2265,14 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler
LLUUID createdTexture = LLUUID createdTexture =
textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
extraParams, timer); extraParams, timer);
return createdTexture.ToStringHyphenated(); return createdTexture.ToString();
} }
else else
{ {
//TODO update existing dynamic textures //TODO update existing dynamic textures
} }
return LLUUID.Zero.ToStringHyphenated(); return LLUUID.Zero.ToString();
} }
private void NotImplemented(string Command) private void NotImplemented(string Command)
@ -2281,4 +2281,4 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler
throw new NotImplementedException("Command not implemented: " + Command); throw new NotImplementedException("Command not implemented: " + Command);
} }
} }
} }

View File

@ -246,10 +246,10 @@ namespace OpenSim.Grid.UserServer
} }
TempHash = new Hashtable(); TempHash = new Hashtable();
TempHash["name"] = InvFolder.name; TempHash["name"] = InvFolder.name;
TempHash["parent_id"] = InvFolder.parentID.ToStringHyphenated(); TempHash["parent_id"] = InvFolder.parentID.ToString();
TempHash["version"] = (Int32)InvFolder.version; TempHash["version"] = (Int32)InvFolder.version;
TempHash["type_default"] = (Int32)InvFolder.type; TempHash["type_default"] = (Int32)InvFolder.type;
TempHash["folder_id"] = InvFolder.folderID.ToStringHyphenated(); TempHash["folder_id"] = InvFolder.folderID.ToString();
AgentInventoryArray.Add(TempHash); AgentInventoryArray.Add(TempHash);
} }
return new InventoryData(AgentInventoryArray, rootID); return new InventoryData(AgentInventoryArray, rootID);
@ -268,10 +268,10 @@ namespace OpenSim.Grid.UserServer
{ {
TempHash = new Hashtable(); TempHash = new Hashtable();
TempHash["name"] = InvFolder.FolderName; TempHash["name"] = InvFolder.FolderName;
TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); TempHash["parent_id"] = InvFolder.ParentID.ToString();
TempHash["version"] = (Int32)InvFolder.Version; TempHash["version"] = (Int32)InvFolder.Version;
TempHash["type_default"] = (Int32)InvFolder.DefaultType; TempHash["type_default"] = (Int32)InvFolder.DefaultType;
TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); TempHash["folder_id"] = InvFolder.FolderID.ToString();
AgentInventoryArray.Add(TempHash); AgentInventoryArray.Add(TempHash);
} }

View File

@ -76,12 +76,12 @@ namespace OpenSim.Grid.UserServer
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable(); Hashtable responseData = new Hashtable();
// Query Result Information // Query Result Information
responseData["queryid"] = (string)queryID.ToStringHyphenated(); responseData["queryid"] = (string)queryID.ToString();
responseData["avcount"] = (string)returnUsers.Count.ToString(); responseData["avcount"] = (string)returnUsers.Count.ToString();
for (int i = 0; i < returnUsers.Count; i++) for (int i = 0; i < returnUsers.Count; i++)
{ {
responseData["avatarid" + i.ToString()] = returnUsers[i].AvatarID.ToStringHyphenated(); responseData["avatarid" + i.ToString()] = returnUsers[i].AvatarID.ToString();
responseData["firstname" + i.ToString()] = returnUsers[i].firstName; responseData["firstname" + i.ToString()] = returnUsers[i].firstName;
responseData["lastname" + i.ToString()] = returnUsers[i].lastName; responseData["lastname" + i.ToString()] = returnUsers[i].lastName;
} }
@ -102,17 +102,17 @@ namespace OpenSim.Grid.UserServer
// Account information // Account information
responseData["firstname"] = profile.username; responseData["firstname"] = profile.username;
responseData["lastname"] = profile.surname; responseData["lastname"] = profile.surname;
responseData["uuid"] = profile.UUID.ToStringHyphenated(); responseData["uuid"] = profile.UUID.ToString();
// Server Information // Server Information
responseData["server_inventory"] = profile.userInventoryURI; responseData["server_inventory"] = profile.userInventoryURI;
responseData["server_asset"] = profile.userAssetURI; responseData["server_asset"] = profile.userAssetURI;
// Profile Information // Profile Information
responseData["profile_about"] = profile.profileAboutText; responseData["profile_about"] = profile.profileAboutText;
responseData["profile_firstlife_about"] = profile.profileFirstText; responseData["profile_firstlife_about"] = profile.profileFirstText;
responseData["profile_firstlife_image"] = profile.profileFirstImage.ToStringHyphenated(); responseData["profile_firstlife_image"] = profile.profileFirstImage.ToString();
responseData["profile_can_do"] = profile.profileCanDoMask.ToString(); responseData["profile_can_do"] = profile.profileCanDoMask.ToString();
responseData["profile_want_do"] = profile.profileWantDoMask.ToString(); responseData["profile_want_do"] = profile.profileWantDoMask.ToString();
responseData["profile_image"] = profile.profileImage.ToStringHyphenated(); responseData["profile_image"] = profile.profileImage.ToString();
responseData["profile_created"] = profile.created.ToString(); responseData["profile_created"] = profile.created.ToString();
responseData["profile_lastlogin"] = profile.lastLogin.ToString(); responseData["profile_lastlogin"] = profile.lastLogin.ToString();
// Home region information // Home region information
@ -137,7 +137,7 @@ namespace OpenSim.Grid.UserServer
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
Hashtable requestData = (Hashtable)request.Params[0]; Hashtable requestData = (Hashtable)request.Params[0];
List<AvatarPickerAvatar> returnAvatar = new List<AvatarPickerAvatar>(); List<AvatarPickerAvatar> returnAvatar = new List<AvatarPickerAvatar>();
LLUUID queryID = new LLUUID(LLUUID.Zero.ToStringHyphenated()); LLUUID queryID = new LLUUID(LLUUID.Zero.ToString());
if (requestData.Contains("avquery") && requestData.Contains("queryid")) if (requestData.Contains("avquery") && requestData.Contains("queryid"))
{ {

View File

@ -535,7 +535,7 @@ namespace OpenSim.Region.ClientStack
/// <param name="regionInfo"></param> /// <param name="regionInfo"></param>
public void SendRegionHandshake(RegionInfo regionInfo) public void SendRegionHandshake(RegionInfo regionInfo)
{ {
RegionHandshakePacket handshake = new RegionHandshakePacket(); RegionHandshakePacket handshake = (RegionHandshakePacket) PacketPool.Instance.GetPacket(PacketType.RegionHandshake);
handshake.RegionInfo.BillableFactor = regionInfo.EstateSettings.billableFactor; handshake.RegionInfo.BillableFactor = regionInfo.EstateSettings.billableFactor;
handshake.RegionInfo.IsEstateManager = false; handshake.RegionInfo.IsEstateManager = false;
@ -2187,17 +2187,22 @@ namespace OpenSim.Region.ClientStack
// Actually make the byte array and send it // Actually make the byte array and send it
try try
{ {
byte[] sendbuffer = Pack.ToBytes(); byte[] sendbuffer = Pack.ToBytes();
if (Pack.Header.Zerocoded) if (Pack is RegionHandshakePacket)
{ {
byte[] ZeroOutBuffer = new byte[4096]; PacketPool.Instance.ReturnPacket(Pack);
int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer); }
m_networkServer.SendPacketTo(ZeroOutBuffer, packetsize, SocketFlags.None, m_circuitCode);
} if (Pack.Header.Zerocoded)
else {
{ byte[] ZeroOutBuffer = new byte[4096];
m_networkServer.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, m_circuitCode); int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer);
} m_networkServer.SendPacketTo(ZeroOutBuffer, packetsize, SocketFlags.None, m_circuitCode);
}
else
{
m_networkServer.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, m_circuitCode);
}
} }
catch (Exception e) catch (Exception e)
{ {
@ -2801,7 +2806,7 @@ namespace OpenSim.Region.ClientStack
case PacketType.AssetUploadRequest: case PacketType.AssetUploadRequest:
AssetUploadRequestPacket request = (AssetUploadRequestPacket) Pack; AssetUploadRequestPacket request = (AssetUploadRequestPacket) Pack;
// Console.WriteLine("upload request " + Pack.ToString()); // Console.WriteLine("upload request " + Pack.ToString());
// Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToStringHyphenated()); // Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString());
if (OnAssetUploadRequest != null) if (OnAssetUploadRequest != null)
{ {
LLUUID temp=libsecondlife.LLUUID.Combine(request.AssetBlock.TransactionID, SecureSessionId); LLUUID temp=libsecondlife.LLUUID.Combine(request.AssetBlock.TransactionID, SecureSessionId);
@ -2928,7 +2933,7 @@ namespace OpenSim.Region.ClientStack
AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionId)); AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionId));
if (asset != null) if (asset != null)
{ {
// Console.WriteLine("updating inventory item, found asset" + asset.FullID.ToStringHyphenated() + " already in cache"); // Console.WriteLine("updating inventory item, found asset" + asset.FullID.ToString() + " already in cache");
m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset); m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset);
} }
else else
@ -2936,7 +2941,7 @@ namespace OpenSim.Region.ClientStack
asset = this.UploadAssets.AddUploadToAssetCache(update.InventoryData[i].TransactionID); asset = this.UploadAssets.AddUploadToAssetCache(update.InventoryData[i].TransactionID);
if (asset != null) if (asset != null)
{ {
//Console.WriteLine("updating inventory item, adding asset" + asset.FullID.ToStringHyphenated() + " to cache"); //Console.WriteLine("updating inventory item, adding asset" + asset.FullID.ToString() + " to cache");
m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset); m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset);
} }
else else
@ -3351,6 +3356,8 @@ namespace OpenSim.Region.ClientStack
#endregion #endregion
} }
} }
PacketPool.Instance.ReturnPacket(Pack);
} }
private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket)

View File

@ -134,7 +134,7 @@ namespace OpenSim.Region.ClientStack
if (masterAvatar != null) if (masterAvatar != null)
{ {
m_log.Verbose("PARCEL", "Found master avatar [" + masterAvatar.UUID.ToStringHyphenated() + "]"); m_log.Verbose("PARCEL", "Found master avatar [" + masterAvatar.UUID.ToString() + "]");
scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID;
} }
else else

View File

@ -26,6 +26,7 @@
* *
*/ */
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net; using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
@ -36,6 +37,68 @@ using OpenSim.Framework.Console;
namespace OpenSim.Region.ClientStack namespace OpenSim.Region.ClientStack
{ {
public sealed class PacketPool
{
// Set up a thread-safe singleton pattern
static PacketPool()
{
}
static readonly PacketPool instance = new PacketPool();
public static PacketPool Instance
{
get
{
return instance;
}
}
private Hashtable pool = new Hashtable();
public Packet GetPacket(PacketType type) {
Packet packet = null;
lock(pool)
{
if(pool[type] == null || ((Stack) pool[type]).Count == 0)
{
// Creating a new packet if we cannot reuse an old package
packet = Packet.BuildPacket(type);
}
else
{
// Recycle old packages
packet=(Packet) ((Stack) pool[type]).Pop();
}
}
return packet;
}
public Packet GetPacket(byte[] bytes, ref int packetEnd, byte[] zeroBuffer) {
Packet packet = GetPacket(Packet.GetType(bytes, packetEnd, zeroBuffer));
int i = 0;
packet.FromBytes(bytes, ref i, ref packetEnd, zeroBuffer);
return packet;
}
public void ReturnPacket(Packet packet) {
lock(pool)
{
PacketType type=packet.Type;
if(pool[type] == null)
{
pool[type] = new Stack();
}
((Stack) pool[type]).Push(packet);
}
}
}
public class UDPServer : ClientStackNetworkHandler public class UDPServer : ClientStackNetworkHandler
{ {
protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>(); protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>();
@ -194,7 +257,7 @@ namespace OpenSim.Region.ClientStack
try try
{ {
packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer); packet = PacketPool.Instance.GetPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
} }
catch(Exception) catch(Exception)
{ {

View File

@ -374,7 +374,7 @@ namespace OpenSim.Region.Communications.Local
regData["status"] = "active"; regData["status"] = "active";
regData["handle"] = region.ToString(); regData["handle"] = region.ToString();
respData[reg.RegionID.ToStringHyphenated()] = regData; respData[reg.RegionID.ToString()] = regData;
} }
} }

View File

@ -177,10 +177,10 @@ namespace OpenSim.Region.Communications.Local
} }
TempHash = new Hashtable(); TempHash = new Hashtable();
TempHash["name"] = InvFolder.name; TempHash["name"] = InvFolder.name;
TempHash["parent_id"] = InvFolder.parentID.ToStringHyphenated(); TempHash["parent_id"] = InvFolder.parentID.ToString();
TempHash["version"] = (Int32) InvFolder.version; TempHash["version"] = (Int32) InvFolder.version;
TempHash["type_default"] = (Int32) InvFolder.type; TempHash["type_default"] = (Int32) InvFolder.type;
TempHash["folder_id"] = InvFolder.folderID.ToStringHyphenated(); TempHash["folder_id"] = InvFolder.folderID.ToString();
AgentInventoryArray.Add(TempHash); AgentInventoryArray.Add(TempHash);
} }
return new InventoryData(AgentInventoryArray, rootID); return new InventoryData(AgentInventoryArray, rootID);
@ -196,10 +196,10 @@ namespace OpenSim.Region.Communications.Local
{ {
TempHash = new Hashtable(); TempHash = new Hashtable();
TempHash["name"] = InvFolder.FolderName; TempHash["name"] = InvFolder.FolderName;
TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); TempHash["parent_id"] = InvFolder.ParentID.ToString();
TempHash["version"] = (Int32) InvFolder.Version; TempHash["version"] = (Int32) InvFolder.Version;
TempHash["type_default"] = (Int32) InvFolder.DefaultType; TempHash["type_default"] = (Int32) InvFolder.DefaultType;
TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); TempHash["folder_id"] = InvFolder.FolderID.ToString();
AgentInventoryArray.Add(TempHash); AgentInventoryArray.Add(TempHash);
} }
@ -207,4 +207,4 @@ namespace OpenSim.Region.Communications.Local
} }
} }
} }
} }

View File

@ -103,7 +103,7 @@ namespace OpenSim.Region.Communications.OGS1
// Login / Authentication // Login / Authentication
GridParams["authkey"] = serversInfo.GridSendKey; GridParams["authkey"] = serversInfo.GridSendKey;
GridParams["UUID"] = regionInfo.RegionID.ToStringHyphenated(); GridParams["UUID"] = regionInfo.RegionID.ToString();
GridParams["sim_ip"] = regionInfo.ExternalHostName; GridParams["sim_ip"] = regionInfo.ExternalHostName;
GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString(); GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString();
GridParams["region_locx"] = regionInfo.RegionLocX.ToString(); GridParams["region_locx"] = regionInfo.RegionLocX.ToString();
@ -111,7 +111,7 @@ namespace OpenSim.Region.Communications.OGS1
GridParams["sim_name"] = regionInfo.RegionName; GridParams["sim_name"] = regionInfo.RegionName;
GridParams["http_port"] = serversInfo.HttpListenerPort.ToString(); GridParams["http_port"] = serversInfo.HttpListenerPort.ToString();
GridParams["remoting_port"] = NetworkServersInfo.RemotingListenerPort.ToString(); GridParams["remoting_port"] = NetworkServersInfo.RemotingListenerPort.ToString();
GridParams["map-image-id"] = regionInfo.EstateSettings.terrainImageID.ToStringHyphenated(); GridParams["map-image-id"] = regionInfo.EstateSettings.terrainImageID.ToString();
// Package into an XMLRPC Request // Package into an XMLRPC Request
ArrayList SendParams = new ArrayList(); ArrayList SendParams = new ArrayList();
@ -191,7 +191,7 @@ namespace OpenSim.Region.Communications.OGS1
{ {
RegionInfo regionInfo; RegionInfo regionInfo;
Hashtable requestData = new Hashtable(); Hashtable requestData = new Hashtable();
requestData["region_UUID"] = Region_UUID.ToStringHyphenated(); requestData["region_UUID"] = Region_UUID.ToString();
requestData["authkey"] = serversInfo.GridSendKey; requestData["authkey"] = serversInfo.GridSendKey;
ArrayList SendParams = new ArrayList(); ArrayList SendParams = new ArrayList();
SendParams.Add(requestData); SendParams.Add(requestData);

View File

@ -63,7 +63,7 @@ namespace OpenSim.Region.Communications.OGS1
{ {
try try
{ {
Console.WriteLine("Requesting Inventory from Inventory server ( " + _inventoryServerUrl + "/GetInventory/" +" ) for " + userID.ToStringHyphenated()); Console.WriteLine("Requesting Inventory from Inventory server ( " + _inventoryServerUrl + "/GetInventory/" +" ) for " + userID.ToString());
RestObjectPosterResponse<InventoryCollection> requester = new RestObjectPosterResponse<InventoryCollection>(); RestObjectPosterResponse<InventoryCollection> requester = new RestObjectPosterResponse<InventoryCollection>();
requester.ResponseCallback = InventoryResponse; requester.ResponseCallback = InventoryResponse;

View File

@ -118,7 +118,7 @@ namespace OpenSim.Region.Communications.OGS1
try try
{ {
Hashtable param = new Hashtable(); Hashtable param = new Hashtable();
param["queryid"] = (string)queryID.ToStringHyphenated(); param["queryid"] = (string)queryID.ToString();
param["avquery"] = objAlphaNumericPattern.Replace(query, ""); param["avquery"] = objAlphaNumericPattern.Replace(query, "");
IList parameters = new ArrayList(); IList parameters = new ArrayList();
parameters.Add(param); parameters.Add(param);

View File

@ -241,7 +241,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
MainLog.Instance.Verbose( MainLog.Instance.Verbose(
"INVENTORY", "INVENTORY",
"Moving item for " + remoteClient.AgentId.ToStringHyphenated()); "Moving item for " + remoteClient.AgentId.ToString());
CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
if (userInfo == null) if (userInfo == null)

View File

@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment.Scenes
protected SceneCommunicationService m_sceneGridService; protected SceneCommunicationService m_sceneGridService;
protected SceneXmlLoader m_sceneXmlLoader; protected SceneXmlLoader m_sceneXmlLoader;
protected Dictionary<LLUUID, Caps> m_capsHandlers = new Dictionary<LLUUID, Caps>(); protected Dictionary<LLUUID, OpenSim.Region.Capabilities.Caps> m_capsHandlers = new Dictionary<LLUUID, OpenSim.Region.Capabilities.Caps>();
protected BaseHttpServer httpListener; protected BaseHttpServer httpListener;
protected Dictionary<string, IRegionModule> Modules = new Dictionary<string, IRegionModule>(); protected Dictionary<string, IRegionModule> Modules = new Dictionary<string, IRegionModule>();
@ -990,6 +990,7 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
/* Tree has been removed from libSL
public void AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position, public void AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position,
libsecondlife.ObjectManager.Tree treeType, bool newTree) libsecondlife.ObjectManager.Tree treeType, bool newTree)
{ {
@ -1001,7 +1002,7 @@ namespace OpenSim.Region.Environment.Scenes
treeShape.State = (byte)treeType; treeShape.State = (byte)treeType;
AddNewPrim(LLUUID.Random(), position, rotation, treeShape); AddNewPrim(LLUUID.Random(), position, rotation, treeShape);
} }
*/
public void RemovePrim(uint localID, LLUUID avatar_deleter) public void RemovePrim(uint localID, LLUUID avatar_deleter)
{ {
m_innerScene.RemovePrim(localID, avatar_deleter); m_innerScene.RemovePrim(localID, avatar_deleter);
@ -1323,8 +1324,8 @@ namespace OpenSim.Region.Environment.Scenes
{ {
if (agent.CapsPath != "") if (agent.CapsPath != "")
{ {
Caps cap = OpenSim.Region.Capabilities.Caps cap =
new Caps(AssetCache, httpListener, m_regInfo.ExternalHostName, httpListener.Port, new OpenSim.Region.Capabilities.Caps(AssetCache, httpListener, m_regInfo.ExternalHostName, httpListener.Port,
agent.CapsPath, agent.AgentID, m_dumpAssetsToFile); agent.CapsPath, agent.AgentID, m_dumpAssetsToFile);
Util.SetCapsURL(agent.AgentID, "http://" + m_regInfo.ExternalHostName + ":" + httpListener.Port.ToString() + Util.SetCapsURL(agent.AgentID, "http://" + m_regInfo.ExternalHostName + ":" + httpListener.Port.ToString() +
@ -1335,7 +1336,7 @@ namespace OpenSim.Region.Environment.Scenes
if (m_capsHandlers.ContainsKey(agent.AgentID)) if (m_capsHandlers.ContainsKey(agent.AgentID))
{ {
//MainLog.Instance.Warn("client", "Adding duplicate CAPS entry for user " + //MainLog.Instance.Warn("client", "Adding duplicate CAPS entry for user " +
// agent.AgentID.ToStringHyphenated()); // agent.AgentID.ToString());
try try
{ {
m_capsHandlers[agent.AgentID] = cap; m_capsHandlers[agent.AgentID] = cap;

View File

@ -1030,8 +1030,8 @@ namespace OpenSim.Region.Environment.Scenes
foreach (TaskInventoryItem item in TaskInventory.Values) foreach (TaskInventoryItem item in TaskInventory.Values)
{ {
invString.AddItemStart(); invString.AddItemStart();
invString.AddNameValueLine("item_id", item.item_id.ToStringHyphenated()); invString.AddNameValueLine("item_id", item.item_id.ToString());
invString.AddNameValueLine("parent_id", item.parent_id.ToStringHyphenated()); invString.AddNameValueLine("parent_id", item.parent_id.ToString());
invString.AddPermissionsStart(); invString.AddPermissionsStart();
invString.AddNameValueLine("base_mask", "0x7FFFFFFF"); invString.AddNameValueLine("base_mask", "0x7FFFFFFF");
@ -1039,13 +1039,13 @@ namespace OpenSim.Region.Environment.Scenes
invString.AddNameValueLine("group_mask", "0x7FFFFFFF"); invString.AddNameValueLine("group_mask", "0x7FFFFFFF");
invString.AddNameValueLine("everyone_mask", "0x7FFFFFFF"); invString.AddNameValueLine("everyone_mask", "0x7FFFFFFF");
invString.AddNameValueLine("next_owner_mask", "0x7FFFFFFF"); invString.AddNameValueLine("next_owner_mask", "0x7FFFFFFF");
invString.AddNameValueLine("creator_id", item.creator_id.ToStringHyphenated()); invString.AddNameValueLine("creator_id", item.creator_id.ToString());
invString.AddNameValueLine("owner_id", item.owner_id.ToStringHyphenated()); invString.AddNameValueLine("owner_id", item.owner_id.ToString());
invString.AddNameValueLine("last_owner_id", item.last_owner_id.ToStringHyphenated()); invString.AddNameValueLine("last_owner_id", item.last_owner_id.ToString());
invString.AddNameValueLine("group_id", item.group_id.ToStringHyphenated()); invString.AddNameValueLine("group_id", item.group_id.ToString());
invString.AddSectionEnd(); invString.AddSectionEnd();
invString.AddNameValueLine("asset_id", item.asset_id.ToStringHyphenated()); invString.AddNameValueLine("asset_id", item.asset_id.ToString());
invString.AddNameValueLine("type", item.type); invString.AddNameValueLine("type", item.type);
invString.AddNameValueLine("inv_type", item.inv_type); invString.AddNameValueLine("inv_type", item.inv_type);
invString.AddNameValueLine("flags", "0x00"); invString.AddNameValueLine("flags", "0x00");
@ -1255,12 +1255,12 @@ namespace OpenSim.Region.Environment.Scenes
tex.FaceTextures[i].RGBA = tmpcolor; tex.FaceTextures[i].RGBA = tmpcolor;
} }
} }
tmpcolor = tex.DefaultTexture.RGBA; tmpcolor = tex.FaceTextures[0].RGBA;
tmpcolor.A = tmpcolor.A * 255; tmpcolor.A = tmpcolor.A * 255;
tmpcolor.R = tmpcolor.R * 255; tmpcolor.R = tmpcolor.R * 255;
tmpcolor.G = tmpcolor.G * 255; tmpcolor.G = tmpcolor.G * 255;
tmpcolor.B = tmpcolor.B * 255; tmpcolor.B = tmpcolor.B * 255;
tex.DefaultTexture.RGBA = tmpcolor; tex.FaceTextures[0].RGBA = tmpcolor;
UpdateTextureEntry(tex.ToBytes()); UpdateTextureEntry(tex.ToBytes());
} }
@ -1544,8 +1544,8 @@ namespace OpenSim.Region.Environment.Scenes
public InventoryStringBuilder(LLUUID folderID, LLUUID parentID) public InventoryStringBuilder(LLUUID folderID, LLUUID parentID)
{ {
BuildString += "\tinv_object\t0\n\t{\n"; BuildString += "\tinv_object\t0\n\t{\n";
AddNameValueLine("obj_id", folderID.ToStringHyphenated()); AddNameValueLine("obj_id", folderID.ToString());
AddNameValueLine("parent_id", parentID.ToStringHyphenated()); AddNameValueLine("parent_id", parentID.ToString());
AddNameValueLine("type", "category"); AddNameValueLine("type", "category");
AddNameValueLine("name", "Contents"); AddNameValueLine("name", "Contents");
AddSectionEnd(); AddSectionEnd();

View File

@ -1033,11 +1033,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
LLVector3 pos = m_pos; LLVector3 pos = m_pos;
LLVector3 vel = Velocity; LLVector3 vel = Velocity;
LLQuaternion rot; LLQuaternion rot=new LLQuaternion(m_bodyRot.x, m_bodyRot.y, m_bodyRot.z, m_bodyRot.w);
rot.X = m_bodyRot.x;
rot.Y = m_bodyRot.y;
rot.Z = m_bodyRot.z;
rot.W = m_bodyRot.w;
remoteClient.SendAvatarTerseUpdate(m_regionHandle, 64096, LocalId, new LLVector3(pos.X, pos.Y, pos.Z), remoteClient.SendAvatarTerseUpdate(m_regionHandle, 64096, LocalId, new LLVector3(pos.X, pos.Y, pos.Z),
new LLVector3(vel.X, vel.Y, vel.Z), rot); new LLVector3(vel.X, vel.Y, vel.Z), rot);
} }

View File

@ -56,7 +56,7 @@ namespace OpenSim.Region.ExtensionsScriptModule.CSharp.Examples
{ {
SceneObject root = obj.Value; SceneObject root = obj.Value;
sequence += "NEWOBJ::" + obj.Key.ToStringHyphenated() + "\n"; sequence += "NEWOBJ::" + obj.Key.ToString() + "\n";
string rootPrim = processPrimitiveToString(root.rootPrimitive); string rootPrim = processPrimitiveToString(root.rootPrimitive);
@ -91,4 +91,4 @@ namespace OpenSim.Region.ExtensionsScriptModule.CSharp.Examples
return ""; return "";
} }
} }
} }

View File

@ -471,11 +471,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
} }
else if (face == -1) else if (face == -1)
{ {
texcolor = tex.DefaultTexture.RGBA;
texcolor.R = (float)Math.Abs(color.x - 1);
texcolor.G = (float)Math.Abs(color.y - 1);
texcolor.B = (float)Math.Abs(color.z - 1);
tex.DefaultTexture.RGBA = texcolor;
for (uint i = 0; i < 32; i++) for (uint i = 0; i < 32; i++)
{ {
if (tex.FaceTextures[i] != null) if (tex.FaceTextures[i] != null)
@ -499,7 +494,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length); LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length);
if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
{ {
return (double)((tex.DefaultTexture.RGBA.A * 255) / 255); return (double)((tex.FaceTextures[0].RGBA.A * 255) / 255);
} }
if (face > -1) if (face > -1)
{ {
@ -522,9 +517,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
} }
else if (face == -1) else if (face == -1)
{ {
texcolor = tex.DefaultTexture.RGBA;
texcolor.A = (float)Math.Abs(alpha - 1);
tex.DefaultTexture.RGBA = texcolor;
for (int i = 0; i < 32; i++) for (int i = 0; i < 32; i++)
{ {
if (tex.FaceTextures[i] != null) if (tex.FaceTextures[i] != null)
@ -548,7 +540,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
LSL_Types.Vector3 rgb; LSL_Types.Vector3 rgb;
if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
{ {
texcolor = tex.DefaultTexture.RGBA; texcolor = tex.FaceTextures[0].RGBA;
rgb.x = (255 - (texcolor.R * 255)) / 255; rgb.x = (255 - (texcolor.R * 255)) / 255;
rgb.y = (255 - (texcolor.G * 255)) / 255; rgb.y = (255 - (texcolor.G * 255)) / 255;
rgb.z = (255 - (texcolor.B * 255)) / 255; rgb.z = (255 - (texcolor.B * 255)) / 255;
@ -586,7 +578,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
tex.FaceTextures[i].TextureID = new LLUUID(texture); tex.FaceTextures[i].TextureID = new LLUUID(texture);
} }
} }
tex.DefaultTexture.TextureID = new LLUUID(texture);
m_host.UpdateTexture(tex); m_host.UpdateTexture(tex);
return; return;
} }
@ -617,8 +608,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
} }
} }
tex.DefaultTexture.RepeatU = (float)u;
tex.DefaultTexture.RepeatV = (float)v;
m_host.UpdateTexture(tex); m_host.UpdateTexture(tex);
return; return;
} }
@ -648,8 +637,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
tex.FaceTextures[i].OffsetV = (float)v; tex.FaceTextures[i].OffsetV = (float)v;
} }
} }
tex.DefaultTexture.OffsetU = (float)u;
tex.DefaultTexture.OffsetV = (float)v;
m_host.UpdateTexture(tex); m_host.UpdateTexture(tex);
return; return;
} }
@ -677,7 +664,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
tex.FaceTextures[i].Rotation = (float)rotation; tex.FaceTextures[i].Rotation = (float)rotation;
} }
} }
tex.DefaultTexture.Rotation = (float)rotation;
m_host.UpdateTexture(tex); m_host.UpdateTexture(tex);
return; return;
} }
@ -696,7 +682,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
{ {
LLObject.TextureEntryFace texface; LLObject.TextureEntryFace texface;
texface = tex.GetFace((uint)face); texface = tex.GetFace((uint)face);
return texface.TextureID.ToStringHyphenated(); return texface.TextureID.ToString();
} }
NotImplemented("llGetTexture"); NotImplemented("llGetTexture");
return ""; return "";
@ -1035,7 +1021,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
public string llGetOwner() public string llGetOwner()
{ {
return m_host.ObjectOwner.ToStringHyphenated(); return m_host.ObjectOwner.ToString();
} }
public void llInstantMessage(string user, string message) public void llInstantMessage(string user, string message)
@ -1063,7 +1049,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
public string llGetKey() public string llGetKey()
{ {
return m_host.UUID.ToStringHyphenated(); return m_host.UUID.ToString();
} }
public void llSetBuoyancy(double buoyancy) public void llSetBuoyancy(double buoyancy)
@ -1277,7 +1263,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum);
if (part != null) if (part != null)
{ {
return part.UUID.ToStringHyphenated(); return part.UUID.ToString();
} }
else else
{ {
@ -1621,11 +1607,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
{ {
return "00000000-0000-0000-0000-000000000000"; return "00000000-0000-0000-0000-000000000000";
} }
//return OpenSim.Framework.ToStringHyphenated(src[index]); //return OpenSim.Framework.ToString(src[index]);
LLUUID tmpkey; LLUUID tmpkey;
if (LLUUID.TryParse(src.Data[index].ToString(), out tmpkey)) if (LLUUID.TryParse(src.Data[index].ToString(), out tmpkey))
{ {
return tmpkey.ToStringHyphenated(); return tmpkey.ToString();
} }
else else
{ {
@ -2380,7 +2366,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
public string llGetCreator() public string llGetCreator()
{ {
return m_host.ObjectCreator.ToStringHyphenated(); return m_host.ObjectCreator.ToString();
} }
public string llGetTimestamp() public string llGetTimestamp()
@ -2807,14 +2793,14 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
LLUUID createdTexture = LLUUID createdTexture =
textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
extraParams, timer); extraParams, timer);
return createdTexture.ToStringHyphenated(); return createdTexture.ToString();
} }
else else
{ {
//TODO update existing dynamic textures //TODO update existing dynamic textures
} }
return LLUUID.Zero.ToStringHyphenated(); return LLUUID.Zero.ToString();
} }
private void NotImplemented(string Command) private void NotImplemented(string Command)

Binary file not shown.