Formatting cleanup.

viewer-2-initial-appearance
Jeff Ames 2010-09-12 13:43:49 -04:00
parent 20cd1da6bf
commit f1f0bc23f4
92 changed files with 754 additions and 772 deletions

View File

@ -384,7 +384,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// } // }
// //
// rdata.Respond(String.Format("Appearance {0} : Normal completion", rdata.method)); // rdata.Respond(String.Format("Appearance {0} : Normal completion", rdata.method));
// //
// } // }
/// <summary> /// <summary>
@ -449,7 +449,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// rdata.userAppearance = new AvatarAppearance(); // rdata.userAppearance = new AvatarAppearance();
// rdata.userAppearance.Owner = old.Owner; // rdata.userAppearance.Owner = old.Owner;
// adata = new AvatarData(rdata.userAppearance); // adata = new AvatarData(rdata.userAppearance);
// //
// Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata); // Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata);
// //
// rdata.Complete(); // rdata.Complete();

View File

@ -44,7 +44,7 @@ namespace OpenSim.Data
/// <returns></returns> /// <returns></returns>
public static UUID FromDB(object id) public static UUID FromDB(object id)
{ {
if( (id == null) || (id == DBNull.Value)) if ((id == null) || (id == DBNull.Value))
return UUID.Zero; return UUID.Zero;
if (id.GetType() == typeof(Guid)) if (id.GetType() == typeof(Guid))

View File

@ -1126,7 +1126,7 @@ VALUES
prim.LinkNum = Convert.ToInt32(primRow["LinkNumber"]); prim.LinkNum = Convert.ToInt32(primRow["LinkNumber"]);
if (!(primRow["MediaURL"] is System.DBNull)) if (!(primRow["MediaURL"] is System.DBNull))
prim.MediaUrl = (string)primRow["MediaURL"]; prim.MediaUrl = (string)primRow["MediaURL"];
return prim; return prim;
} }
@ -1180,7 +1180,7 @@ VALUES
{ {
} }
if (!(shapeRow["Media"] is System.DBNull)) if (!(shapeRow["Media"] is System.DBNull))
baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]); baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]);
return baseShape; return baseShape;
@ -1511,7 +1511,7 @@ VALUES
parameters.Add(_Database.CreateParameter("PassTouches", 1)); parameters.Add(_Database.CreateParameter("PassTouches", 1));
else else
parameters.Add(_Database.CreateParameter("PassTouches", 0)); parameters.Add(_Database.CreateParameter("PassTouches", 0));
parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum));
parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl));
return parameters.ToArray(); return parameters.ToArray();

View File

@ -122,7 +122,7 @@ namespace OpenSim.Data
int ver = FindVersion(_conn, "migrations"); int ver = FindVersion(_conn, "migrations");
if (ver <= 0) // -1 = no table, 0 = no version record if (ver <= 0) // -1 = no table, 0 = no version record
{ {
if( ver < 0 ) if (ver < 0)
ExecuteScript("create table migrations(name varchar(100), version int)"); ExecuteScript("create table migrations(name varchar(100), version int)");
InsertVersion("migrations", 1); InsertVersion("migrations", 1);
} }
@ -288,7 +288,7 @@ namespace OpenSim.Data
SortedList<int, string[]> migrations = new SortedList<int, string[]>(); SortedList<int, string[]> migrations = new SortedList<int, string[]>();
string[] names = _assem.GetManifestResourceNames(); string[] names = _assem.GetManifestResourceNames();
if( names.Length == 0 ) // should never happen if (names.Length == 0) // should never happen
return migrations; return migrations;
Array.Sort(names); // we want all the migrations ordered Array.Sort(names); // we want all the migrations ordered
@ -297,7 +297,7 @@ namespace OpenSim.Data
Match m = null; Match m = null;
string sFile = Array.FindLast(names, nm => { m = _match_new.Match(nm); return m.Success; }); // ; nm.StartsWith(sPrefix, StringComparison.InvariantCultureIgnoreCase string sFile = Array.FindLast(names, nm => { m = _match_new.Match(nm); return m.Success; }); // ; nm.StartsWith(sPrefix, StringComparison.InvariantCultureIgnoreCase
if( (m != null) && !String.IsNullOrEmpty(sFile) ) if ((m != null) && !String.IsNullOrEmpty(sFile))
{ {
/* The filename should be '<StoreName>.migrations[.NNN]' where NNN /* The filename should be '<StoreName>.migrations[.NNN]' where NNN
* is the last version number defined in the file. If the '.NNN' part is recognized, the code can skip * is the last version number defined in the file. If the '.NNN' part is recognized, the code can skip
@ -312,7 +312,7 @@ namespace OpenSim.Data
if (m.Groups.Count > 1 && int.TryParse(m.Groups[1].Value, out nLastVerFound)) if (m.Groups.Count > 1 && int.TryParse(m.Groups[1].Value, out nLastVerFound))
{ {
if( nLastVerFound <= after ) if (nLastVerFound <= after)
goto scan_old_style; goto scan_old_style;
} }
@ -329,7 +329,7 @@ namespace OpenSim.Data
sb.Length = 0; sb.Length = 0;
} }
if ( (nVersion > 0) && (nVersion > after) && (script.Count > 0) && !migrations.ContainsKey(nVersion)) // script to the versioned script list if ((nVersion > 0) && (nVersion > after) && (script.Count > 0) && !migrations.ContainsKey(nVersion)) // script to the versioned script list
{ {
migrations[nVersion] = script.ToArray(); migrations[nVersion] = script.ToArray();
} }
@ -345,7 +345,7 @@ namespace OpenSim.Data
string sLine = resourceReader.ReadLine(); string sLine = resourceReader.ReadLine();
nLineNo++; nLineNo++;
if( String.IsNullOrEmpty(sLine) || sLine.StartsWith("#") ) // ignore a comment or empty line if (String.IsNullOrEmpty(sLine) || sLine.StartsWith("#")) // ignore a comment or empty line
continue; continue;
if (sLine.Trim().Equals(":GO", StringComparison.InvariantCultureIgnoreCase)) if (sLine.Trim().Equals(":GO", StringComparison.InvariantCultureIgnoreCase))
@ -392,7 +392,7 @@ scan_old_style:
if (m.Success) if (m.Success)
{ {
int version = int.Parse(m.Groups[1].ToString()); int version = int.Parse(m.Groups[1].ToString());
if ( (version > after) && !migrations.ContainsKey(version) ) if ((version > after) && !migrations.ContainsKey(version))
{ {
using (Stream resource = _assem.GetManifestResourceStream(s)) using (Stream resource = _assem.GetManifestResourceStream(s))
{ {

View File

@ -286,7 +286,7 @@ namespace OpenSim.Data.MySQL
InventoryItemBase item = new InventoryItemBase(); InventoryItemBase item = new InventoryItemBase();
// TODO: this is to handle a case where NULLs creep in there, which we are not sure is endemic to the system, or legacy. It would be nice to live fix these. // TODO: this is to handle a case where NULLs creep in there, which we are not sure is endemic to the system, or legacy. It would be nice to live fix these.
// ( DBGuid.FromDB() reads db NULLs as well, returns UUID.Zero ) // (DBGuid.FromDB() reads db NULLs as well, returns UUID.Zero)
item.CreatorId = reader["creatorID"].ToString(); item.CreatorId = reader["creatorID"].ToString();
// Be a bit safer in parsing these because the // Be a bit safer in parsing these because the

View File

@ -680,7 +680,7 @@ namespace OpenSim.Data.MySQL
"UserLocationX, UserLocationY, UserLocationZ, " + "UserLocationX, UserLocationY, UserLocationZ, " +
"UserLookAtX, UserLookAtY, UserLookAtZ, " + "UserLookAtX, UserLookAtY, UserLookAtZ, " +
"AuthbuyerID, OtherCleanTime, MediaType, MediaDescription, " + "AuthbuyerID, OtherCleanTime, MediaType, MediaDescription, " +
"MediaSize, MediaLoop, ObscureMusic, ObscureMedia) values (" + "MediaSize, MediaLoop, ObscureMusic, ObscureMedia) values (" +
"?UUID, ?RegionUUID, " + "?UUID, ?RegionUUID, " +
"?LocalLandID, ?Bitmap, ?Name, ?Description, " + "?LocalLandID, ?Bitmap, ?Name, ?Description, " +
"?OwnerUUID, ?IsGroupOwned, ?Area, ?AuctionID, " + "?OwnerUUID, ?IsGroupOwned, ?Area, ?AuctionID, " +
@ -691,7 +691,7 @@ namespace OpenSim.Data.MySQL
"?UserLocationX, ?UserLocationY, ?UserLocationZ, " + "?UserLocationX, ?UserLocationY, ?UserLocationZ, " +
"?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " + "?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " +
"?AuthbuyerID, ?OtherCleanTime, ?MediaType, ?MediaDescription, "+ "?AuthbuyerID, ?OtherCleanTime, ?MediaType, ?MediaDescription, "+
"CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia)"; "CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia)";
FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID); FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID);
@ -728,7 +728,7 @@ namespace OpenSim.Data.MySQL
string command = "select * from `regionwindlight` where region_id = ?regionID"; string command = "select * from `regionwindlight` where region_id = ?regionID";
using(MySqlCommand cmd = new MySqlCommand(command)) using (MySqlCommand cmd = new MySqlCommand(command))
{ {
cmd.Connection = dbcon; cmd.Connection = dbcon;
@ -1350,13 +1350,13 @@ namespace OpenSim.Data.MySQL
m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name);
} }
newData.MediaDescription = (string) row["MediaDescription"]; newData.MediaDescription = (string) row["MediaDescription"];
newData.MediaType = (string) row["MediaType"]; newData.MediaType = (string) row["MediaType"];
newData.MediaWidth = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[0]); newData.MediaWidth = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[0]);
newData.MediaHeight = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[1]); newData.MediaHeight = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[1]);
newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]); newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]);
newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]); newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]);
newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]); newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]);
newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
@ -1724,7 +1724,7 @@ namespace OpenSim.Data.MySQL
s.State = (byte)(int)row["State"]; s.State = (byte)(int)row["State"];
if (!(row["Media"] is System.DBNull)) if (!(row["Media"] is System.DBNull))
s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
return s; return s;

View File

@ -731,12 +731,12 @@ namespace OpenSim.Data.SQLite
**********************************************************************/ **********************************************************************/
protected void CreateDataSetMapping(IDataAdapter da, string tableName) protected void CreateDataSetMapping(IDataAdapter da, string tableName)
{ {
ITableMapping dbMapping = da.TableMappings.Add(tableName, tableName); ITableMapping dbMapping = da.TableMappings.Add(tableName, tableName);
foreach (DataColumn col in ds.Tables[tableName].Columns) foreach (DataColumn col in ds.Tables[tableName].Columns)
{ {
dbMapping.ColumnMappings.Add(col.ColumnName, col.ColumnName); dbMapping.ColumnMappings.Add(col.ColumnName, col.ColumnName);
} }
} }
/// <summary> /// <summary>

View File

@ -176,7 +176,7 @@ namespace OpenSim.Data.SQLite
{ {
m_log.Info("[SQLITE REGION DB]: Caught fill error on primitems table"); m_log.Info("[SQLITE REGION DB]: Caught fill error on primitems table");
} }
try try
{ {
terrainDa.Fill(ds.Tables["terrain"]); terrainDa.Fill(ds.Tables["terrain"]);
@ -510,7 +510,7 @@ namespace OpenSim.Data.SQLite
"[SQLITE REGION DB]: No shape found for prim in storage, so setting default box shape"); "[SQLITE REGION DB]: No shape found for prim in storage, so setting default box shape");
prim.Shape = PrimitiveBaseShape.Default; prim.Shape = PrimitiveBaseShape.Default;
} }
createdObjects[new UUID(objID)].AddPart(prim); createdObjects[new UUID(objID)].AddPart(prim);
LoadItems(prim); LoadItems(prim);
} }
@ -534,17 +534,17 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="prim">the prim</param> /// <param name="prim">the prim</param>
private void LoadItems(SceneObjectPart prim) private void LoadItems(SceneObjectPart prim)
{ {
// m_log.DebugFormat("[SQLITE REGION DB]: Loading inventory for {0} {1}", prim.Name, prim.UUID); // m_log.DebugFormat("[SQLITE REGION DB]: Loading inventory for {0} {1}", prim.Name, prim.UUID);
DataTable dbItems = ds.Tables["primitems"]; DataTable dbItems = ds.Tables["primitems"];
String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); String sql = String.Format("primID = '{0}'", prim.UUID.ToString());
DataRow[] dbItemRows = dbItems.Select(sql); DataRow[] dbItemRows = dbItems.Select(sql);
IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>();
// m_log.DebugFormat( // m_log.DebugFormat(
// "[SQLITE REGION DB]: Found {0} items for {1} {2}", dbItemRows.Length, prim.Name, prim.UUID); // "[SQLITE REGION DB]: Found {0} items for {1} {2}", dbItemRows.Length, prim.Name, prim.UUID);
foreach (DataRow row in dbItemRows) foreach (DataRow row in dbItemRows)
{ {
TaskInventoryItem item = buildItem(row); TaskInventoryItem item = buildItem(row);
@ -693,8 +693,6 @@ namespace OpenSim.Data.SQLite
{ {
landaccesslist.Rows.Remove(rowsToDelete[iter]); landaccesslist.Rows.Remove(rowsToDelete[iter]);
} }
} }
Commit(); Commit();
} }
@ -804,7 +802,7 @@ namespace OpenSim.Data.SQLite
try try
{ {
regionSettingsDa.Update(ds, "regionsettings"); regionSettingsDa.Update(ds, "regionsettings");
} }
catch (SqliteException SqlEx) catch (SqliteException SqlEx)
{ {
throw new Exception( throw new Exception(
@ -974,7 +972,7 @@ namespace OpenSim.Data.SQLite
createCol(prims, "CollisionSoundVolume", typeof(Double)); createCol(prims, "CollisionSoundVolume", typeof(Double));
createCol(prims, "VolumeDetect", typeof(Int16)); createCol(prims, "VolumeDetect", typeof(Int16));
createCol(prims, "MediaURL", typeof(String)); createCol(prims, "MediaURL", typeof(String));
// Add in contraints // Add in contraints
@ -1191,10 +1189,10 @@ namespace OpenSim.Data.SQLite
private SceneObjectPart buildPrim(DataRow row) private SceneObjectPart buildPrim(DataRow row)
{ {
// Code commented. Uncomment to test the unit test inline. // Code commented. Uncomment to test the unit test inline.
// The unit test mentions this commented code for the purposes // The unit test mentions this commented code for the purposes
// of debugging a unit test failure // of debugging a unit test failure
// SceneObjectGroup sog = new SceneObjectGroup(); // SceneObjectGroup sog = new SceneObjectGroup();
// SceneObjectPart sop = new SceneObjectPart(); // SceneObjectPart sop = new SceneObjectPart();
// sop.LocalId = 1; // sop.LocalId = 1;
@ -1211,7 +1209,7 @@ namespace OpenSim.Data.SQLite
// TODO: this doesn't work yet because something more // TODO: this doesn't work yet because something more
// interesting has to be done to actually get these values // interesting has to be done to actually get these values
// back out. Not enough time to figure it out yet. // back out. Not enough time to figure it out yet.
SceneObjectPart prim = new SceneObjectPart(); SceneObjectPart prim = new SceneObjectPart();
prim.UUID = new UUID((String) row["UUID"]); prim.UUID = new UUID((String) row["UUID"]);
// explicit conversion of integers is required, which sort // explicit conversion of integers is required, which sort
@ -1341,7 +1339,7 @@ namespace OpenSim.Data.SQLite
if (Convert.ToInt16(row["VolumeDetect"]) != 0) if (Convert.ToInt16(row["VolumeDetect"]) != 0)
prim.VolumeDetectActive = true; prim.VolumeDetectActive = true;
if (!(row["MediaURL"] is System.DBNull)) if (!(row["MediaURL"] is System.DBNull))
{ {
//m_log.DebugFormat("[SQLITE]: MediaUrl type [{0}]", row["MediaURL"].GetType()); //m_log.DebugFormat("[SQLITE]: MediaUrl type [{0}]", row["MediaURL"].GetType());
@ -1680,7 +1678,7 @@ namespace OpenSim.Data.SQLite
row["VolumeDetect"] = 1; row["VolumeDetect"] = 1;
else else
row["VolumeDetect"] = 0; row["VolumeDetect"] = 0;
row["MediaURL"] = prim.MediaUrl; row["MediaURL"] = prim.MediaUrl;
} }
@ -1758,12 +1756,12 @@ namespace OpenSim.Data.SQLite
row["UserLookAtZ"] = land.UserLookAt.Z; row["UserLookAtZ"] = land.UserLookAt.Z;
row["AuthbuyerID"] = land.AuthBuyerID.ToString(); row["AuthbuyerID"] = land.AuthBuyerID.ToString();
row["OtherCleanTime"] = land.OtherCleanTime; row["OtherCleanTime"] = land.OtherCleanTime;
row["MediaType"] = land.MediaType; row["MediaType"] = land.MediaType;
row["MediaDescription"] = land.MediaDescription; row["MediaDescription"] = land.MediaDescription;
row["MediaSize"] = land.MediaWidth.ToString() + "," + land.MediaHeight.ToString(); row["MediaSize"] = land.MediaWidth.ToString() + "," + land.MediaHeight.ToString();
row["MediaLoop"] = land.MediaLoop.ToString(); row["MediaLoop"] = land.MediaLoop.ToString();
row["ObscureMusic"] = land.ObscureMusic.ToString(); row["ObscureMusic"] = land.ObscureMusic.ToString();
row["ObscureMedia"] = land.ObscureMedia.ToString(); row["ObscureMedia"] = land.ObscureMedia.ToString();
} }
/// <summary> /// <summary>
@ -1861,10 +1859,10 @@ namespace OpenSim.Data.SQLite
s.TextureEntry = textureEntry; s.TextureEntry = textureEntry;
s.ExtraParams = (byte[]) row["ExtraParams"]; s.ExtraParams = (byte[]) row["ExtraParams"];
if (!(row["Media"] is System.DBNull)) if (!(row["Media"] is System.DBNull))
s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
return s; return s;
} }
@ -1908,7 +1906,7 @@ namespace OpenSim.Data.SQLite
row["Texture"] = s.TextureEntry; row["Texture"] = s.TextureEntry;
row["ExtraParams"] = s.ExtraParams; row["ExtraParams"] = s.ExtraParams;
if (s.Media != null) if (s.Media != null)
row["Media"] = s.Media.ToXml(); row["Media"] = s.Media.ToXml();
} }
@ -2246,7 +2244,6 @@ namespace OpenSim.Data.SQLite
delete.Parameters.Add(createSqliteParameter("AccessUUID", typeof(String))); delete.Parameters.Add(createSqliteParameter("AccessUUID", typeof(String)));
da.DeleteCommand = delete; da.DeleteCommand = delete;
da.DeleteCommand.Connection = conn; da.DeleteCommand.Connection = conn;
} }
private void setupRegionSettingsCommands(SqliteDataAdapter da, SqliteConnection conn) private void setupRegionSettingsCommands(SqliteDataAdapter da, SqliteConnection conn)
@ -2318,7 +2315,7 @@ namespace OpenSim.Data.SQLite
return DbType.String; return DbType.String;
} }
} }
static void PrintDataSet(DataSet ds) static void PrintDataSet(DataSet ds)
{ {
// Print out any name and extended properties. // Print out any name and extended properties.

View File

@ -68,13 +68,13 @@ namespace OpenSim.Data.Tests
{ {
m_connStr = !String.IsNullOrEmpty(conn) ? conn : DefaultTestConns.Get(typeof(TConn)); m_connStr = !String.IsNullOrEmpty(conn) ? conn : DefaultTestConns.Get(typeof(TConn));
m_log = LogManager.GetLogger(this.GetType()); m_log = LogManager.GetLogger(this.GetType());
OpenSim.Tests.Common.TestLogging.LogToConsole(); // TODO: Is that right? OpenSim.Tests.Common.TestLogging.LogToConsole(); // TODO: Is that right?
} }
/// <summary> /// <summary>
/// To be overridden in derived classes. Do whatever init with the m_service, like setting the conn string to it. /// To be overridden in derived classes. Do whatever init with the m_service, like setting the conn string to it.
/// You'd probably want to to cast the 'service' to a more specific type and store it in a member var. /// You'd probably want to to cast the 'service' to a more specific type and store it in a member var.
/// This framework takes care of disposing it, if it's disposable. /// This framework takes care of disposing it, if it's disposable.
/// </summary> /// </summary>
/// <param name="service">The service being tested</param> /// <param name="service">The service being tested</param>
@ -145,12 +145,12 @@ namespace OpenSim.Data.Tests
{ {
if (m_service != null) if (m_service != null)
{ {
if( m_service is IDisposable) if (m_service is IDisposable)
((IDisposable)m_service).Dispose(); ((IDisposable)m_service).Dispose();
m_service = null; m_service = null;
} }
if( !String.IsNullOrEmpty(m_file) && File.Exists(m_file) ) if (!String.IsNullOrEmpty(m_file) && File.Exists(m_file))
File.Delete(m_file); File.Delete(m_file);
} }
@ -231,7 +231,7 @@ namespace OpenSim.Data.Tests
lst += ", " + s; lst += ", " + s;
} }
string sCond = stores.Length > 1 ? ("in (" + lst + ")") : ("=" + lst); string sCond = stores.Length > 1 ? ("in (" + lst + ")") : ("=" + lst);
try try
{ {
ExecuteSql("DELETE FROM migrations where name " + sCond); ExecuteSql("DELETE FROM migrations where name " + sCond);

View File

@ -760,7 +760,7 @@ namespace OpenSim.Framework.Capabilities
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
BakedTextureUploader uploader = BakedTextureUploader uploader =
new BakedTextureUploader( capsBase + uploaderPath, new BakedTextureUploader(capsBase + uploaderPath,
m_httpListener); m_httpListener);
uploader.OnUpLoad += BakedTextureUploaded; uploader.OnUpLoad += BakedTextureUploaded;

View File

@ -151,7 +151,7 @@ namespace OpenSim.Framework.Console
help.Add(commandInfo.descriptive_help); help.Add(commandInfo.descriptive_help);
if (descriptiveHelp != string.Empty) if (descriptiveHelp != string.Empty)
help.Add(string.Empty); help.Add(string.Empty);
} }
else else
{ {

View File

@ -38,7 +38,7 @@ namespace OpenSim.Framework.Console
{ {
/// <summary> /// <summary>
/// A console that uses cursor control and color /// A console that uses cursor control and color
/// </summary> /// </summary>
public class LocalConsole : CommandConsole public class LocalConsole : CommandConsole
{ {
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -100,8 +100,8 @@ namespace OpenSim.Framework.Console
private int SetCursorTop(int top) private int SetCursorTop(int top)
{ {
// From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try
// to set a cursor row position with a currently invalid column, mono will throw an exception. // to set a cursor row position with a currently invalid column, mono will throw an exception.
// Therefore, we need to make sure that the column position is valid first. // Therefore, we need to make sure that the column position is valid first.
int left = System.Console.CursorLeft; int left = System.Console.CursorLeft;
if (left < 0) if (left < 0)
@ -121,7 +121,7 @@ namespace OpenSim.Framework.Console
{ {
top = 0; top = 0;
} }
else else
{ {
int bh = System.Console.BufferHeight; int bh = System.Console.BufferHeight;
@ -133,7 +133,7 @@ namespace OpenSim.Framework.Console
System.Console.CursorTop = top; System.Console.CursorTop = top;
return top; return top;
} }
/// <summary> /// <summary>
/// Set the cursor column. /// Set the cursor column.
@ -145,12 +145,12 @@ namespace OpenSim.Framework.Console
/// </param> /// </param>
/// <returns> /// <returns>
/// The new cursor column. /// The new cursor column.
/// </returns> /// </returns>
private int SetCursorLeft(int left) private int SetCursorLeft(int left)
{ {
// From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try
// to set a cursor column position with a currently invalid row, mono will throw an exception. // to set a cursor column position with a currently invalid row, mono will throw an exception.
// Therefore, we need to make sure that the row position is valid first. // Therefore, we need to make sure that the row position is valid first.
int top = System.Console.CursorTop; int top = System.Console.CursorTop;
if (top < 0) if (top < 0)
@ -214,7 +214,7 @@ namespace OpenSim.Framework.Console
System.Console.Write("{0}", prompt); System.Console.Write("{0}", prompt);
SetCursorTop(new_y); SetCursorTop(new_y);
SetCursorLeft(new_x); SetCursorLeft(new_x);
} }
} }

View File

@ -89,13 +89,13 @@ namespace OpenSim.Framework
private Vector3 _userLocation = new Vector3(); private Vector3 _userLocation = new Vector3();
private Vector3 _userLookAt = new Vector3(); private Vector3 _userLookAt = new Vector3();
private int _otherCleanTime = 0; private int _otherCleanTime = 0;
private string _mediaType = "none/none"; private string _mediaType = "none/none";
private string _mediaDescription = ""; private string _mediaDescription = "";
private int _mediaHeight = 0; private int _mediaHeight = 0;
private int _mediaWidth = 0; private int _mediaWidth = 0;
private bool _mediaLoop = false; private bool _mediaLoop = false;
private bool _obscureMusic = false; private bool _obscureMusic = false;
private bool _obscureMedia = false; private bool _obscureMedia = false;
/// <summary> /// <summary>
/// Whether to obscure parcel media URL /// Whether to obscure parcel media URL
@ -690,13 +690,13 @@ namespace OpenSim.Framework
landData._userLocation = _userLocation; landData._userLocation = _userLocation;
landData._userLookAt = _userLookAt; landData._userLookAt = _userLookAt;
landData._otherCleanTime = _otherCleanTime; landData._otherCleanTime = _otherCleanTime;
landData._mediaType = _mediaType; landData._mediaType = _mediaType;
landData._mediaDescription = _mediaDescription; landData._mediaDescription = _mediaDescription;
landData._mediaWidth = _mediaWidth; landData._mediaWidth = _mediaWidth;
landData._mediaHeight = _mediaHeight; landData._mediaHeight = _mediaHeight;
landData._mediaLoop = _mediaLoop; landData._mediaLoop = _mediaLoop;
landData._obscureMusic = _obscureMusic; landData._obscureMusic = _obscureMusic;
landData._obscureMedia = _obscureMedia; landData._obscureMedia = _obscureMedia;
landData._parcelAccessList.Clear(); landData._parcelAccessList.Clear();
foreach (ParcelManager.ParcelAccessEntry entry in _parcelAccessList) foreach (ParcelManager.ParcelAccessEntry entry in _parcelAccessList)

View File

@ -49,12 +49,12 @@ namespace OpenSim.Framework
public UUID SnapshotID; public UUID SnapshotID;
public Vector3 UserLocation; public Vector3 UserLocation;
public Vector3 UserLookAt; public Vector3 UserLookAt;
public string MediaType; public string MediaType;
public string MediaDescription; public string MediaDescription;
public int MediaHeight; public int MediaHeight;
public int MediaWidth; public int MediaWidth;
public bool MediaLoop; public bool MediaLoop;
public bool ObscureMusic; public bool ObscureMusic;
public bool ObscureMedia; public bool ObscureMedia;
} }
} }

View File

@ -175,7 +175,7 @@ namespace OpenSim.Framework
} }
} }
} }
/// <summary> /// <summary>
/// Entries to store media textures on each face /// Entries to store media textures on each face
/// </summary> /// </summary>
@ -1216,28 +1216,28 @@ namespace OpenSim.Framework
prim.Properties.Permissions = new Permissions(); prim.Properties.Permissions = new Permissions();
prim.Properties.SalePrice = 10; prim.Properties.SalePrice = 10;
prim.Properties.SaleType = new SaleType(); prim.Properties.SaleType = new SaleType();
return prim; return prim;
} }
/// <summary> /// <summary>
/// Encapsulates a list of media entries. /// Encapsulates a list of media entries.
/// </summary> /// </summary>
/// This class is necessary because we want to replace auto-serialization of MediaEntry with something more /// This class is necessary because we want to replace auto-serialization of MediaEntry with something more
/// OSD like and less vulnerable to change. /// OSD like and less vulnerable to change.
public class MediaList : List<MediaEntry>, IXmlSerializable public class MediaList : List<MediaEntry>, IXmlSerializable
{ {
public const string MEDIA_TEXTURE_TYPE = "sl"; public const string MEDIA_TEXTURE_TYPE = "sl";
public MediaList() : base() {} public MediaList() : base() {}
public MediaList(IEnumerable<MediaEntry> collection) : base(collection) {} public MediaList(IEnumerable<MediaEntry> collection) : base(collection) {}
public MediaList(int capacity) : base(capacity) {} public MediaList(int capacity) : base(capacity) {}
public XmlSchema GetSchema() public XmlSchema GetSchema()
{ {
return null; return null;
} }
public string ToXml() public string ToXml()
{ {
lock (this) lock (this)
@ -1245,78 +1245,78 @@ namespace OpenSim.Framework
using (StringWriter sw = new StringWriter()) using (StringWriter sw = new StringWriter())
{ {
using (XmlTextWriter xtw = new XmlTextWriter(sw)) using (XmlTextWriter xtw = new XmlTextWriter(sw))
{ {
xtw.WriteStartElement("OSMedia"); xtw.WriteStartElement("OSMedia");
xtw.WriteAttributeString("type", MEDIA_TEXTURE_TYPE); xtw.WriteAttributeString("type", MEDIA_TEXTURE_TYPE);
xtw.WriteAttributeString("version", "0.1"); xtw.WriteAttributeString("version", "0.1");
OSDArray meArray = new OSDArray(); OSDArray meArray = new OSDArray();
foreach (MediaEntry me in this) foreach (MediaEntry me in this)
{ {
OSD osd = (null == me ? new OSD() : me.GetOSD()); OSD osd = (null == me ? new OSD() : me.GetOSD());
meArray.Add(osd); meArray.Add(osd);
} }
xtw.WriteStartElement("OSData"); xtw.WriteStartElement("OSData");
xtw.WriteRaw(OSDParser.SerializeLLSDXmlString(meArray)); xtw.WriteRaw(OSDParser.SerializeLLSDXmlString(meArray));
xtw.WriteEndElement(); xtw.WriteEndElement();
xtw.WriteEndElement(); xtw.WriteEndElement();
xtw.Flush(); xtw.Flush();
return sw.ToString(); return sw.ToString();
} }
} }
} }
} }
public void WriteXml(XmlWriter writer) public void WriteXml(XmlWriter writer)
{ {
writer.WriteRaw(ToXml()); writer.WriteRaw(ToXml());
} }
public static MediaList FromXml(string rawXml) public static MediaList FromXml(string rawXml)
{ {
MediaList ml = new MediaList(); MediaList ml = new MediaList();
ml.ReadXml(rawXml); ml.ReadXml(rawXml);
return ml; return ml;
} }
public void ReadXml(string rawXml) public void ReadXml(string rawXml)
{ {
using (StringReader sr = new StringReader(rawXml)) using (StringReader sr = new StringReader(rawXml))
{ {
using (XmlTextReader xtr = new XmlTextReader(sr)) using (XmlTextReader xtr = new XmlTextReader(sr))
{ {
xtr.MoveToContent(); xtr.MoveToContent();
string type = xtr.GetAttribute("type"); string type = xtr.GetAttribute("type");
//m_log.DebugFormat("[MOAP]: Loaded media texture entry with type {0}", type); //m_log.DebugFormat("[MOAP]: Loaded media texture entry with type {0}", type);
if (type != MEDIA_TEXTURE_TYPE) if (type != MEDIA_TEXTURE_TYPE)
return; return;
xtr.ReadStartElement("OSMedia"); xtr.ReadStartElement("OSMedia");
OSDArray osdMeArray = (OSDArray)OSDParser.DeserializeLLSDXml(xtr.ReadInnerXml()); OSDArray osdMeArray = (OSDArray)OSDParser.DeserializeLLSDXml(xtr.ReadInnerXml());
foreach (OSD osdMe in osdMeArray) foreach (OSD osdMe in osdMeArray)
{ {
MediaEntry me = (osdMe is OSDMap ? MediaEntry.FromOSD(osdMe) : new MediaEntry()); MediaEntry me = (osdMe is OSDMap ? MediaEntry.FromOSD(osdMe) : new MediaEntry());
Add(me); Add(me);
} }
xtr.ReadEndElement(); xtr.ReadEndElement();
} }
} }
} }
public void ReadXml(XmlReader reader) public void ReadXml(XmlReader reader)
{ {
if (reader.IsEmptyElement) if (reader.IsEmptyElement)
return; return;
ReadXml(reader.ReadInnerXml()); ReadXml(reader.ReadInnerXml());
} }
} }
} }
} }

View File

@ -97,9 +97,9 @@ namespace OpenSim.Framework
[Serializable] [Serializable]
public class SimpleRegionInfo public class SimpleRegionInfo
{ {
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
/// <summary> /// <summary>
/// The port by which http communication occurs with the region (most noticeably, CAPS communication) /// The port by which http communication occurs with the region (most noticeably, CAPS communication)
/// </summary> /// </summary>
@ -344,7 +344,7 @@ namespace OpenSim.Framework
public string proxyUrl = ""; public string proxyUrl = "";
public int ProxyOffset = 0; public int ProxyOffset = 0;
public string regionSecret = UUID.Random().ToString(); public string regionSecret = UUID.Random().ToString();
public string osSecret; public string osSecret;
public UUID lastMapUUID = UUID.Zero; public UUID lastMapUUID = UUID.Zero;
@ -699,7 +699,7 @@ namespace OpenSim.Framework
RegionID = new UUID(regionUUID); RegionID = new UUID(regionUUID);
originRegionID = RegionID; // What IS this?! originRegionID = RegionID; // What IS this?!
RegionName = name; RegionName = name;
string location = config.GetString("Location", String.Empty); string location = config.GetString("Location", String.Empty);
@ -720,7 +720,7 @@ namespace OpenSim.Framework
// Internal IP // Internal IP
IPAddress address; IPAddress address;
if (config.Contains("InternalAddress")) if (config.Contains("InternalAddress"))
{ {
address = IPAddress.Parse(config.GetString("InternalAddress", String.Empty)); address = IPAddress.Parse(config.GetString("InternalAddress", String.Empty));
@ -774,7 +774,7 @@ namespace OpenSim.Framework
{ {
m_externalHostName = Util.GetLocalHost().ToString(); m_externalHostName = Util.GetLocalHost().ToString();
m_log.InfoFormat( m_log.InfoFormat(
"[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}", "[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}",
m_externalHostName, name); m_externalHostName, name);
} }
else else
@ -909,16 +909,16 @@ namespace OpenSim.Framework
configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
"Maximum size for nonphysical prims", m_nonphysPrimMax.ToString(), true); "Maximum size for nonphysical prims", m_nonphysPrimMax.ToString(), true);
configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
"Maximum size for physical prims", m_physPrimMax.ToString(), true); "Maximum size for physical prims", m_physPrimMax.ToString(), true);
configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
"Clamp prims to max size", m_clampPrimSize.ToString(), true); "Clamp prims to max size", m_clampPrimSize.ToString(), true);
configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
"Max objects this sim will hold", m_objectCapacity.ToString(), true); "Max objects this sim will hold", m_objectCapacity.ToString(), true);
configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID, configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
"Scope ID for this region", ScopeID.ToString(), true); "Scope ID for this region", ScopeID.ToString(), true);
@ -956,16 +956,16 @@ namespace OpenSim.Framework
configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true); "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true);
configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
"Maximum size for nonphysical prims", "0", true); "Maximum size for nonphysical prims", "0", true);
configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
"Maximum size for physical prims", "0", true); "Maximum size for physical prims", "0", true);
configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
"Clamp prims to max size", "false", true); "Clamp prims to max size", "false", true);
configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
"Max objects this sim will hold", "0", true); "Max objects this sim will hold", "0", true);

View File

@ -157,9 +157,9 @@ namespace OpenSim.Framework.Serialization
public static string CreateOarObjectFilename(string objectName, UUID uuid, Vector3 pos) public static string CreateOarObjectFilename(string objectName, UUID uuid, Vector3 pos)
{ {
return string.Format( return string.Format(
OAR_OBJECT_FILENAME_TEMPLATE, objectName, OAR_OBJECT_FILENAME_TEMPLATE, objectName,
Math.Round(pos.X), Math.Round(pos.Y), Math.Round(pos.Z), Math.Round(pos.X), Math.Round(pos.Y), Math.Round(pos.Z),
uuid); uuid);
} }
/// <summary> /// <summary>
@ -171,9 +171,9 @@ namespace OpenSim.Framework.Serialization
/// <returns></returns> /// <returns></returns>
public static string CreateOarObjectPath(string objectName, UUID uuid, Vector3 pos) public static string CreateOarObjectPath(string objectName, UUID uuid, Vector3 pos)
{ {
return OBJECTS_PATH + CreateOarObjectFilename(objectName, uuid, pos); return OBJECTS_PATH + CreateOarObjectFilename(objectName, uuid, pos);
} }
/// <summary> /// <summary>
/// Extract a plain path from an IAR path /// Extract a plain path from an IAR path
/// </summary> /// </summary>
@ -184,18 +184,18 @@ namespace OpenSim.Framework.Serialization
List<string> plainDirs = new List<string>(); List<string> plainDirs = new List<string>();
string[] iarDirs = iarPath.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); string[] iarDirs = iarPath.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
foreach (string iarDir in iarDirs) foreach (string iarDir in iarDirs)
{ {
if (!iarDir.Contains(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR)) if (!iarDir.Contains(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR))
plainDirs.Add(iarDir); plainDirs.Add(iarDir);
int i = iarDir.LastIndexOf(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR); int i = iarDir.LastIndexOf(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR);
plainDirs.Add(iarDir.Remove(i)); plainDirs.Add(iarDir.Remove(i));
} }
return string.Join("/", plainDirs.ToArray()); return string.Join("/", plainDirs.ToArray());
} }
} }
} }

View File

@ -51,7 +51,7 @@ namespace OpenSim.Framework.Servers.HttpServer
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private HttpServerLogWriter httpserverlog = new HttpServerLogWriter(); private HttpServerLogWriter httpserverlog = new HttpServerLogWriter();
private volatile int NotSocketErrors = 0; private volatile int NotSocketErrors = 0;
public volatile bool HTTPDRunning = false; public volatile bool HTTPDRunning = false;
@ -160,7 +160,7 @@ namespace OpenSim.Framework.Servers.HttpServer
m_rpcHandlers[method] = handler; m_rpcHandlers[method] = handler;
m_rpcHandlersKeepAlive[method] = keepAlive; // default m_rpcHandlersKeepAlive[method] = keepAlive; // default
} }
return true; return true;
} }
@ -182,7 +182,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public bool AddHTTPHandler(string methodName, GenericHTTPMethod handler) public bool AddHTTPHandler(string methodName, GenericHTTPMethod handler)
{ {
//m_log.DebugFormat("[BASE HTTP SERVER]: Registering {0}", methodName); //m_log.DebugFormat("[BASE HTTP SERVER]: Registering {0}", methodName);
lock (m_HTTPHandlers) lock (m_HTTPHandlers)
{ {
if (!m_HTTPHandlers.ContainsKey(methodName)) if (!m_HTTPHandlers.ContainsKey(methodName))
@ -204,14 +204,14 @@ namespace OpenSim.Framework.Servers.HttpServer
if (!m_pollHandlers.ContainsKey(methodName)) if (!m_pollHandlers.ContainsKey(methodName))
{ {
m_pollHandlers.Add(methodName,args); m_pollHandlers.Add(methodName,args);
pollHandlerResult = true; pollHandlerResult = true;
} }
} }
if (pollHandlerResult) if (pollHandlerResult)
return AddHTTPHandler(methodName, handler); return AddHTTPHandler(methodName, handler);
return false; return false;
} }
// Note that the agent string is provided simply to differentiate // Note that the agent string is provided simply to differentiate
@ -257,51 +257,51 @@ namespace OpenSim.Framework.Servers.HttpServer
{ {
IHttpClientContext context = (IHttpClientContext)source; IHttpClientContext context = (IHttpClientContext)source;
IHttpRequest request = args.Request; IHttpRequest request = args.Request;
PollServiceEventArgs psEvArgs; PollServiceEventArgs psEvArgs;
if (TryGetPollServiceHTTPHandler(request.UriPath.ToString(), out psEvArgs)) if (TryGetPollServiceHTTPHandler(request.UriPath.ToString(), out psEvArgs))
{ {
PollServiceHttpRequest psreq = new PollServiceHttpRequest(psEvArgs, context, request); PollServiceHttpRequest psreq = new PollServiceHttpRequest(psEvArgs, context, request);
if (psEvArgs.Request != null) if (psEvArgs.Request != null)
{ {
OSHttpRequest req = new OSHttpRequest(context, request); OSHttpRequest req = new OSHttpRequest(context, request);
Stream requestStream = req.InputStream; Stream requestStream = req.InputStream;
Encoding encoding = Encoding.UTF8; Encoding encoding = Encoding.UTF8;
StreamReader reader = new StreamReader(requestStream, encoding); StreamReader reader = new StreamReader(requestStream, encoding);
string requestBody = reader.ReadToEnd(); string requestBody = reader.ReadToEnd();
Hashtable keysvals = new Hashtable(); Hashtable keysvals = new Hashtable();
Hashtable headervals = new Hashtable(); Hashtable headervals = new Hashtable();
string[] querystringkeys = req.QueryString.AllKeys; string[] querystringkeys = req.QueryString.AllKeys;
string[] rHeaders = req.Headers.AllKeys; string[] rHeaders = req.Headers.AllKeys;
keysvals.Add("body", requestBody); keysvals.Add("body", requestBody);
keysvals.Add("uri", req.RawUrl); keysvals.Add("uri", req.RawUrl);
keysvals.Add("content-type", req.ContentType); keysvals.Add("content-type", req.ContentType);
keysvals.Add("http-method", req.HttpMethod); keysvals.Add("http-method", req.HttpMethod);
foreach (string queryname in querystringkeys) foreach (string queryname in querystringkeys)
{ {
keysvals.Add(queryname, req.QueryString[queryname]); keysvals.Add(queryname, req.QueryString[queryname]);
} }
foreach (string headername in rHeaders) foreach (string headername in rHeaders)
{ {
headervals[headername] = req.Headers[headername]; headervals[headername] = req.Headers[headername];
} }
keysvals.Add("headers", headervals); keysvals.Add("headers", headervals);
keysvals.Add("querystringkeys", querystringkeys); keysvals.Add("querystringkeys", querystringkeys);
psEvArgs.Request(psreq.RequestID, keysvals); psEvArgs.Request(psreq.RequestID, keysvals);
} }
m_PollServiceManager.Enqueue(psreq); m_PollServiceManager.Enqueue(psreq);
} }
else else
@ -348,10 +348,10 @@ namespace OpenSim.Framework.Servers.HttpServer
{ {
try try
{ {
// m_log.Debug("[BASE HTTP SERVER]: Handling request to " + request.RawUrl); // m_log.Debug("[BASE HTTP SERVER]: Handling request to " + request.RawUrl);
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true); Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true);
// This is the REST agent interface. We require an agent to properly identify // This is the REST agent interface. We require an agent to properly identify
// itself. If the REST handler recognizes the prefix it will attempt to // itself. If the REST handler recognizes the prefix it will attempt to
// satisfy the request. If it is not recognizable, and no damage has occurred // satisfy the request. If it is not recognizable, and no damage has occurred
@ -456,7 +456,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
request.InputStream.Close(); request.InputStream.Close();
// HTTP IN support. The script engine taes it from here // HTTP IN support. The script engine taes it from here
// Nothing to worry about for us. // Nothing to worry about for us.
// //
@ -540,7 +540,7 @@ namespace OpenSim.Framework.Servers.HttpServer
HandleLLSDRequests(request, response); HandleLLSDRequests(request, response);
return; return;
} }
// m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl); // m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl);
if (DoWeHaveAHTTPHandler(request.RawUrl)) if (DoWeHaveAHTTPHandler(request.RawUrl))
{ {
@ -594,7 +594,7 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
} }
} }
if (String.IsNullOrEmpty(bestMatch)) if (String.IsNullOrEmpty(bestMatch))
{ {
streamHandler = null; streamHandler = null;
@ -641,7 +641,7 @@ namespace OpenSim.Framework.Servers.HttpServer
private bool TryGetHTTPHandler(string handlerKey, out GenericHTTPMethod HTTPHandler) private bool TryGetHTTPHandler(string handlerKey, out GenericHTTPMethod HTTPHandler)
{ {
// m_log.DebugFormat("[BASE HTTP HANDLER]: Looking for HTTP handler for {0}", handlerKey); // m_log.DebugFormat("[BASE HTTP HANDLER]: Looking for HTTP handler for {0}", handlerKey);
string bestMatch = null; string bestMatch = null;
lock (m_HTTPHandlers) lock (m_HTTPHandlers)
@ -727,14 +727,14 @@ namespace OpenSim.Framework.Servers.HttpServer
{ {
xmlRprcRequest.Params.Add(request.RemoteIPEndPoint); // Param[1] xmlRprcRequest.Params.Add(request.RemoteIPEndPoint); // Param[1]
XmlRpcResponse xmlRpcResponse; XmlRpcResponse xmlRpcResponse;
XmlRpcMethod method; XmlRpcMethod method;
bool methodWasFound; bool methodWasFound;
lock (m_rpcHandlers) lock (m_rpcHandlers)
{ {
methodWasFound = m_rpcHandlers.TryGetValue(methodName, out method); methodWasFound = m_rpcHandlers.TryGetValue(methodName, out method);
} }
if (methodWasFound) if (methodWasFound)
{ {
xmlRprcRequest.Params.Add(request.Url); // Param[2] xmlRprcRequest.Params.Add(request.Url); // Param[2]
@ -766,10 +766,10 @@ namespace OpenSim.Framework.Servers.HttpServer
else else
{ {
xmlRpcResponse = new XmlRpcResponse(); xmlRpcResponse = new XmlRpcResponse();
// Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php // Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
xmlRpcResponse.SetFault( xmlRpcResponse.SetFault(
XmlRpcErrorCodes.SERVER_ERROR_METHOD, XmlRpcErrorCodes.SERVER_ERROR_METHOD,
String.Format("Requested method [{0}] not found", methodName)); String.Format("Requested method [{0}] not found", methodName));
} }
@ -786,11 +786,11 @@ namespace OpenSim.Framework.Servers.HttpServer
response.KeepAlive = false; response.KeepAlive = false;
m_log.ErrorFormat("[BASE HTTP SERVER]: Handler not found for http request {0}", request.RawUrl); m_log.ErrorFormat("[BASE HTTP SERVER]: Handler not found for http request {0}", request.RawUrl);
response.SendChunked = false; response.SendChunked = false;
response.ContentLength64 = buf.Length; response.ContentLength64 = buf.Length;
response.ContentEncoding = Encoding.UTF8; response.ContentEncoding = Encoding.UTF8;
try try
{ {
response.OutputStream.Write(buf, 0, buf.Length); response.OutputStream.Write(buf, 0, buf.Length);
@ -872,13 +872,13 @@ namespace OpenSim.Framework.Servers.HttpServer
OSD llsdRequest = null; OSD llsdRequest = null;
OSD llsdResponse = null; OSD llsdResponse = null;
bool LegacyLLSDLoginLibOMV = (requestBody.Contains("passwd") && requestBody.Contains("mac") && requestBody.Contains("viewer_digest")); bool LegacyLLSDLoginLibOMV = (requestBody.Contains("passwd") && requestBody.Contains("mac") && requestBody.Contains("viewer_digest"));
if (requestBody.Length == 0) if (requestBody.Length == 0)
// Get Request // Get Request
{ {
requestBody = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><llsd><map><key>request</key><string>get</string></map></llsd>"; requestBody = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><llsd><map><key>request</key><string>get</string></map></llsd>";
} }
try try
{ {
@ -1090,7 +1090,7 @@ namespace OpenSim.Framework.Servers.HttpServer
string bestMatch = null; string bestMatch = null;
//m_log.DebugFormat("[BASE HTTP HANDLER]: Checking if we have an HTTP handler for {0}", searchquery); //m_log.DebugFormat("[BASE HTTP HANDLER]: Checking if we have an HTTP handler for {0}", searchquery);
lock (m_HTTPHandlers) lock (m_HTTPHandlers)
{ {
foreach (string pattern in m_HTTPHandlers.Keys) foreach (string pattern in m_HTTPHandlers.Keys)
@ -1156,7 +1156,7 @@ namespace OpenSim.Framework.Servers.HttpServer
// You have to specifically register for '/' and to get it, you must specificaly request it // You have to specifically register for '/' and to get it, you must specificaly request it
// //
if (pattern == "/" && searchquery == "/" || pattern != "/") if (pattern == "/" && searchquery == "/" || pattern != "/")
bestMatch = pattern; bestMatch = pattern;
} }
} }
} }
@ -1236,11 +1236,11 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
public void HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response) public void HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[BASE HTTP SERVER]: HandleHTTPRequest for request to {0}, method {1}", // "[BASE HTTP SERVER]: HandleHTTPRequest for request to {0}, method {1}",
// request.RawUrl, request.HttpMethod); // request.RawUrl, request.HttpMethod);
switch (request.HttpMethod) switch (request.HttpMethod)
{ {
case "OPTIONS": case "OPTIONS":
@ -1256,7 +1256,7 @@ namespace OpenSim.Framework.Servers.HttpServer
private void HandleContentVerbs(OSHttpRequest request, OSHttpResponse response) private void HandleContentVerbs(OSHttpRequest request, OSHttpResponse response)
{ {
// m_log.DebugFormat("[BASE HTTP SERVER]: HandleContentVerbs for request to {0}", request.RawUrl); // m_log.DebugFormat("[BASE HTTP SERVER]: HandleContentVerbs for request to {0}", request.RawUrl);
// This is a test. There's a workable alternative.. as this way sucks. // This is a test. There's a workable alternative.. as this way sucks.
// We'd like to put this into a text file parhaps that's easily editable. // We'd like to put this into a text file parhaps that's easily editable.
// //
@ -1391,7 +1391,7 @@ namespace OpenSim.Framework.Servers.HttpServer
// m_log.DebugFormat( // m_log.DebugFormat(
// "[BASE HTTP HANDLER]: TryGetHTTPHandlerPathBased() looking for HTTP handler to match {0}", searchquery); // "[BASE HTTP HANDLER]: TryGetHTTPHandlerPathBased() looking for HTTP handler to match {0}", searchquery);
lock (m_HTTPHandlers) lock (m_HTTPHandlers)
{ {
foreach (string pattern in m_HTTPHandlers.Keys) foreach (string pattern in m_HTTPHandlers.Keys)
@ -1452,7 +1452,7 @@ namespace OpenSim.Framework.Servers.HttpServer
//Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this
//and should check for NullReferenceExceptions //and should check for NullReferenceExceptions
if (string.IsNullOrEmpty(contentType)) if (string.IsNullOrEmpty(contentType))
{ {
contentType = "text/html"; contentType = "text/html";
@ -1472,8 +1472,8 @@ namespace OpenSim.Framework.Servers.HttpServer
byte[] buffer; byte[] buffer;
if (!(contentType.Contains("image") if (!(contentType.Contains("image")
|| contentType.Contains("x-shockwave-flash") || contentType.Contains("x-shockwave-flash")
|| contentType.Contains("application/x-oar"))) || contentType.Contains("application/x-oar")))
{ {
// Text // Text
@ -1504,7 +1504,7 @@ namespace OpenSim.Framework.Servers.HttpServer
{ {
response.OutputStream.Flush(); response.OutputStream.Flush();
response.Send(); response.Send();
//if (!response.KeepAlive && response.ReuseContext) //if (!response.KeepAlive && response.ReuseContext)
// response.FreeContext(); // response.FreeContext();
} }
@ -1611,11 +1611,11 @@ namespace OpenSim.Framework.Servers.HttpServer
m_httpListener2 = CoolHTTPListener.Create(m_listenIPAddress, (int)m_port); m_httpListener2 = CoolHTTPListener.Create(m_listenIPAddress, (int)m_port);
m_httpListener2.ExceptionThrown += httpServerException; m_httpListener2.ExceptionThrown += httpServerException;
m_httpListener2.LogWriter = httpserverlog; m_httpListener2.LogWriter = httpserverlog;
// Uncomment this line in addition to those in HttpServerLogWriter // Uncomment this line in addition to those in HttpServerLogWriter
// if you want more detailed trace information from the HttpServer // if you want more detailed trace information from the HttpServer
//m_httpListener2.UseTraceLogs = true; //m_httpListener2.UseTraceLogs = true;
//m_httpListener2.DisconnectHandler = httpServerDisconnectMonitor; //m_httpListener2.DisconnectHandler = httpServerDisconnectMonitor;
} }
else else
@ -1643,8 +1643,8 @@ namespace OpenSim.Framework.Servers.HttpServer
{ {
m_log.Error("[BASE HTTP SERVER]: Error - " + e.Message); m_log.Error("[BASE HTTP SERVER]: Error - " + e.Message);
m_log.Error("[BASE HTTP SERVER]: Tip: Do you have permission to listen on port " + m_port + ", " + m_sslport + "?"); m_log.Error("[BASE HTTP SERVER]: Tip: Do you have permission to listen on port " + m_port + ", " + m_sslport + "?");
// We want this exception to halt the entire server since in current configurations we aren't too // We want this exception to halt the entire server since in current configurations we aren't too
// useful without inbound HTTP. // useful without inbound HTTP.
throw e; throw e;
} }
@ -1656,7 +1656,7 @@ namespace OpenSim.Framework.Servers.HttpServer
{ {
case SocketError.NotSocket: case SocketError.NotSocket:
NotSocketErrors++; NotSocketErrors++;
break; break;
} }
} }
@ -1686,12 +1686,11 @@ namespace OpenSim.Framework.Servers.HttpServer
m_httpListener2.LogWriter = null; m_httpListener2.LogWriter = null;
m_httpListener2.RequestReceived -= OnRequest; m_httpListener2.RequestReceived -= OnRequest;
m_httpListener2.Stop(); m_httpListener2.Stop();
} }
catch (NullReferenceException) catch (NullReferenceException)
{ {
m_log.Warn("[BASE HTTP SERVER]: Null Reference when stopping HttpServer."); m_log.Warn("[BASE HTTP SERVER]: Null Reference when stopping HttpServer.");
} }
} }
public void RemoveStreamHandler(string httpMethod, string path) public void RemoveStreamHandler(string httpMethod, string path)
@ -1712,7 +1711,7 @@ namespace OpenSim.Framework.Servers.HttpServer
m_HTTPHandlers.Remove(path); m_HTTPHandlers.Remove(path);
return; return;
} }
m_HTTPHandlers.Remove(GetHandlerKey(httpMethod, path)); m_HTTPHandlers.Remove(GetHandlerKey(httpMethod, path));
} }
} }
@ -1728,7 +1727,6 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
RemoveHTTPHandler(httpMethod, path); RemoveHTTPHandler(httpMethod, path);
} }
public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler) public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler)
@ -1759,7 +1757,6 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
} }
public bool RemoveLLSDHandler(string path, LLSDMethod handler) public bool RemoveLLSDHandler(string path, LLSDMethod handler)
{ {
try try
@ -1833,7 +1830,7 @@ namespace OpenSim.Framework.Servers.HttpServer
oresp = osresp; oresp = osresp;
} }
} }
/// <summary> /// <summary>
/// Relays HttpServer log messages to our own logging mechanism. /// Relays HttpServer log messages to our own logging mechanism.
/// </summary> /// </summary>
@ -1852,7 +1849,7 @@ namespace OpenSim.Framework.Servers.HttpServer
{ {
case LogPrio.Trace: case LogPrio.Trace:
m_log.DebugFormat("[{0}]: {1}", source, message); m_log.DebugFormat("[{0}]: {1}", source, message);
break; break;
case LogPrio.Debug: case LogPrio.Debug:
m_log.DebugFormat("[{0}]: {1}", source, message); m_log.DebugFormat("[{0}]: {1}", source, message);
break; break;
@ -1872,8 +1869,8 @@ namespace OpenSim.Framework.Servers.HttpServer
break; break;
} }
*/ */
return; return;
} }
} }
} }

View File

@ -225,7 +225,7 @@ namespace OpenSim
} }
} }
MainConsole.Instance = null; MainConsole.Instance = null;
} }
*/ */
configSource.Alias.AddAlias("On", true); configSource.Alias.AddAlias("On", true);
configSource.Alias.AddAlias("Off", false); configSource.Alias.AddAlias("Off", false);

View File

@ -152,7 +152,7 @@ namespace OpenSim
RegisterConsoleCommands(); RegisterConsoleCommands();
base.StartupSpecific(); base.StartupSpecific();
MainServer.Instance.AddStreamHandler(new OpenSim.SimStatusHandler()); MainServer.Instance.AddStreamHandler(new OpenSim.SimStatusHandler());
MainServer.Instance.AddStreamHandler(new OpenSim.XSimStatusHandler(this)); MainServer.Instance.AddStreamHandler(new OpenSim.XSimStatusHandler(this));
if (userStatsURI != String.Empty) if (userStatsURI != String.Empty)
@ -192,7 +192,7 @@ namespace OpenSim
// Hook up to the watchdog timer // Hook up to the watchdog timer
Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler; Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler;
PrintFileToConsole("startuplogo.txt"); PrintFileToConsole("startuplogo.txt");
// For now, start at the 'root' level by default // For now, start at the 'root' level by default
if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it
@ -218,8 +218,8 @@ namespace OpenSim
m_console.Commands.AddCommand("region", false, "debug packet", m_console.Commands.AddCommand("region", false, "debug packet",
"debug packet <level>", "debug packet <level>",
"Turn on packet debugging", "Turn on packet debugging",
"If level > 255 then all incoming and outgoing packets are logged.\n" "If level > 255 then all incoming and outgoing packets are logged.\n"
+ "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n" + "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n"
+ "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n" + "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n"
+ "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n" + "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n"
@ -561,11 +561,11 @@ namespace OpenSim
{ {
regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source, regionName); regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source, regionName);
} }
IScene scene; IScene scene;
PopulateRegionEstateInfo(regInfo); PopulateRegionEstateInfo(regInfo);
CreateRegion(regInfo, true, out scene); CreateRegion(regInfo, true, out scene);
regInfo.EstateSettings.Save(); regInfo.EstateSettings.Save();
} }
/// <summary> /// <summary>
@ -943,7 +943,7 @@ namespace OpenSim
delegate(Scene scene) delegate(Scene scene)
{ {
MainConsole.Instance.Output(String.Format( MainConsole.Instance.Output(String.Format(
"Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}", "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}",
scene.RegionInfo.RegionName, scene.RegionInfo.RegionName,
scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocX,
scene.RegionInfo.RegionLocY, scene.RegionInfo.RegionLocY,

View File

@ -63,7 +63,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details. /// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details.
/// </value> /// </value>
protected int m_debugPacketLevel = 0; protected int m_debugPacketLevel = 0;
#region Events #region Events
public event GenericMessage OnGenericMessage; public event GenericMessage OnGenericMessage;
@ -287,7 +287,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public event MuteListEntryRemove OnRemoveMuteListEntry; public event MuteListEntryRemove OnRemoveMuteListEntry;
public event GodlikeMessage onGodlikeMessage; public event GodlikeMessage onGodlikeMessage;
public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
#endregion Events #endregion Events
@ -329,12 +328,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// ownerless phantom. /// ownerless phantom.
/// ///
/// All manipulation of this set has to occur under an m_entityUpdates.SyncRoot lock /// All manipulation of this set has to occur under an m_entityUpdates.SyncRoot lock
/// ///
/// </value> /// </value>
protected HashSet<uint> m_killRecord; protected HashSet<uint> m_killRecord;
// protected HashSet<uint> m_attachmentsSent; // protected HashSet<uint> m_attachmentsSent;
private int m_moneyBalance; private int m_moneyBalance;
private int m_animationSequenceNumber = 1; private int m_animationSequenceNumber = 1;
private bool m_SendLogoutPacketWhenClosing = true; private bool m_SendLogoutPacketWhenClosing = true;
@ -383,22 +382,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public string ActiveGroupName { get { return m_activeGroupName; } } public string ActiveGroupName { get { return m_activeGroupName; } }
public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } } public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } }
public bool IsGroupMember(UUID groupID) { return m_groupPowers.ContainsKey(groupID); } public bool IsGroupMember(UUID groupID) { return m_groupPowers.ContainsKey(groupID); }
/// <summary> /// <summary>
/// First name of the agent/avatar represented by the client /// First name of the agent/avatar represented by the client
/// </summary> /// </summary>
public string FirstName { get { return m_firstName; } } public string FirstName { get { return m_firstName; } }
/// <summary> /// <summary>
/// Last name of the agent/avatar represented by the client /// Last name of the agent/avatar represented by the client
/// </summary> /// </summary>
public string LastName { get { return m_lastName; } } public string LastName { get { return m_lastName; } }
/// <summary> /// <summary>
/// Full name of the client (first name and last name) /// Full name of the client (first name and last name)
/// </summary> /// </summary>
public string Name { get { return FirstName + " " + LastName; } } public string Name { get { return FirstName + " " + LastName; } }
public uint CircuitCode { get { return m_circuitCode; } } public uint CircuitCode { get { return m_circuitCode; } }
public int MoneyBalance { get { return m_moneyBalance; } } public int MoneyBalance { get { return m_moneyBalance; } }
public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } } public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } }
@ -440,7 +439,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_entityUpdates = new PriorityQueue(m_scene.Entities.Count); m_entityUpdates = new PriorityQueue(m_scene.Entities.Count);
m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>(); m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>();
m_killRecord = new HashSet<uint>(); m_killRecord = new HashSet<uint>();
// m_attachmentsSent = new HashSet<uint>(); // m_attachmentsSent = new HashSet<uint>();
m_assetService = m_scene.RequestModuleInterface<IAssetService>(); m_assetService = m_scene.RequestModuleInterface<IAssetService>();
m_GroupsModule = scene.RequestModuleInterface<IGroupsModule>(); m_GroupsModule = scene.RequestModuleInterface<IGroupsModule>();
@ -654,7 +653,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Make sure that we see any exception caused by the asynchronous operation. // Make sure that we see any exception caused by the asynchronous operation.
m_log.Error( m_log.Error(
string.Format("[LLCLIENTVIEW]: Caught exception while processing {0}", packetObject.Pack), e); string.Format("[LLCLIENTVIEW]: Caught exception while processing {0}", packetObject.Pack), e);
} }
} }
#endregion Packet Handling #endregion Packet Handling
@ -865,7 +864,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
foreach (GroupActiveProposals Proposal in Proposals) foreach (GroupActiveProposals Proposal in Proposals)
{ {
GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket();
GAPIRP.AgentData.AgentID = AgentId; GAPIRP.AgentData.AgentID = AgentId;
GAPIRP.AgentData.GroupID = groupID; GAPIRP.AgentData.GroupID = groupID;
GAPIRP.TransactionData.TransactionID = transactionID; GAPIRP.TransactionData.TransactionID = transactionID;
@ -889,7 +888,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (Proposals.Length == 0) if (Proposals.Length == 0)
{ {
GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket();
GAPIRP.AgentData.AgentID = AgentId; GAPIRP.AgentData.AgentID = AgentId;
GAPIRP.AgentData.GroupID = groupID; GAPIRP.AgentData.GroupID = groupID;
GAPIRP.TransactionData.TransactionID = transactionID; GAPIRP.TransactionData.TransactionID = transactionID;
@ -944,7 +943,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (Votes.Length == 0) if (Votes.Length == 0)
{ {
GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket();
GVHIRP.AgentData.AgentID = AgentId; GVHIRP.AgentData.AgentID = AgentId;
GVHIRP.AgentData.GroupID = groupID; GVHIRP.AgentData.GroupID = groupID;
GVHIRP.TransactionData.TransactionID = transactionID; GVHIRP.TransactionData.TransactionID = transactionID;
@ -968,7 +967,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(GVHIRP, ThrottleOutPacketType.Task); OutPacket(GVHIRP, ThrottleOutPacketType.Task);
} }
} }
public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
{ {
GroupAccountDetailsReplyPacket GADRP = new GroupAccountDetailsReplyPacket(); GroupAccountDetailsReplyPacket GADRP = new GroupAccountDetailsReplyPacket();
@ -987,13 +986,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
GADRP.HistoryData[0] = History; GADRP.HistoryData[0] = History;
OutPacket(GADRP, ThrottleOutPacketType.Task); OutPacket(GADRP, ThrottleOutPacketType.Task);
} }
public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
{ {
GroupAccountSummaryReplyPacket GASRP = GroupAccountSummaryReplyPacket GASRP =
(GroupAccountSummaryReplyPacket)PacketPool.Instance.GetPacket( (GroupAccountSummaryReplyPacket)PacketPool.Instance.GetPacket(
PacketType.GroupAccountSummaryReply); PacketType.GroupAccountSummaryReply);
GASRP.AgentData = new GroupAccountSummaryReplyPacket.AgentDataBlock(); GASRP.AgentData = new GroupAccountSummaryReplyPacket.AgentDataBlock();
GASRP.AgentData.AgentID = sender.AgentId; GASRP.AgentData.AgentID = sender.AgentId;
GASRP.AgentData.GroupID = groupID; GASRP.AgentData.GroupID = groupID;
@ -1020,13 +1019,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
GASRP.MoneyData.LightTaxEstimate = 0; GASRP.MoneyData.LightTaxEstimate = 0;
OutPacket(GASRP, ThrottleOutPacketType.Task); OutPacket(GASRP, ThrottleOutPacketType.Task);
} }
public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
{ {
GroupAccountTransactionsReplyPacket GATRP = GroupAccountTransactionsReplyPacket GATRP =
(GroupAccountTransactionsReplyPacket)PacketPool.Instance.GetPacket( (GroupAccountTransactionsReplyPacket)PacketPool.Instance.GetPacket(
PacketType.GroupAccountTransactionsReply); PacketType.GroupAccountTransactionsReply);
GATRP.AgentData = new GroupAccountTransactionsReplyPacket.AgentDataBlock(); GATRP.AgentData = new GroupAccountTransactionsReplyPacket.AgentDataBlock();
GATRP.AgentData.AgentID = sender.AgentId; GATRP.AgentData.AgentID = sender.AgentId;
GATRP.AgentData.GroupID = groupID; GATRP.AgentData.GroupID = groupID;
@ -1510,7 +1509,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendKillObject(ulong regionHandle, uint localID) public void SendKillObject(ulong regionHandle, uint localID)
{ {
// m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, localID, regionHandle); // m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, localID, regionHandle);
KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject); KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject);
// TODO: don't create new blocks if recycling an old packet // TODO: don't create new blocks if recycling an old packet
kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1]; kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1];
@ -3469,9 +3468,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence);
OutPacket(objupdate, ThrottleOutPacketType.Task); OutPacket(objupdate, ThrottleOutPacketType.Task);
// We need to record the avatar local id since the root prim of an attachment points to this. // We need to record the avatar local id since the root prim of an attachment points to this.
// m_attachmentsSent.Add(avatar.LocalId); // m_attachmentsSent.Add(avatar.LocalId);
} }
public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations)
@ -3519,7 +3518,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#region Primitive Packet/Data Sending Methods #region Primitive Packet/Data Sending Methods
/// <summary> /// <summary>
/// Generate one of the object update packets based on PrimUpdateFlags /// Generate one of the object update packets based on PrimUpdateFlags
/// and broadcast the packet to clients /// and broadcast the packet to clients
/// </summary> /// </summary>
public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
@ -3527,7 +3526,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
double priority = m_prioritizer.GetUpdatePriority(this, entity); double priority = m_prioritizer.GetUpdatePriority(this, entity);
lock (m_entityUpdates.SyncRoot) lock (m_entityUpdates.SyncRoot)
m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags), entity.LocalId); m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags), entity.LocalId);
} }
private void ProcessEntityUpdates(int maxUpdates) private void ProcessEntityUpdates(int maxUpdates)
@ -3544,20 +3543,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
EntityUpdate update; EntityUpdate update;
while (updatesThisCall < maxUpdates && m_entityUpdates.TryDequeue(out update)) while (updatesThisCall < maxUpdates && m_entityUpdates.TryDequeue(out update))
{ {
// Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client // Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client
// will never receive an update after a prim kill. Even then, keeping the kill record may be a good // will never receive an update after a prim kill. Even then, keeping the kill record may be a good
// safety measure. // safety measure.
// //
// Receiving updates after kills results in undeleteable prims that persist until relog and // Receiving updates after kills results in undeleteable prims that persist until relog and
// currently occurs because prims can be deleted before all queued updates are sent. // currently occurs because prims can be deleted before all queued updates are sent.
if (m_killRecord.Contains(update.Entity.LocalId)) if (m_killRecord.Contains(update.Entity.LocalId))
{ {
// m_log.WarnFormat( // m_log.WarnFormat(
// "[CLIENT]: Preventing full update for prim with local id {0} after client for user {1} told it was deleted", // "[CLIENT]: Preventing full update for prim with local id {0} after client for user {1} told it was deleted",
// update.Entity.LocalId, Name); // update.Entity.LocalId, Name);
continue; continue;
} }
if (update.Entity is SceneObjectPart) if (update.Entity is SceneObjectPart)
{ {
SceneObjectPart part = (SceneObjectPart)update.Entity; SceneObjectPart part = (SceneObjectPart)update.Entity;
@ -3642,28 +3641,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// string text = sop.Text; // string text = sop.Text;
// if (text.IndexOf("\n") >= 0) // if (text.IndexOf("\n") >= 0)
// text = text.Remove(text.IndexOf("\n")); // text = text.Remove(text.IndexOf("\n"));
// //
// if (m_attachmentsSent.Contains(sop.ParentID)) // if (m_attachmentsSent.Contains(sop.ParentID))
// { // {
//// m_log.DebugFormat( //// m_log.DebugFormat(
//// "[CLIENT]: Sending full info about attached prim {0} text {1}", //// "[CLIENT]: Sending full info about attached prim {0} text {1}",
//// sop.LocalId, text); //// sop.LocalId, text);
// //
// objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock(sop, this.m_agentId)); // objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock(sop, this.m_agentId));
// //
// m_attachmentsSent.Add(sop.LocalId); // m_attachmentsSent.Add(sop.LocalId);
// } // }
// else // else
// { // {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[CLIENT]: Requeueing full update of prim {0} text {1} since we haven't sent its parent {2} yet", // "[CLIENT]: Requeueing full update of prim {0} text {1} since we haven't sent its parent {2} yet",
// sop.LocalId, text, sop.ParentID); // sop.LocalId, text, sop.ParentID);
// //
// m_entityUpdates.Enqueue(double.MaxValue, update, sop.LocalId); // m_entityUpdates.Enqueue(double.MaxValue, update, sop.LocalId);
// } // }
// } // }
// else // else
// { // {
objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId)); objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId));
// } // }
} }
@ -3977,7 +3976,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_propertiesPacketTimer.Stop(); m_propertiesPacketTimer.Stop();
return; return;
} }
m_propertiesPacketTimer.Stop(); m_propertiesPacketTimer.Stop();
m_propertiesPacketTimer.Start(); m_propertiesPacketTimer.Start();
} }
@ -4208,7 +4207,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
{ {
ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage(); ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage();
updateMessage.AABBMax = landData.AABBMax; updateMessage.AABBMax = landData.AABBMax;
updateMessage.AABBMin = landData.AABBMin; updateMessage.AABBMin = landData.AABBMin;
@ -4252,7 +4251,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
updateMessage.PassHours = landData.PassHours; updateMessage.PassHours = landData.PassHours;
updateMessage.PassPrice = landData.PassPrice; updateMessage.PassPrice = landData.PassPrice;
updateMessage.PublicCount = 0; //TODO: Unimplemented updateMessage.PublicCount = 0; //TODO: Unimplemented
updateMessage.RegionPushOverride = (regionFlags & (uint)RegionFlags.RestrictPushObject) > 0; updateMessage.RegionPushOverride = (regionFlags & (uint)RegionFlags.RestrictPushObject) > 0;
updateMessage.RegionDenyAnonymous = (regionFlags & (uint)RegionFlags.DenyAnonymous) > 0; updateMessage.RegionDenyAnonymous = (regionFlags & (uint)RegionFlags.DenyAnonymous) > 0;
@ -4282,13 +4281,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
updateMessage.UserLocation = landData.UserLocation; updateMessage.UserLocation = landData.UserLocation;
updateMessage.UserLookAt = landData.UserLookAt; updateMessage.UserLookAt = landData.UserLookAt;
updateMessage.MediaType = landData.MediaType; updateMessage.MediaType = landData.MediaType;
updateMessage.MediaDesc = landData.MediaDescription; updateMessage.MediaDesc = landData.MediaDescription;
updateMessage.MediaWidth = landData.MediaWidth; updateMessage.MediaWidth = landData.MediaWidth;
updateMessage.MediaHeight = landData.MediaHeight; updateMessage.MediaHeight = landData.MediaHeight;
updateMessage.MediaLoop = landData.MediaLoop; updateMessage.MediaLoop = landData.MediaLoop;
updateMessage.ObscureMusic = landData.ObscureMusic; updateMessage.ObscureMusic = landData.ObscureMusic;
updateMessage.ObscureMedia = landData.ObscureMedia; updateMessage.ObscureMedia = landData.ObscureMedia;
try try
{ {
@ -4297,8 +4296,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
eq.ParcelProperties(updateMessage, this.AgentId); eq.ParcelProperties(updateMessage, this.AgentId);
} else { } else {
m_log.Warn("No EQ Interface when sending parcel data."); m_log.Warn("No EQ Interface when sending parcel data.");
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -4671,9 +4670,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
// m_log.DebugFormat( // m_log.DebugFormat(
// "[LLCLIENTVIEW]: Constructing client update for part {0} {1} with flags {2}, localId {3}", // "[LLCLIENTVIEW]: Constructing client update for part {0} {1} with flags {2}, localId {3}",
// data.Name, update.FullID, flags, update.ID); // data.Name, update.FullID, flags, update.ID);
update.UpdateFlags = (uint)flags; update.UpdateFlags = (uint)flags;
#endregion PrimFlags #endregion PrimFlags
@ -4806,11 +4805,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale); AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale);
AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation); AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation);
AddLocalPacketHandler(PacketType.ObjectFlagUpdate, HandleObjectFlagUpdate); AddLocalPacketHandler(PacketType.ObjectFlagUpdate, HandleObjectFlagUpdate);
// Handle ObjectImage (TextureEntry) updates synchronously, since when updating multiple prim faces at once, // Handle ObjectImage (TextureEntry) updates synchronously, since when updating multiple prim faces at once,
// some clients will send out a separate ObjectImage packet for each face // some clients will send out a separate ObjectImage packet for each face
AddLocalPacketHandler(PacketType.ObjectImage, HandleObjectImage, false); AddLocalPacketHandler(PacketType.ObjectImage, HandleObjectImage, false);
AddLocalPacketHandler(PacketType.ObjectGrab, HandleObjectGrab, false); AddLocalPacketHandler(PacketType.ObjectGrab, HandleObjectGrab, false);
AddLocalPacketHandler(PacketType.ObjectGrabUpdate, HandleObjectGrabUpdate, false); AddLocalPacketHandler(PacketType.ObjectGrabUpdate, HandleObjectGrabUpdate, false);
AddLocalPacketHandler(PacketType.ObjectDeGrab, HandleObjectDeGrab); AddLocalPacketHandler(PacketType.ObjectDeGrab, HandleObjectDeGrab);
@ -5065,12 +5064,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return false; return false;
} }
private bool HandleParcelGodMarkAsContent(IClientAPI client, Packet Packet) private bool HandleParcelGodMarkAsContent(IClientAPI client, Packet Packet)
{ {
ParcelGodMarkAsContentPacket ParcelGodMarkAsContent = ParcelGodMarkAsContentPacket ParcelGodMarkAsContent =
(ParcelGodMarkAsContentPacket)Packet; (ParcelGodMarkAsContentPacket)Packet;
ParcelGodMark ParcelGodMarkAsContentHandler = OnParcelGodMark; ParcelGodMark ParcelGodMarkAsContentHandler = OnParcelGodMark;
if (ParcelGodMarkAsContentHandler != null) if (ParcelGodMarkAsContentHandler != null)
{ {
@ -5081,11 +5080,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandleFreezeUser(IClientAPI client, Packet Packet) private bool HandleFreezeUser(IClientAPI client, Packet Packet)
{ {
FreezeUserPacket FreezeUser = (FreezeUserPacket)Packet; FreezeUserPacket FreezeUser = (FreezeUserPacket)Packet;
FreezeUserUpdate FreezeUserHandler = OnParcelFreezeUser; FreezeUserUpdate FreezeUserHandler = OnParcelFreezeUser;
if (FreezeUserHandler != null) if (FreezeUserHandler != null)
{ {
@ -5097,12 +5096,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandleEjectUser(IClientAPI client, Packet Packet) private bool HandleEjectUser(IClientAPI client, Packet Packet)
{ {
EjectUserPacket EjectUser = EjectUserPacket EjectUser =
(EjectUserPacket)Packet; (EjectUserPacket)Packet;
EjectUserUpdate EjectUserHandler = OnParcelEjectUser; EjectUserUpdate EjectUserHandler = OnParcelEjectUser;
if (EjectUserHandler != null) if (EjectUserHandler != null)
{ {
@ -5114,12 +5113,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandleParcelBuyPass(IClientAPI client, Packet Packet) private bool HandleParcelBuyPass(IClientAPI client, Packet Packet)
{ {
ParcelBuyPassPacket ParcelBuyPass = ParcelBuyPassPacket ParcelBuyPass =
(ParcelBuyPassPacket)Packet; (ParcelBuyPassPacket)Packet;
ParcelBuyPass ParcelBuyPassHandler = OnParcelBuyPass; ParcelBuyPass ParcelBuyPassHandler = OnParcelBuyPass;
if (ParcelBuyPassHandler != null) if (ParcelBuyPassHandler != null)
{ {
@ -5130,7 +5129,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandleParcelBuyRequest(IClientAPI sender, Packet Pack) private bool HandleParcelBuyRequest(IClientAPI sender, Packet Pack)
{ {
ParcelBuyPacket parcel = (ParcelBuyPacket)Pack; ParcelBuyPacket parcel = (ParcelBuyPacket)Pack;
@ -5352,7 +5351,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack; ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack;
//m_log.DebugFormat("[CLIENT]: Received ScriptDialogReply from {0}", rdialog.Data.ObjectID); //m_log.DebugFormat("[CLIENT]: Received ScriptDialogReply from {0}", rdialog.Data.ObjectID);
#region Packet Session and User Check #region Packet Session and User Check
if (m_checkPackets) if (m_checkPackets)
{ {
@ -5498,12 +5497,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return true; return true;
} }
private bool HandleFindAgent(IClientAPI client, Packet Packet) private bool HandleFindAgent(IClientAPI client, Packet Packet)
{ {
FindAgentPacket FindAgent = FindAgentPacket FindAgent =
(FindAgentPacket)Packet; (FindAgentPacket)Packet;
FindAgentUpdate FindAgentHandler = OnFindAgent; FindAgentUpdate FindAgentHandler = OnFindAgent;
if (FindAgentHandler != null) if (FindAgentHandler != null)
{ {
@ -5512,12 +5511,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandleTrackAgent(IClientAPI client, Packet Packet) private bool HandleTrackAgent(IClientAPI client, Packet Packet)
{ {
TrackAgentPacket TrackAgent = TrackAgentPacket TrackAgent =
(TrackAgentPacket)Packet; (TrackAgentPacket)Packet;
TrackAgentUpdate TrackAgentHandler = OnTrackAgent; TrackAgentUpdate TrackAgentHandler = OnTrackAgent;
if (TrackAgentHandler != null) if (TrackAgentHandler != null)
{ {
@ -5528,7 +5527,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandlerRezObject(IClientAPI sender, Packet Pack) private bool HandlerRezObject(IClientAPI sender, Packet Pack)
{ {
RezObjectPacket rezPacket = (RezObjectPacket)Pack; RezObjectPacket rezPacket = (RezObjectPacket)Pack;
@ -7184,19 +7183,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
UUID requestID = new UUID(transfer.TransferInfo.Params, 80); UUID requestID = new UUID(transfer.TransferInfo.Params, 80);
// m_log.DebugFormat( // m_log.DebugFormat(
// "[CLIENT]: Got request for asset {0} from item {1} in prim {2} by {3}", // "[CLIENT]: Got request for asset {0} from item {1} in prim {2} by {3}",
// requestID, itemID, taskID, Name); // requestID, itemID, taskID, Name);
if (!(((Scene)m_scene).Permissions.BypassPermissions())) if (!(((Scene)m_scene).Permissions.BypassPermissions()))
{ {
if (taskID != UUID.Zero) // Prim if (taskID != UUID.Zero) // Prim
{ {
SceneObjectPart part = ((Scene)m_scene).GetSceneObjectPart(taskID); SceneObjectPart part = ((Scene)m_scene).GetSceneObjectPart(taskID);
if (part == null) if (part == null)
{ {
m_log.WarnFormat( m_log.WarnFormat(
"[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but prim does not exist", "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but prim does not exist",
Name, requestID, itemID, taskID); Name, requestID, itemID, taskID);
return true; return true;
} }
@ -7205,11 +7204,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (tii == null) if (tii == null)
{ {
m_log.WarnFormat( m_log.WarnFormat(
"[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item does not exist", "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item does not exist",
Name, requestID, itemID, taskID); Name, requestID, itemID, taskID);
return true; return true;
} }
if (tii.Type == (int)AssetType.LSLText) if (tii.Type == (int)AssetType.LSLText)
{ {
if (!((Scene)m_scene).Permissions.CanEditScript(itemID, taskID, AgentId)) if (!((Scene)m_scene).Permissions.CanEditScript(itemID, taskID, AgentId))
@ -7228,41 +7227,41 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
m_log.WarnFormat( m_log.WarnFormat(
"[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the prim is owned by {4}", "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the prim is owned by {4}",
Name, requestID, itemID, taskID, part.OwnerID); Name, requestID, itemID, taskID, part.OwnerID);
return true; return true;
} }
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
{ {
m_log.WarnFormat( m_log.WarnFormat(
"[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but modify permissions are not set", "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but modify permissions are not set",
Name, requestID, itemID, taskID); Name, requestID, itemID, taskID);
return true; return true;
} }
if (tii.OwnerID != AgentId) if (tii.OwnerID != AgentId)
{ {
m_log.WarnFormat( m_log.WarnFormat(
"[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the item is owned by {4}", "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the item is owned by {4}",
Name, requestID, itemID, taskID, tii.OwnerID); Name, requestID, itemID, taskID, tii.OwnerID);
return true; return true;
} }
if (( if ((
tii.CurrentPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) tii.CurrentPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
!= ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
{ {
m_log.WarnFormat( m_log.WarnFormat(
"[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item permissions are not modify/copy/transfer", "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item permissions are not modify/copy/transfer",
Name, requestID, itemID, taskID); Name, requestID, itemID, taskID);
return true; return true;
} }
if (tii.AssetID != requestID) if (tii.AssetID != requestID)
{ {
m_log.WarnFormat( m_log.WarnFormat(
"[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but this does not match item's asset {4}", "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but this does not match item's asset {4}",
Name, requestID, itemID, taskID, tii.AssetID); Name, requestID, itemID, taskID, tii.AssetID);
return true; return true;
} }
} }
@ -7866,7 +7865,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
newTaskItem, updatetask.UpdateData.LocalID); newTaskItem, updatetask.UpdateData.LocalID);
} }
} }
} }
return true; return true;
} }
@ -8861,7 +8860,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// return true; // return true;
} }
private bool HandleRequestRegionInfo(IClientAPI sender, Packet Pack) private bool HandleRequestRegionInfo(IClientAPI sender, Packet Pack)
{ {
RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData; RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData;
@ -8882,7 +8881,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return true; return true;
} }
private bool HandleEstateCovenantRequest(IClientAPI sender, Packet Pack) private bool HandleEstateCovenantRequest(IClientAPI sender, Packet Pack)
{ {
@ -8919,7 +8918,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return true; return true;
} }
private bool HandleGodUpdateRegionInfoUpdate(IClientAPI client, Packet Packet) private bool HandleGodUpdateRegionInfoUpdate(IClientAPI client, Packet Packet)
{ {
GodUpdateRegionInfoPacket GodUpdateRegionInfo = GodUpdateRegionInfoPacket GodUpdateRegionInfo =
@ -8939,7 +8938,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandleSimWideDeletes(IClientAPI client, Packet Packet) private bool HandleSimWideDeletes(IClientAPI client, Packet Packet)
{ {
SimWideDeletesPacket SimWideDeletesRequest = SimWideDeletesPacket SimWideDeletesRequest =
@ -8952,7 +8951,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandleGodlikeMessage(IClientAPI client, Packet Packet) private bool HandleGodlikeMessage(IClientAPI client, Packet Packet)
{ {
GodlikeMessagePacket GodlikeMessage = GodlikeMessagePacket GodlikeMessage =
@ -8969,7 +8968,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandleSaveStatePacket(IClientAPI client, Packet Packet) private bool HandleSaveStatePacket(IClientAPI client, Packet Packet)
{ {
StateSavePacket SaveStateMessage = StateSavePacket SaveStateMessage =
@ -8982,7 +8981,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandleGodKickUser(IClientAPI sender, Packet Pack) private bool HandleGodKickUser(IClientAPI sender, Packet Pack)
{ {
GodKickUserPacket gkupack = (GodKickUserPacket)Pack; GodKickUserPacket gkupack = (GodKickUserPacket)Pack;
@ -9120,7 +9119,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return true; return true;
} }
#endregion Economy/Transaction Packets #endregion Economy/Transaction Packets
#region Script Packets #region Script Packets
@ -9333,7 +9332,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return true; return true;
} }
private bool HandleUpdateMuteListEntry(IClientAPI client, Packet Packet) private bool HandleUpdateMuteListEntry(IClientAPI client, Packet Packet)
{ {
UpdateMuteListEntryPacket UpdateMuteListEntry = UpdateMuteListEntryPacket UpdateMuteListEntry =
@ -9349,7 +9348,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandleRemoveMuteListEntry(IClientAPI client, Packet Packet) private bool HandleRemoveMuteListEntry(IClientAPI client, Packet Packet)
{ {
RemoveMuteListEntryPacket RemoveMuteListEntry = RemoveMuteListEntryPacket RemoveMuteListEntry =
@ -9365,7 +9364,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandleUserReport(IClientAPI client, Packet Packet) private bool HandleUserReport(IClientAPI client, Packet Packet)
{ {
UserReportPacket UserReport = UserReportPacket UserReport =
@ -9390,7 +9389,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandleSendPostcard(IClientAPI client, Packet packet) private bool HandleSendPostcard(IClientAPI client, Packet packet)
{ {
// SendPostcardPacket SendPostcard = // SendPostcardPacket SendPostcard =
@ -9672,7 +9671,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return true; return true;
} }
private bool HandleGroupVoteHistoryRequest(IClientAPI client, Packet Packet) private bool HandleGroupVoteHistoryRequest(IClientAPI client, Packet Packet)
{ {
GroupVoteHistoryRequestPacket GroupVoteHistoryRequest = GroupVoteHistoryRequestPacket GroupVoteHistoryRequest =
@ -9685,7 +9684,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandleGroupActiveProposalsRequest(IClientAPI client, Packet Packet) private bool HandleGroupActiveProposalsRequest(IClientAPI client, Packet Packet)
{ {
GroupActiveProposalsRequestPacket GroupActiveProposalsRequest = GroupActiveProposalsRequestPacket GroupActiveProposalsRequest =
@ -9698,7 +9697,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandleGroupAccountDetailsRequest(IClientAPI client, Packet Packet) private bool HandleGroupAccountDetailsRequest(IClientAPI client, Packet Packet)
{ {
GroupAccountDetailsRequestPacket GroupAccountDetailsRequest = GroupAccountDetailsRequestPacket GroupAccountDetailsRequest =
@ -9711,7 +9710,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandleGroupAccountSummaryRequest(IClientAPI client, Packet Packet) private bool HandleGroupAccountSummaryRequest(IClientAPI client, Packet Packet)
{ {
GroupAccountSummaryRequestPacket GroupAccountSummaryRequest = GroupAccountSummaryRequestPacket GroupAccountSummaryRequest =
@ -9724,7 +9723,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandleGroupTransactionsDetailsRequest(IClientAPI client, Packet Packet) private bool HandleGroupTransactionsDetailsRequest(IClientAPI client, Packet Packet)
{ {
GroupAccountTransactionsRequestPacket GroupAccountTransactionsRequest = GroupAccountTransactionsRequestPacket GroupAccountTransactionsRequest =
@ -9737,7 +9736,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
return false; return false;
} }
private bool HandleGroupTitlesRequest(IClientAPI sender, Packet Pack) private bool HandleGroupTitlesRequest(IClientAPI sender, Packet Pack)
{ {
GroupTitlesRequestPacket groupTitlesRequest = GroupTitlesRequestPacket groupTitlesRequest =
@ -11185,26 +11184,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (m_debugPacketLevel > 0) if (m_debugPacketLevel > 0)
{ {
bool outputPacket = true; bool outputPacket = true;
if (m_debugPacketLevel <= 255 if (m_debugPacketLevel <= 255
&& (packet.Type == PacketType.SimStats || packet.Type == PacketType.SimulatorViewerTimeMessage)) && (packet.Type == PacketType.SimStats || packet.Type == PacketType.SimulatorViewerTimeMessage))
outputPacket = false; outputPacket = false;
if (m_debugPacketLevel <= 200 if (m_debugPacketLevel <= 200
&& && (packet.Type == PacketType.ImagePacket
(packet.Type == PacketType.ImagePacket
|| packet.Type == PacketType.ImageData || packet.Type == PacketType.ImageData
|| packet.Type == PacketType.LayerData || packet.Type == PacketType.LayerData
|| packet.Type == PacketType.CoarseLocationUpdate)) || packet.Type == PacketType.CoarseLocationUpdate))
outputPacket = false; outputPacket = false;
if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect)) if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect))
outputPacket = false; outputPacket = false;
if (outputPacket) if (outputPacket)
m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type); m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type);
} }
m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting); m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting);
} }
@ -11279,16 +11277,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (m_debugPacketLevel > 0) if (m_debugPacketLevel > 0)
{ {
bool outputPacket = true; bool outputPacket = true;
if (m_debugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate) if (m_debugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate)
outputPacket = false; outputPacket = false;
if (m_debugPacketLevel <= 200 && packet.Type == PacketType.RequestImage) if (m_debugPacketLevel <= 200 && packet.Type == PacketType.RequestImage)
outputPacket = false; outputPacket = false;
if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation)) if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation))
outputPacket = false; outputPacket = false;
if (outputPacket) if (outputPacket)
m_log.DebugFormat("[CLIENT]: Packet IN {0}", packet.Type); m_log.DebugFormat("[CLIENT]: Packet IN {0}", packet.Type);
} }
@ -11551,12 +11549,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
UUID requestID = UUID.Zero; UUID requestID = UUID.Zero;
byte source = (byte)SourceType.Asset; byte source = (byte)SourceType.Asset;
if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset)
{ {
requestID = new UUID(transferRequest.TransferInfo.Params, 0); requestID = new UUID(transferRequest.TransferInfo.Params, 0);
} }
else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem) else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem)
{ {
requestID = new UUID(transferRequest.TransferInfo.Params, 80); requestID = new UUID(transferRequest.TransferInfo.Params, 80);
source = (byte)SourceType.SimInventoryItem; source = (byte)SourceType.SimInventoryItem;
@ -11802,7 +11800,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public PacketMethod method; public PacketMethod method;
public bool Async; public bool Async;
} }
public class AsyncPacketProcess public class AsyncPacketProcess
{ {
public bool result = false; public bool result = false;
@ -11871,8 +11869,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
dialog.Data.FirstName = Util.StringToBytes256(ownerFirstName); dialog.Data.FirstName = Util.StringToBytes256(ownerFirstName);
dialog.Data.LastName = Util.StringToBytes256(ownerLastName); dialog.Data.LastName = Util.StringToBytes256(ownerLastName);
dialog.Data.Message = Util.StringToBytes256(message); dialog.Data.Message = Util.StringToBytes256(message);
ScriptDialogPacket.ButtonsBlock[] buttons = new ScriptDialogPacket.ButtonsBlock[1]; ScriptDialogPacket.ButtonsBlock[] buttons = new ScriptDialogPacket.ButtonsBlock[1];
buttons[0] = new ScriptDialogPacket.ButtonsBlock(); buttons[0] = new ScriptDialogPacket.ButtonsBlock();
buttons[0].ButtonLabel = Util.StringToBytes256("!!llTextBox!!"); buttons[0].ButtonLabel = Util.StringToBytes256("!!llTextBox!!");
@ -11886,7 +11883,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
ScenePresence presence = p as ScenePresence; ScenePresence presence = p as ScenePresence;
// It turns out to get the agent to stop flying, you have to feed it stop flying velocities // It turns out to get the agent to stop flying, you have to feed it stop flying velocities
// There's no explicit message to send the client to tell it to stop flying.. it relies on the // There's no explicit message to send the client to tell it to stop flying.. it relies on the
// velocity, collision plane and avatar height // velocity, collision plane and avatar height
// Add 1/6 the avatar's height to it's position so it doesn't shoot into the air // Add 1/6 the avatar's height to it's position so it doesn't shoot into the air
@ -11903,7 +11900,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// attach a suitable collision plane regardless of the actual situation to force the LLClient to land. // attach a suitable collision plane regardless of the actual situation to force the LLClient to land.
// Collision plane below the avatar's position a 6th of the avatar's height is suitable. // Collision plane below the avatar's position a 6th of the avatar's height is suitable.
// Mind you, that this method doesn't get called if the avatar's velocity magnitude is greater then a // Mind you, that this method doesn't get called if the avatar's velocity magnitude is greater then a
// certain amount.. because the LLClient wouldn't land in that situation anyway. // certain amount.. because the LLClient wouldn't land in that situation anyway.
// why are we still testing for this really old height value default??? // why are we still testing for this really old height value default???

View File

@ -48,8 +48,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
protected Scene m_scene = null; protected Scene m_scene = null;
public string Name { get { return "Attachments Module"; } } public string Name { get { return "Attachments Module"; } }
public Type ReplaceableInterface { get { return null; } } public Type ReplaceableInterface { get { return null; } }
public void Initialise(IConfigSource source) {} public void Initialise(IConfigSource source) {}
@ -80,7 +80,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachmentsFromInventory; client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachmentsFromInventory;
client.OnObjectAttach += AttachObject; client.OnObjectAttach += AttachObject;
client.OnObjectDetach += DetachObject; client.OnObjectDetach += DetachObject;
client.OnDetachAttachmentIntoInv += ShowDetachInUserInventory; client.OnDetachAttachmentIntoInv += ShowDetachInUserInventory;
} }
public void UnsubscribeFromClientEvents(IClientAPI client) public void UnsubscribeFromClientEvents(IClientAPI client)
@ -89,7 +89,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachmentsFromInventory; client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachmentsFromInventory;
client.OnObjectAttach -= AttachObject; client.OnObjectAttach -= AttachObject;
client.OnObjectDetach -= DetachObject; client.OnObjectDetach -= DetachObject;
client.OnDetachAttachmentIntoInv -= ShowDetachInUserInventory; client.OnDetachAttachmentIntoInv -= ShowDetachInUserInventory;
} }
/// <summary> /// <summary>
@ -173,12 +173,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
UUID itemID = UUID.Zero; UUID itemID = UUID.Zero;
if (sp != null) if (sp != null)
{ {
foreach(SceneObjectGroup grp in sp.GetAttachments(AttachmentPt)) foreach (SceneObjectGroup grp in sp.GetAttachments(AttachmentPt))
{ {
itemID = grp.GetFromItemID(); itemID = grp.GetFromItemID();
if (itemID != UUID.Zero) if (itemID != UUID.Zero)
DetachSingleAttachmentToInv(itemID, remoteClient); DetachSingleAttachmentToInv(itemID, remoteClient);
} }
} }
if (group.GetFromItemID() == UUID.Zero) if (group.GetFromItemID() == UUID.Zero)
@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
public UUID RezSingleAttachmentFromInventory( public UUID RezSingleAttachmentFromInventory(
IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus) IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus)
{ {
SceneObjectGroup att = RezSingleAttachmentFromInventoryInternal(remoteClient, itemID, AttachmentPt); SceneObjectGroup att = RezSingleAttachmentFromInventoryInternal(remoteClient, itemID, AttachmentPt);
if (updateInventoryStatus) if (updateInventoryStatus)
@ -241,8 +241,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (null == att) if (null == att)
return UUID.Zero; return UUID.Zero;
else else
return att.UUID; return att.UUID;
} }
protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal( protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal(
IClientAPI remoteClient, UUID itemID, uint AttachmentPt) IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
@ -298,7 +298,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
} }
return null; return null;
} }
public UUID SetAttachmentInventoryStatus( public UUID SetAttachmentInventoryStatus(
SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt) SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
@ -473,7 +473,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
sog.RootPart.IsAttachment = false; sog.RootPart.IsAttachment = false;
sog.AbsolutePosition = sog.RootPart.AttachedPos; sog.AbsolutePosition = sog.RootPart.AttachedPos;
UpdateKnownItem(client, sog, sog.GetFromItemID(), sog.OwnerID); UpdateKnownItem(client, sog, sog.GetFromItemID(), sog.OwnerID);
sog.SetAttachmentPoint(attachmentPoint); sog.SetAttachmentPoint(attachmentPoint);
} }
/// <summary> /// <summary>
@ -600,7 +600,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
// In case it is later dropped again, don't let // In case it is later dropped again, don't let
// it get cleaned up // it get cleaned up
so.RootPart.RemFlag(PrimFlags.TemporaryOnRez); so.RootPart.RemFlag(PrimFlags.TemporaryOnRez);
so.HasGroupChanged = false; so.HasGroupChanged = false;
} }
} }
} }

View File

@ -132,7 +132,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
try try
{ {
deadAvatar.ControllingClient.SendAgentAlertMessage(deadAvatarMessage, true); deadAvatar.ControllingClient.SendAgentAlertMessage(deadAvatarMessage, true);
if(killingAvatar != null) if (killingAvatar != null)
killingAvatar.ControllingClient.SendAlertMessage("You fragged " + deadAvatar.Firstname + " " + deadAvatar.Lastname); killingAvatar.ControllingClient.SendAlertMessage("You fragged " + deadAvatar.Firstname + " " + deadAvatar.Lastname);
} }
catch (InvalidOperationException) catch (InvalidOperationException)
@ -143,7 +143,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
} }
private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
{ {
try try
{ {
ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);

View File

@ -58,13 +58,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
public void SubscribeToClientEvents(IClientAPI client) public void SubscribeToClientEvents(IClientAPI client)
{ {
client.OnGodKickUser += KickUser; client.OnGodKickUser += KickUser;
client.OnRequestGodlikePowers += RequestGodlikePowers; client.OnRequestGodlikePowers += RequestGodlikePowers;
} }
public void UnsubscribeFromClientEvents(IClientAPI client) public void UnsubscribeFromClientEvents(IClientAPI client)
{ {
client.OnGodKickUser -= KickUser; client.OnGodKickUser -= KickUser;
client.OnRequestGodlikePowers -= RequestGodlikePowers; client.OnRequestGodlikePowers -= RequestGodlikePowers;
} }
public void RequestGodlikePowers( public void RequestGodlikePowers(

View File

@ -137,7 +137,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
{ {
if (scene.Entities.ContainsKey(toAgentID) && if (scene.Entities.ContainsKey(toAgentID) &&
scene.Entities[toAgentID] is ScenePresence) scene.Entities[toAgentID] is ScenePresence)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[INSTANT MESSAGE]: Looking for root agent {0} in {1}", // "[INSTANT MESSAGE]: Looking for root agent {0} in {1}",
// toAgentID.ToString(), scene.RegionInfo.RegionName); // toAgentID.ToString(), scene.RegionInfo.RegionName);

View File

@ -179,14 +179,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
m_log.DebugFormat( m_log.DebugFormat(
"[INVENTORY ARCHIVER]: Successfully loaded {0} assets with {1} failures", "[INVENTORY ARCHIVER]: Successfully loaded {0} assets with {1} failures",
successfulAssetRestores, failedAssetRestores); successfulAssetRestores, failedAssetRestores);
m_log.InfoFormat("[INVENTORY ARCHIVER]: Successfully loaded {0} items", successfulItemRestores); m_log.InfoFormat("[INVENTORY ARCHIVER]: Successfully loaded {0} items", successfulItemRestores);
return loadedNodes; return loadedNodes;
} }
finally finally
{ {
m_loadStream.Close(); m_loadStream.Close();
} }
} }
public void Close() public void Close()
@ -201,7 +201,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
/// <param name="iarPath">The item archive path to replicate</param> /// <param name="iarPath">The item archive path to replicate</param>
/// <param name="rootDestinationFolder">The root folder for the inventory load</param> /// <param name="rootDestinationFolder">The root folder for the inventory load</param>
/// <param name="resolvedFolders"> /// <param name="resolvedFolders">
/// The folders that we have resolved so far for a given archive path. /// The folders that we have resolved so far for a given archive path.
/// This method will add more folders if necessary /// This method will add more folders if necessary
/// </param> /// </param>
/// <param name="loadedNodes"> /// <param name="loadedNodes">
@ -246,17 +246,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
/// The root folder for the inventory load /// The root folder for the inventory load
/// </param> /// </param>
/// <param name="resolvedFolders"> /// <param name="resolvedFolders">
/// The folders that we have resolved so far for a given archive path. /// The folders that we have resolved so far for a given archive path.
/// </param> /// </param>
/// <returns> /// <returns>
/// The folder in the user's inventory that matches best the archive path given. If no such folder was found /// The folder in the user's inventory that matches best the archive path given. If no such folder was found
/// then the passed in root destination folder is returned. /// then the passed in root destination folder is returned.
/// </returns> /// </returns>
protected InventoryFolderBase ResolveDestinationFolder( protected InventoryFolderBase ResolveDestinationFolder(
InventoryFolderBase rootDestFolder, InventoryFolderBase rootDestFolder,
ref string archivePath, ref string archivePath,
Dictionary <string, InventoryFolderBase> resolvedFolders) Dictionary <string, InventoryFolderBase> resolvedFolders)
{ {
// string originalArchivePath = archivePath; // string originalArchivePath = archivePath;
while (archivePath.Length > 0) while (archivePath.Length > 0)
@ -370,7 +370,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (0 == i) if (0 == i)
loadedNodes.Add(destFolder); loadedNodes.Add(destFolder);
} }
} }
/// <summary> /// <summary>

View File

@ -119,7 +119,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids) protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids)
{ {
Exception reportedException = null; Exception reportedException = null;
bool succeeded = true; bool succeeded = true;
try try
{ {
@ -136,7 +136,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
finally finally
{ {
m_saveStream.Close(); m_saveStream.Close();
} }
m_module.TriggerInventoryArchiveSaved( m_module.TriggerInventoryArchiveSaved(
m_id, succeeded, m_userInfo, m_invPath, m_saveStream, reportedException); m_id, succeeded, m_userInfo, m_invPath, m_saveStream, reportedException);
@ -270,7 +270,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
{ {
// We couldn't find the path indicated // We couldn't find the path indicated
string errorMessage = string.Format("Aborted save. Could not find inventory path {0}", m_invPath); string errorMessage = string.Format("Aborted save. Could not find inventory path {0}", m_invPath);
Exception e = new InventoryArchiverException(errorMessage); Exception e = new InventoryArchiverException(errorMessage);
m_module.TriggerInventoryArchiveSaved(m_id, false, m_userInfo, m_invPath, m_saveStream, e); m_module.TriggerInventoryArchiveSaved(m_id, false, m_userInfo, m_invPath, m_saveStream, e);
throw e; throw e;
} }
@ -283,7 +283,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
"[INVENTORY ARCHIVER]: Found folder {0} {1} at {2}", "[INVENTORY ARCHIVER]: Found folder {0} {1} at {2}",
inventoryFolder.Name, inventoryFolder.Name,
inventoryFolder.ID, inventoryFolder.ID,
m_invPath == String.Empty ? InventoryFolderImpl.PATH_DELIMITER : m_invPath ); m_invPath == String.Empty ? InventoryFolderImpl.PATH_DELIMITER : m_invPath);
//recurse through all dirs getting dirs and files //recurse through all dirs getting dirs and files
SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !saveFolderContentsOnly); SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !saveFolderContentsOnly);
@ -301,7 +301,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
//SaveUsers(); //SaveUsers();
new AssetsRequest( new AssetsRequest(
new AssetsArchiver(m_archiveWriter), m_assetUuids, m_scene.AssetService, ReceivedAllAssets).Execute(); new AssetsArchiver(m_archiveWriter), m_assetUuids, m_scene.AssetService, ReceivedAllAssets).Execute();
} }
catch (Exception) catch (Exception)
{ {

View File

@ -33,7 +33,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
/// Signals an inventory archiving problem /// Signals an inventory archiving problem
/// </summary> /// </summary>
public class InventoryArchiverException : Exception public class InventoryArchiverException : Exception
{ {
public InventoryArchiverException(string message) : base(message) {} public InventoryArchiverException(string message) : base(message) {}
public InventoryArchiverException(string message, Exception e) : base(message, e) {} public InventoryArchiverException(string message, Exception e) : base(message, e) {}
} }

View File

@ -91,12 +91,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
scene.AddCommand( scene.AddCommand(
this, "load iar", this, "load iar",
"load iar <first> <last> <inventory path> <password> [<IAR path>]", "load iar <first> <last> <inventory path> <password> [<IAR path>]",
//"load iar [--merge] <first> <last> <inventory path> <password> [<IAR path>]", //"load iar [--merge] <first> <last> <inventory path> <password> [<IAR path>]",
"Load user inventory archive (IAR).", "Load user inventory archive (IAR).",
//"--merge is an option which merges the loaded IAR with existing inventory folders where possible, rather than always creating new ones" //"--merge is an option which merges the loaded IAR with existing inventory folders where possible, rather than always creating new ones"
//+ "<first> is user's first name." + Environment.NewLine //+ "<first> is user's first name." + Environment.NewLine
"<first> is user's first name." + Environment.NewLine "<first> is user's first name." + Environment.NewLine
+ "<last> is user's last name." + Environment.NewLine + "<last> is user's last name." + Environment.NewLine
+ "<inventory path> is the path inside the user's inventory where the IAR should be loaded." + Environment.NewLine + "<inventory path> is the path inside the user's inventory where the IAR should be loaded." + Environment.NewLine
+ "<password> is the user's password." + Environment.NewLine + "<password> is the user's password." + Environment.NewLine
@ -241,7 +241,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (CheckPresence(userInfo.PrincipalID)) if (CheckPresence(userInfo.PrincipalID))
{ {
InventoryArchiveReadRequest request; InventoryArchiveReadRequest request;
bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false); bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
try try
{ {
@ -286,10 +286,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (CheckPresence(userInfo.PrincipalID)) if (CheckPresence(userInfo.PrincipalID))
{ {
InventoryArchiveReadRequest request; InventoryArchiveReadRequest request;
bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false); bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
try try
{ {
request = new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadPath, merge); request = new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadPath, merge);
} }
catch (EntryPointNotFoundException e) catch (EntryPointNotFoundException e)
@ -325,20 +325,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
protected void HandleLoadInvConsoleCommand(string module, string[] cmdparams) protected void HandleLoadInvConsoleCommand(string module, string[] cmdparams)
{ {
try try
{ {
m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME."); m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME.");
Dictionary<string, object> options = new Dictionary<string, object>(); Dictionary<string, object> options = new Dictionary<string, object>();
OptionSet optionSet = new OptionSet().Add("m|merge", delegate (string v) { options["merge"] = v != null; }); OptionSet optionSet = new OptionSet().Add("m|merge", delegate (string v) { options["merge"] = v != null; });
List<string> mainParams = optionSet.Parse(cmdparams); List<string> mainParams = optionSet.Parse(cmdparams);
if (mainParams.Count < 6) if (mainParams.Count < 6)
{ {
m_log.Error( m_log.Error(
"[INVENTORY ARCHIVER]: usage is load iar [--merge] <first name> <last name> <inventory path> <user password> [<load file path>]"); "[INVENTORY ARCHIVER]: usage is load iar [--merge] <first name> <last name> <inventory path> <user password> [<load file path>]");
return; return;
} }
string firstName = mainParams[2]; string firstName = mainParams[2];
string lastName = mainParams[3]; string lastName = mainParams[3];
@ -353,7 +353,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (DearchiveInventory(firstName, lastName, invPath, pass, loadPath, options)) if (DearchiveInventory(firstName, lastName, invPath, pass, loadPath, options))
m_log.InfoFormat( m_log.InfoFormat(
"[INVENTORY ARCHIVER]: Loaded archive {0} for {1} {2}", "[INVENTORY ARCHIVER]: Loaded archive {0} for {1} {2}",
loadPath, firstName, lastName); loadPath, firstName, lastName);
} }
catch (InventoryArchiverException e) catch (InventoryArchiverException e)
{ {
@ -390,7 +390,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
"[INVENTORY ARCHIVER]: Saving archive {0} using inventory path {1} for {2} {3}", "[INVENTORY ARCHIVER]: Saving archive {0} using inventory path {1} for {2} {3}",
savePath, invPath, firstName, lastName); savePath, invPath, firstName, lastName);
ArchiveInventory(id, firstName, lastName, invPath, pass, savePath, new Dictionary<string, object>()); ArchiveInventory(id, firstName, lastName, invPath, pass, savePath, new Dictionary<string, object>());
} }
catch (InventoryArchiverException e) catch (InventoryArchiverException e)
{ {
@ -398,7 +398,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
} }
lock (m_pendingConsoleSaves) lock (m_pendingConsoleSaves)
m_pendingConsoleSaves.Add(id); m_pendingConsoleSaves.Add(id);
} }
private void SaveInvConsoleCommandCompleted( private void SaveInvConsoleCommandCompleted(

View File

@ -58,18 +58,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
/// <summary> /// <summary>
/// Stream of data representing a common IAR that can be reused in load tests. /// Stream of data representing a common IAR that can be reused in load tests.
/// </summary> /// </summary>
protected MemoryStream m_iarStream; protected MemoryStream m_iarStream;
protected UserAccount m_ua1 protected UserAccount m_ua1
= new UserAccount { = new UserAccount {
PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"), PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"),
FirstName = "Mr", FirstName = "Mr",
LastName = "Tiddles" }; LastName = "Tiddles" };
protected UserAccount m_ua2 protected UserAccount m_ua2
= new UserAccount { = new UserAccount {
PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"),
FirstName = "Lord", FirstName = "Lord",
LastName = "Lucan" }; LastName = "Lucan" };
string m_item1Name = "b.lsl"; string m_item1Name = "b.lsl";
private void SaveCompleted( private void SaveCompleted(
@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
} }
protected void ConstructDefaultIarForTestLoad() protected void ConstructDefaultIarForTestLoad()
{ {
string archiveItemName = InventoryArchiveWriteRequest.CreateArchiveItemName(m_item1Name, UUID.Random()); string archiveItemName = InventoryArchiveWriteRequest.CreateArchiveItemName(m_item1Name, UUID.Random());
MemoryStream archiveWriteStream = new MemoryStream(); MemoryStream archiveWriteStream = new MemoryStream();
@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
string item1FileName string item1FileName
= string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, archiveItemName); = string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, archiveItemName);
tar.WriteFile(item1FileName, UserInventoryItemSerializer.Serialize(item1)); tar.WriteFile(item1FileName, UserInventoryItemSerializer.Serialize(item1));
tar.Close(); tar.Close();
m_iarStream = new MemoryStream(archiveWriteStream.ToArray()); m_iarStream = new MemoryStream(archiveWriteStream.ToArray());
} }
@ -341,7 +341,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
// Assert.That(gotObject2File, Is.True, "No object2 file in archive"); // Assert.That(gotObject2File, Is.True, "No object2 file in archive");
// TODO: Test presence of more files and contents of files. // TODO: Test presence of more files and contents of files.
} }
/// <summary> /// <summary>
/// Test that things work when the load path specified starts with a slash /// Test that things work when the load path specified starts with a slash
@ -349,22 +349,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
[Test] [Test]
public void TestLoadIarPathStartsWithSlash() public void TestLoadIarPathStartsWithSlash()
{ {
TestHelper.InMethod(); TestHelper.InMethod();
// log4net.Config.XmlConfigurator.Configure(); // log4net.Config.XmlConfigurator.Configure();
SerialiserModule serialiserModule = new SerialiserModule(); SerialiserModule serialiserModule = new SerialiserModule();
InventoryArchiverModule archiverModule = new InventoryArchiverModule(true); InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
Scene scene = SceneSetupHelpers.SetupScene("inventory"); Scene scene = SceneSetupHelpers.SetupScene("inventory");
SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "password"); UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "password");
archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/Objects", "password", m_iarStream); archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/Objects", "password", m_iarStream);
InventoryItemBase foundItem1 InventoryItemBase foundItem1
= InventoryArchiveUtils.FindItemByPath( = InventoryArchiveUtils.FindItemByPath(
scene.InventoryService, m_ua1.PrincipalID, "/Objects/" + m_item1Name); scene.InventoryService, m_ua1.PrincipalID, "/Objects/" + m_item1Name);
Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1 in TestLoadIarFolderStartsWithSlash()"); Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1 in TestLoadIarFolderStartsWithSlash()");
} }
/// <summary> /// <summary>
@ -376,7 +376,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
[Test] [Test]
public void TestLoadIarV0_1ExistingUsers() public void TestLoadIarV0_1ExistingUsers()
{ {
TestHelper.InMethod(); TestHelper.InMethod();
//log4net.Config.XmlConfigurator.Configure(); //log4net.Config.XmlConfigurator.Configure();
SerialiserModule serialiserModule = new SerialiserModule(); SerialiserModule serialiserModule = new SerialiserModule();
@ -386,9 +386,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
Scene scene = SceneSetupHelpers.SetupScene("inventory"); Scene scene = SceneSetupHelpers.SetupScene("inventory");
SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "meowfood"); UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "meowfood");
UserProfileTestUtils.CreateUserWithInventory(scene, m_ua2, "hampshire"); UserProfileTestUtils.CreateUserWithInventory(scene, m_ua2, "hampshire");
archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/", "meowfood", m_iarStream); archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/", "meowfood", m_iarStream);
@ -450,7 +450,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
string userFirstName = "Jock"; string userFirstName = "Jock";
string userLastName = "Stirrup"; string userLastName = "Stirrup";
UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020");
UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "meowfood"); UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "meowfood");
// Create asset // Create asset
SceneObjectGroup object1; SceneObjectGroup object1;
@ -524,7 +524,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
[Test] [Test]
public void TestLoadIarV0_1AbsentUsers() public void TestLoadIarV0_1AbsentUsers()
{ {
TestHelper.InMethod(); TestHelper.InMethod();
//log4net.Config.XmlConfigurator.Configure(); //log4net.Config.XmlConfigurator.Configure();
string userFirstName = "Charlie"; string userFirstName = "Charlie";
@ -562,7 +562,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
Scene scene = SceneSetupHelpers.SetupScene("inventory"); Scene scene = SceneSetupHelpers.SetupScene("inventory");
SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userUuid, "meowfood"); UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userUuid, "meowfood");
archiverModule.DearchiveInventory(userFirstName, userLastName, "/", "meowfood", archiveReadStream); archiverModule.DearchiveInventory(userFirstName, userLastName, "/", "meowfood", archiveReadStream);
@ -680,8 +680,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
string folder2aArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2aName, UUID.Random()); string folder2aArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2aName, UUID.Random());
string folder2bArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2bName, UUID.Random()); string folder2bArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2bName, UUID.Random());
string iarPath1 = string.Join("", new string[] { folder1ArchiveName, folder2aArchiveName }); string iarPath1 = string.Join("", new string[] { folder1ArchiveName, folder2aArchiveName });
string iarPath2 = string.Join("", new string[] { folder1ArchiveName, folder2bArchiveName }); string iarPath2 = string.Join("", new string[] { folder1ArchiveName, folder2bArchiveName });
{ {
// Test replication of path1 // Test replication of path1
@ -694,7 +694,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
= InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, folder1Name); = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, folder1Name);
Assert.That(folder1Candidates.Count, Is.EqualTo(1)); Assert.That(folder1Candidates.Count, Is.EqualTo(1));
InventoryFolderBase folder1 = folder1Candidates[0]; InventoryFolderBase folder1 = folder1Candidates[0];
List<InventoryFolderBase> folder2aCandidates List<InventoryFolderBase> folder2aCandidates
= InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName); = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName);
Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); Assert.That(folder2aCandidates.Count, Is.EqualTo(1));
@ -715,11 +715,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
List<InventoryFolderBase> folder2aCandidates List<InventoryFolderBase> folder2aCandidates
= InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName); = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName);
Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); Assert.That(folder2aCandidates.Count, Is.EqualTo(1));
List<InventoryFolderBase> folder2bCandidates List<InventoryFolderBase> folder2bCandidates
= InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2bName); = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2bName);
Assert.That(folder2bCandidates.Count, Is.EqualTo(1)); Assert.That(folder2bCandidates.Count, Is.EqualTo(1));
} }
} }
@ -741,7 +741,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
InventoryFolderBase folder1 InventoryFolderBase folder1
= UserInventoryTestUtils.CreateInventoryFolder( = UserInventoryTestUtils.CreateInventoryFolder(
scene.InventoryService, ua1.PrincipalID, folder1ExistingName); scene.InventoryService, ua1.PrincipalID, folder1ExistingName);
string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random());
string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random());
@ -772,7 +772,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
List<InventoryFolderBase> folder2PostCandidates List<InventoryFolderBase> folder2PostCandidates
= InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1Post, "b"); = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1Post, "b");
Assert.That(folder2PostCandidates.Count, Is.EqualTo(1)); Assert.That(folder2PostCandidates.Count, Is.EqualTo(1));
} }
/// <summary> /// <summary>
/// Test replication of a partly existing archive path to the user's inventory. This should create /// Test replication of a partly existing archive path to the user's inventory. This should create
@ -792,7 +792,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
InventoryFolderBase folder1 InventoryFolderBase folder1
= UserInventoryTestUtils.CreateInventoryFolder( = UserInventoryTestUtils.CreateInventoryFolder(
scene.InventoryService, ua1.PrincipalID, folder1ExistingName); scene.InventoryService, ua1.PrincipalID, folder1ExistingName);
string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random());
string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random());
@ -812,6 +812,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
List<InventoryFolderBase> folder2PostCandidates List<InventoryFolderBase> folder2PostCandidates
= InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1PostCandidates[0], "b"); = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1PostCandidates[0], "b");
Assert.That(folder2PostCandidates.Count, Is.EqualTo(1)); Assert.That(folder2PostCandidates.Count, Is.EqualTo(1));
} }
} }
} }

View File

@ -138,7 +138,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
{ {
if (!queues.ContainsKey(agentId)) if (!queues.ContainsKey(agentId))
{ {
/* /*
m_log.DebugFormat( m_log.DebugFormat(
"[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", "[EVENTQUEUE]: Adding new queue for agent {0} in region {1}",
agentId, m_scene.RegionInfo.RegionName); agentId, m_scene.RegionInfo.RegionName);
@ -701,7 +701,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
public void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID) public void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID)
{ {
OSD item = EventQueueHelper.ParcelProperties(parcelPropertiesMessage); OSD item = EventQueueHelper.ParcelProperties(parcelPropertiesMessage);
Enqueue(item, avatarID); Enqueue(item, avatarID);
} }

View File

@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
} }
// private static byte[] uintToByteArray(uint uIntValue) // private static byte[] uintToByteArray(uint uIntValue)
// { // {
// byte[] result = new byte[4]; // byte[] result = new byte[4];
// Utils.UIntToBytesBig(uIntValue, result, 0); // Utils.UIntToBytesBig(uIntValue, result, 0);
// return result; // return result;
@ -386,14 +386,14 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
return placesReply; return placesReply;
} }
public static OSD ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage) public static OSD ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage)
{ {
OSDMap message = new OSDMap(); OSDMap message = new OSDMap();
message.Add("message", OSD.FromString("ParcelProperties")); message.Add("message", OSD.FromString("ParcelProperties"));
OSD message_body = parcelPropertiesMessage.Serialize(); OSD message_body = parcelPropertiesMessage.Serialize();
message.Add("body", message_body); message.Add("body", message_body);
return message; return message;
} }
} }
} }

View File

@ -594,7 +594,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
rootPart.Name = item.Name; rootPart.Name = item.Name;
rootPart.Description = item.Description; rootPart.Description = item.Description;
List<SceneObjectPart> partList = null; List<SceneObjectPart> partList = null;
lock (group.Children) lock (group.Children)
partList = new List<SceneObjectPart>(group.Children.Values); partList = new List<SceneObjectPart>(group.Children.Values);

View File

@ -49,8 +49,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
protected bool m_collectStats; protected bool m_collectStats;
protected Scene m_scene = null; protected Scene m_scene = null;
public string Name { get { return "Binary Statistics Logging Module"; } } public string Name { get { return "Binary Statistics Logging Module"; } }
public Type ReplaceableInterface { get { return null; } } public Type ReplaceableInterface { get { return null; } }
public void Initialise(IConfigSource source) public void Initialise(IConfigSource source)
{ {
@ -79,7 +79,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
catch catch
{ {
// if it doesn't work, we don't collect anything // if it doesn't work, we don't collect anything
} }
} }
public void AddRegion(Scene scene) public void AddRegion(Scene scene)
@ -94,12 +94,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
public void RegionLoaded(Scene scene) public void RegionLoaded(Scene scene)
{ {
if (m_collectStats) if (m_collectStats)
m_scene.StatsReporter.OnSendStatsResult += LogSimStats; m_scene.StatsReporter.OnSendStatsResult += LogSimStats;
} }
public void Close() public void Close()
{ {
} }
public class StatLogger public class StatLogger
{ {
@ -164,6 +164,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
} }
} }
return; return;
} }
} }
} }

View File

@ -185,7 +185,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
return folders[type]; return folders[type];
} }
m_log.WarnFormat("[INVENTORY CACHE]: Could not find folder for system type {0} for {1}", type, userID); m_log.WarnFormat("[INVENTORY CACHE]: Could not find folder for system type {0} for {1}", type, userID);
return null; return null;
} }

View File

@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}", // "[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}",
// item.Name, item.Owner, item.Folder); // item.Name, item.Owner, item.Folder);
return m_InventoryService.AddItem(item); return m_InventoryService.AddItem(item);
} }

View File

@ -227,7 +227,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
public bool AddItem(InventoryItemBase item) public bool AddItem(InventoryItemBase item)
{ {
if (item == null) if (item == null)
return false; return false;
return m_RemoteConnector.AddItem(item); return m_RemoteConnector.AddItem(item);
} }

View File

@ -33,7 +33,7 @@ using OpenSim.Framework.Serialization;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.CoreModules.World.Archiver namespace OpenSim.Region.CoreModules.World.Archiver
{ {
/// <summary> /// <summary>
/// Helper methods for archive manipulation /// Helper methods for archive manipulation
/// </summary> /// </summary>
@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
public static string CreateObjectFilename(SceneObjectGroup sog) public static string CreateObjectFilename(SceneObjectGroup sog)
{ {
return ArchiveConstants.CreateOarObjectFilename(sog.Name, sog.UUID, sog.AbsolutePosition); return ArchiveConstants.CreateOarObjectFilename(sog.Name, sog.UUID, sog.AbsolutePosition);
} }
/// <summary> /// <summary>
/// Create the path used to store an object in an OpenSim Archive. /// Create the path used to store an object in an OpenSim Archive.
@ -62,7 +62,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
public static string CreateObjectPath(SceneObjectGroup sog) public static string CreateObjectPath(SceneObjectGroup sog)
{ {
return ArchiveConstants.CreateOarObjectPath(sog.Name, sog.UUID, sog.AbsolutePosition); return ArchiveConstants.CreateOarObjectPath(sog.Name, sog.UUID, sog.AbsolutePosition);
} }
/// <summary> /// <summary>
/// Resolve path to a working FileStream /// Resolve path to a working FileStream
@ -123,6 +123,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
// return new BufferedStream(file, (int) response.ContentLength); // return new BufferedStream(file, (int) response.ContentLength);
return new BufferedStream(file, 1000000); return new BufferedStream(file, 1000000);
} }
} }
} }

View File

@ -72,12 +72,12 @@ namespace OpenSim.Region.CoreModules.World.Land
#pragma warning restore 0429 #pragma warning restore 0429
/// <value> /// <value>
/// Local land ids at specified region co-ordinates (region size / 4) /// Local land ids at specified region co-ordinates (region size / 4)
/// </value> /// </value>
private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax]; private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax];
/// <value> /// <value>
/// Land objects keyed by local id /// Land objects keyed by local id
/// </value> /// </value>
private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>();
@ -92,8 +92,8 @@ namespace OpenSim.Region.CoreModules.World.Land
#region INonSharedRegionModule Members #region INonSharedRegionModule Members
public Type ReplaceableInterface public Type ReplaceableInterface
{ {
get { return null; } get { return null; }
} }
@ -192,7 +192,7 @@ namespace OpenSim.Region.CoreModules.World.Land
Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition));
forcedPosition = null; forcedPosition = null;
} }
//if we are far away, teleport //if we are far away, teleport
else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3) else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3)
{ {
Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition));
@ -321,8 +321,6 @@ namespace OpenSim.Region.CoreModules.World.Land
} }
} }
private void ForceAvatarToPosition(ScenePresence avatar, Vector3? position) private void ForceAvatarToPosition(ScenePresence avatar, Vector3? position)
{ {
if (m_scene.Permissions.IsGod(avatar.UUID)) return; if (m_scene.Permissions.IsGod(avatar.UUID)) return;
@ -336,7 +334,6 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
avatar.ControllingClient.SendAlertMessage( avatar.ControllingClient.SendAlertMessage(
"You are not allowed on this parcel because the land owner has restricted access."); "You are not allowed on this parcel because the land owner has restricted access.");
} }
public void EventManagerOnAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID) public void EventManagerOnAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID)
@ -448,7 +445,7 @@ namespace OpenSim.Region.CoreModules.World.Land
if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) clientAvatar.sentMessageAboutRestrictedParcelFlyingDown)
{ {
EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID, EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID,
m_scene.RegionInfo.RegionID); m_scene.RegionInfo.RegionID);
//They are going under the safety line! //They are going under the safety line!
if (!parcel.IsBannedFromLand(clientAvatar.UUID)) if (!parcel.IsBannedFromLand(clientAvatar.UUID))
@ -652,7 +649,7 @@ namespace OpenSim.Region.CoreModules.World.Land
if (x_float > Constants.RegionSize || x_float <= 0 || y_float > Constants.RegionSize || y_float <= 0) if (x_float > Constants.RegionSize || x_float <= 0 || y_float > Constants.RegionSize || y_float <= 0)
return null; return null;
try try
{ {
x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0)); x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0));
@ -667,7 +664,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
return null; return null;
} }
lock (m_landList) lock (m_landList)
{ {
// Corner case. If an autoreturn happens during sim startup // Corner case. If an autoreturn happens during sim startup
@ -687,7 +684,7 @@ namespace OpenSim.Region.CoreModules.World.Land
// they happen every time at border crossings // they happen every time at border crossings
throw new Exception("Error: Parcel not found at point " + x + ", " + y); throw new Exception("Error: Parcel not found at point " + x + ", " + y);
} }
lock (m_landIDList) lock (m_landIDList)
{ {
try try
@ -741,7 +738,6 @@ namespace OpenSim.Region.CoreModules.World.Land
public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj) public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj)
{ {
lock (m_landList) lock (m_landList)
{ {
foreach (LandObject p in m_landList.Values) foreach (LandObject p in m_landList.Values)
@ -936,7 +932,7 @@ namespace OpenSim.Region.CoreModules.World.Land
return; return;
} }
} }
lock (m_landList) lock (m_landList)
{ {
foreach (ILandObject slaveLandObject in selectedLandObjects) foreach (ILandObject slaveLandObject in selectedLandObjects)
@ -1078,7 +1074,6 @@ namespace OpenSim.Region.CoreModules.World.Land
temp.Add(currentParcel); temp.Add(currentParcel);
} }
} }
} }
} }
@ -1121,7 +1116,7 @@ namespace OpenSim.Region.CoreModules.World.Land
join(west, south, east, north, remote_client.AgentId); join(west, south, east, north, remote_client.AgentId);
} }
public void ClientOnParcelSelectObjects(int local_id, int request_type, public void ClientOnParcelSelectObjects(int local_id, int request_type,
List<UUID> returnIDs, IClientAPI remote_client) List<UUID> returnIDs, IClientAPI remote_client)
{ {
m_landList[local_id].SendForceObjectSelect(local_id, request_type, returnIDs, remote_client); m_landList[local_id].SendForceObjectSelect(local_id, request_type, returnIDs, remote_client);
@ -1358,31 +1353,31 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
return RemoteParcelRequest(request, path, param, agentID, caps); return RemoteParcelRequest(request, path, param, agentID, caps);
})); }));
UUID parcelCapID = UUID.Random(); UUID parcelCapID = UUID.Random();
caps.RegisterHandler("ParcelPropertiesUpdate", caps.RegisterHandler("ParcelPropertiesUpdate",
new RestStreamHandler("POST", "/CAPS/" + parcelCapID, new RestStreamHandler("POST", "/CAPS/" + parcelCapID,
delegate(string request, string path, string param, delegate(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse) OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{ {
return ProcessPropertiesUpdate(request, path, param, agentID, caps); return ProcessPropertiesUpdate(request, path, param, agentID, caps);
})); }));
} }
private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps)
{ {
IClientAPI client; IClientAPI client;
if ( ! m_scene.TryGetClient(agentID, out client) ) { if (! m_scene.TryGetClient(agentID, out client)) {
m_log.WarnFormat("[LAND] unable to retrieve IClientAPI for {0}", agentID.ToString() ); m_log.WarnFormat("[LAND] unable to retrieve IClientAPI for {0}", agentID.ToString());
return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty());
} }
ParcelPropertiesUpdateMessage properties = new ParcelPropertiesUpdateMessage();
OpenMetaverse.StructuredData.OSDMap args = (OpenMetaverse.StructuredData.OSDMap) OSDParser.DeserializeLLSDXml(request);
properties.Deserialize(args); ParcelPropertiesUpdateMessage properties = new ParcelPropertiesUpdateMessage();
OpenMetaverse.StructuredData.OSDMap args = (OpenMetaverse.StructuredData.OSDMap) OSDParser.DeserializeLLSDXml(request);
LandUpdateArgs land_update = new LandUpdateArgs();
int parcelID = properties.LocalID; properties.Deserialize(args);
land_update.AuthBuyerID = properties.AuthBuyerID;
LandUpdateArgs land_update = new LandUpdateArgs();
int parcelID = properties.LocalID;
land_update.AuthBuyerID = properties.AuthBuyerID;
land_update.Category = properties.Category; land_update.Category = properties.Category;
land_update.Desc = properties.Desc; land_update.Desc = properties.Desc;
land_update.GroupID = properties.GroupID; land_update.GroupID = properties.GroupID;
@ -1399,15 +1394,15 @@ namespace OpenSim.Region.CoreModules.World.Land
land_update.SnapshotID = properties.SnapshotID; land_update.SnapshotID = properties.SnapshotID;
land_update.UserLocation = properties.UserLocation; land_update.UserLocation = properties.UserLocation;
land_update.UserLookAt = properties.UserLookAt; land_update.UserLookAt = properties.UserLookAt;
land_update.MediaDescription = properties.MediaDesc; land_update.MediaDescription = properties.MediaDesc;
land_update.MediaType = properties.MediaType; land_update.MediaType = properties.MediaType;
land_update.MediaWidth = properties.MediaWidth; land_update.MediaWidth = properties.MediaWidth;
land_update.MediaHeight = properties.MediaHeight; land_update.MediaHeight = properties.MediaHeight;
land_update.MediaLoop = properties.MediaLoop; land_update.MediaLoop = properties.MediaLoop;
land_update.ObscureMusic = properties.ObscureMusic; land_update.ObscureMusic = properties.ObscureMusic;
land_update.ObscureMedia = properties.ObscureMedia; land_update.ObscureMedia = properties.ObscureMedia;
ILandObject land; ILandObject land;
lock (m_landList) lock (m_landList)
{ {
m_landList.TryGetValue(parcelID, out land); m_landList.TryGetValue(parcelID, out land);
@ -1415,15 +1410,15 @@ namespace OpenSim.Region.CoreModules.World.Land
if (land != null) if (land != null)
{ {
land.UpdateLandProperties(land_update, client); land.UpdateLandProperties(land_update, client);
m_scene.EventManager.TriggerOnParcelPropertiesUpdateRequest(land_update, parcelID, client); m_scene.EventManager.TriggerOnParcelPropertiesUpdateRequest(land_update, parcelID, client);
} }
else else
{ {
m_log.WarnFormat("[LAND] unable to find parcelID {0}", parcelID); m_log.WarnFormat("[LAND] unable to find parcelID {0}", parcelID);
} }
return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty());
} }
// we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the
// "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to. // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to.
// So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x // So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x
@ -1500,19 +1495,19 @@ namespace OpenSim.Region.CoreModules.World.Land
if (parcelID == UUID.Zero) if (parcelID == UUID.Zero)
return; return;
ExtendedLandData data = ExtendedLandData data =
(ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(),
delegate(string id) delegate(string id)
{ {
UUID parcel = UUID.Zero; UUID parcel = UUID.Zero;
UUID.TryParse(id, out parcel); UUID.TryParse(id, out parcel);
// assume we've got the parcelID we just computed in RemoteParcelRequest // assume we've got the parcelID we just computed in RemoteParcelRequest
ExtendedLandData extLandData = new ExtendedLandData(); ExtendedLandData extLandData = new ExtendedLandData();
Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle,
out extLandData.X, out extLandData.Y); out extLandData.X, out extLandData.Y);
m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}",
extLandData.RegionHandle, extLandData.X, extLandData.Y); extLandData.RegionHandle, extLandData.X, extLandData.Y);
// for this region or for somewhere else? // for this region or for somewhere else?
if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle)
{ {

View File

@ -229,13 +229,13 @@ namespace OpenSim.Region.CoreModules.World.Land
newData.SnapshotID = args.SnapshotID; newData.SnapshotID = args.SnapshotID;
newData.UserLocation = args.UserLocation; newData.UserLocation = args.UserLocation;
newData.UserLookAt = args.UserLookAt; newData.UserLookAt = args.UserLookAt;
newData.MediaType = args.MediaType; newData.MediaType = args.MediaType;
newData.MediaDescription = args.MediaDescription; newData.MediaDescription = args.MediaDescription;
newData.MediaWidth = args.MediaWidth; newData.MediaWidth = args.MediaWidth;
newData.MediaHeight = args.MediaHeight; newData.MediaHeight = args.MediaHeight;
newData.MediaLoop = args.MediaLoop; newData.MediaLoop = args.MediaLoop;
newData.ObscureMusic = args.ObscureMusic; newData.ObscureMusic = args.ObscureMusic;
newData.ObscureMedia = args.ObscureMedia; newData.ObscureMedia = args.ObscureMedia;
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);

View File

@ -54,11 +54,11 @@ namespace OpenSim.Region.CoreModules.Media.Moap
{ {
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")] [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")]
public class MoapModule : INonSharedRegionModule, IMoapModule public class MoapModule : INonSharedRegionModule, IMoapModule
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string Name { get { return "MoapModule"; } } public string Name { get { return "MoapModule"; } }
public Type ReplaceableInterface { get { return null; } } public Type ReplaceableInterface { get { return null; } }
/// <summary> /// <summary>
/// Is this module enabled? /// Is this module enabled?
@ -78,17 +78,17 @@ namespace OpenSim.Region.CoreModules.Media.Moap
/// <summary> /// <summary>
/// Track the ObjectMedia capabilities given to users keyed by agent. Lock m_omCapUsers to manipulate. /// Track the ObjectMedia capabilities given to users keyed by agent. Lock m_omCapUsers to manipulate.
/// </summary> /// </summary>
protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>(); protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>();
/// <summary> /// <summary>
/// Track the ObjectMediaUpdate capabilities given to users keyed by path /// Track the ObjectMediaUpdate capabilities given to users keyed by path
/// </summary> /// </summary>
protected Dictionary<string, UUID> m_omuCapUsers = new Dictionary<string, UUID>(); protected Dictionary<string, UUID> m_omuCapUsers = new Dictionary<string, UUID>();
/// <summary> /// <summary>
/// Track the ObjectMediaUpdate capabilities given to users keyed by agent. Lock m_omuCapUsers to manipulate /// Track the ObjectMediaUpdate capabilities given to users keyed by agent. Lock m_omuCapUsers to manipulate
/// </summary> /// </summary>
protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>(); protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>();
public void Initialise(IConfigSource configSource) public void Initialise(IConfigSource configSource)
{ {
@ -129,7 +129,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps; m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps;
m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps; m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps;
m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy; m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy;
} }
public void OnRegisterCaps(UUID agentID, Caps caps) public void OnRegisterCaps(UUID agentID, Caps caps)
{ {
@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
caps.RegisterHandler( caps.RegisterHandler(
"ObjectMediaNavigate", new RestStreamHandler("POST", omuCapUrl, HandleObjectMediaNavigateMessage)); "ObjectMediaNavigate", new RestStreamHandler("POST", omuCapUrl, HandleObjectMediaNavigateMessage));
} }
} }
public void OnDeregisterCaps(UUID agentID, Caps caps) public void OnDeregisterCaps(UUID agentID, Caps caps)
{ {
@ -179,7 +179,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
} }
protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed)
{ {
if (original.Shape.Media != null) if (original.Shape.Media != null)
{ {
PrimitiveBaseShape.MediaList dupeMedia = new PrimitiveBaseShape.MediaList(); PrimitiveBaseShape.MediaList dupeMedia = new PrimitiveBaseShape.MediaList();
@ -195,7 +195,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
} }
copy.Shape.Media = dupeMedia; copy.Shape.Media = dupeMedia;
} }
} }
public MediaEntry GetMediaEntry(SceneObjectPart part, int face) public MediaEntry GetMediaEntry(SceneObjectPart part, int face)
@ -211,9 +211,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap
me = null; me = null;
} }
else else
{ {
lock (media) lock (media)
me = media[face]; me = media[face];
// TODO: Really need a proper copy constructor down in libopenmetaverse // TODO: Really need a proper copy constructor down in libopenmetaverse
if (me != null) if (me != null)
@ -227,17 +227,17 @@ namespace OpenSim.Region.CoreModules.Media.Moap
public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me) public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me)
{ {
CheckFaceParam(part, face); CheckFaceParam(part, face);
if (null == part.Shape.Media) if (null == part.Shape.Media)
part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]); part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]);
lock (part.Shape.Media) lock (part.Shape.Media)
part.Shape.Media[face] = me; part.Shape.Media[face] = me;
UpdateMediaUrl(part, UUID.Zero); UpdateMediaUrl(part, UUID.Zero);
part.ScheduleFullUpdate(); part.ScheduleFullUpdate();
part.TriggerScriptChangedEvent(Changed.MEDIA); part.TriggerScriptChangedEvent(Changed.MEDIA);
} }
public void ClearMediaEntry(SceneObjectPart part, int face) public void ClearMediaEntry(SceneObjectPart part, int face)
@ -256,7 +256,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
/// <returns></returns> /// <returns></returns>
protected string HandleObjectMediaMessage( protected string HandleObjectMediaMessage(
string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{ {
// m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request); // m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request);
OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request);
@ -266,12 +266,12 @@ namespace OpenSim.Region.CoreModules.Media.Moap
if (omm.Request is ObjectMediaRequest) if (omm.Request is ObjectMediaRequest)
return HandleObjectMediaRequest(omm.Request as ObjectMediaRequest); return HandleObjectMediaRequest(omm.Request as ObjectMediaRequest);
else if (omm.Request is ObjectMediaUpdate) else if (omm.Request is ObjectMediaUpdate)
return HandleObjectMediaUpdate(path, omm.Request as ObjectMediaUpdate); return HandleObjectMediaUpdate(path, omm.Request as ObjectMediaUpdate);
throw new Exception( throw new Exception(
string.Format( string.Format(
"[MOAP]: ObjectMediaMessage has unrecognized ObjectMediaBlock of {0}", "[MOAP]: ObjectMediaMessage has unrecognized ObjectMediaBlock of {0}",
omm.Request.GetType())); omm.Request.GetType()));
} }
/// <summary> /// <summary>
@ -279,7 +279,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
/// </summary> /// </summary>
/// <param name="omr"></param> /// <param name="omr"></param>
/// <returns></returns> /// <returns></returns>
protected string HandleObjectMediaRequest(ObjectMediaRequest omr) protected string HandleObjectMediaRequest(ObjectMediaRequest omr)
{ {
UUID primId = omr.PrimID; UUID primId = omr.PrimID;
@ -318,7 +318,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
/// <param name="path">Path on which this request was made</param> /// <param name="path">Path on which this request was made</param>
/// <param name="omu">/param> /// <param name="omu">/param>
/// <returns></returns> /// <returns></returns>
protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu) protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu)
{ {
UUID primId = omu.PrimID; UUID primId = omu.PrimID;
@ -330,9 +330,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap
"[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}", "[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}",
primId, m_scene.RegionInfo.RegionName); primId, m_scene.RegionInfo.RegionName);
return string.Empty; return string.Empty;
} }
// m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); // m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId);
// for (int i = 0; i < omu.FaceMedia.Length; i++) // for (int i = 0; i < omu.FaceMedia.Length; i++)
// { // {
@ -374,14 +374,14 @@ namespace OpenSim.Region.CoreModules.Media.Moap
part.Shape.Textures = te; part.Shape.Textures = te;
// m_log.DebugFormat( // m_log.DebugFormat(
// "[MOAP]: Media flags for face {0} is {1}", // "[MOAP]: Media flags for face {0} is {1}",
// i, part.Shape.Textures.FaceTextures[i].MediaFlags); // i, part.Shape.Textures.FaceTextures[i].MediaFlags);
} }
} }
} }
else else
{ {
// We need to go through the media textures one at a time to make sure that we have permission // We need to go through the media textures one at a time to make sure that we have permission
// to change them // to change them
// FIXME: Race condition here since some other texture entry manipulator may overwrite/get // FIXME: Race condition here since some other texture entry manipulator may overwrite/get
// overwritten. Unfortunately, PrimitiveBaseShape does not allow us to change texture entry // overwritten. Unfortunately, PrimitiveBaseShape does not allow us to change texture entry
@ -391,18 +391,18 @@ namespace OpenSim.Region.CoreModules.Media.Moap
lock (media) lock (media)
{ {
for (int i = 0; i < media.Count; i++) for (int i = 0; i < media.Count; i++)
{ {
if (m_scene.Permissions.CanControlPrimMedia(agentId, part.UUID, i)) if (m_scene.Permissions.CanControlPrimMedia(agentId, part.UUID, i))
{ {
media[i] = omu.FaceMedia[i]; media[i] = omu.FaceMedia[i];
// When a face is cleared this is done by setting the MediaFlags in the TextureEntry via a normal // When a face is cleared this is done by setting the MediaFlags in the TextureEntry via a normal
// texture update, so we don't need to worry about clearing MediaFlags here. // texture update, so we don't need to worry about clearing MediaFlags here.
if (null == media[i]) if (null == media[i])
continue; continue;
Primitive.TextureEntryFace face = te.CreateFace((uint)i); Primitive.TextureEntryFace face = te.CreateFace((uint)i);
face.MediaFlags = true; face.MediaFlags = true;
// m_log.DebugFormat( // m_log.DebugFormat(
// "[MOAP]: Media flags for face {0} is {1}", // "[MOAP]: Media flags for face {0} is {1}",
@ -414,11 +414,11 @@ namespace OpenSim.Region.CoreModules.Media.Moap
part.Shape.Textures = te; part.Shape.Textures = te;
// for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++) // for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++)
// m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]); // m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]);
} }
UpdateMediaUrl(part, agentId); UpdateMediaUrl(part, agentId);
// Arguably, we could avoid sending a full update to the avatar that just changed the texture. // Arguably, we could avoid sending a full update to the avatar that just changed the texture.
part.ScheduleFullUpdate(); part.ScheduleFullUpdate();
@ -439,16 +439,16 @@ namespace OpenSim.Region.CoreModules.Media.Moap
/// <returns></returns> /// <returns></returns>
protected string HandleObjectMediaNavigateMessage( protected string HandleObjectMediaNavigateMessage(
string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{ {
// m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request); // m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request);
OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request);
ObjectMediaNavigateMessage omn = new ObjectMediaNavigateMessage(); ObjectMediaNavigateMessage omn = new ObjectMediaNavigateMessage();
omn.Deserialize(osd); omn.Deserialize(osd);
UUID primId = omn.PrimID; UUID primId = omn.PrimID;
SceneObjectPart part = m_scene.GetSceneObjectPart(primId); SceneObjectPart part = m_scene.GetSceneObjectPart(primId);
if (null == part) if (null == part)
{ {
@ -456,12 +456,12 @@ namespace OpenSim.Region.CoreModules.Media.Moap
"[MOAP]: Received an ObjectMediaNavigateMessage for prim {0} but this doesn't exist in region {1}", "[MOAP]: Received an ObjectMediaNavigateMessage for prim {0} but this doesn't exist in region {1}",
primId, m_scene.RegionInfo.RegionName); primId, m_scene.RegionInfo.RegionName);
return string.Empty; return string.Empty;
} }
UUID agentId = default(UUID); UUID agentId = default(UUID);
lock (m_omuCapUsers) lock (m_omuCapUsers)
agentId = m_omuCapUsers[path]; agentId = m_omuCapUsers[path];
if (!m_scene.Permissions.CanInteractWithPrimMedia(agentId, part.UUID, omn.Face)) if (!m_scene.Permissions.CanInteractWithPrimMedia(agentId, part.UUID, omn.Face))
return string.Empty; return string.Empty;
@ -484,7 +484,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
return string.Empty; return string.Empty;
if (me.EnableWhiteList) if (me.EnableWhiteList)
{ {
if (!CheckUrlAgainstWhitelist(omn.URL, me.WhiteList)) if (!CheckUrlAgainstWhitelist(omn.URL, me.WhiteList))
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
@ -493,18 +493,18 @@ namespace OpenSim.Region.CoreModules.Media.Moap
return string.Empty; return string.Empty;
} }
} }
me.CurrentURL = omn.URL; me.CurrentURL = omn.URL;
UpdateMediaUrl(part, agentId); UpdateMediaUrl(part, agentId);
part.ScheduleFullUpdate(); part.ScheduleFullUpdate();
part.TriggerScriptChangedEvent(Changed.MEDIA); part.TriggerScriptChangedEvent(Changed.MEDIA);
return OSDParser.SerializeLLSDXmlString(new OSD()); return OSDParser.SerializeLLSDXmlString(new OSD());
} }
/// <summary> /// <summary>
/// Check that the face number is valid for the given prim. /// Check that the face number is valid for the given prim.
@ -519,7 +519,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
int maxFaces = part.GetNumberOfSides() - 1; int maxFaces = part.GetNumberOfSides() - 1;
if (face > maxFaces) if (face > maxFaces)
throw new ArgumentException( throw new ArgumentException(
string.Format("Face argument was {0} but max is {1}", face, maxFaces)); string.Format("Face argument was {0} but max is {1}", face, maxFaces));
} }
/// <summary> /// <summary>
@ -542,9 +542,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap
string rawVersion = part.MediaUrl.Substring(5, 10); string rawVersion = part.MediaUrl.Substring(5, 10);
int version = int.Parse(rawVersion); int version = int.Parse(rawVersion);
part.MediaUrl = string.Format("x-mv:{0:D10}/{1}", ++version, updateId); part.MediaUrl = string.Format("x-mv:{0:D10}/{1}", ++version, updateId);
} }
// m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID); // m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID);
} }
/// <summary> /// <summary>
@ -554,7 +554,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
/// <param name="whitelist"></param> /// <param name="whitelist"></param>
/// <returns>true if the url matches an entry on the whitelist, false otherwise</returns> /// <returns>true if the url matches an entry on the whitelist, false otherwise</returns>
protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist) protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist)
{ {
Uri url = new Uri(rawUrl); Uri url = new Uri(rawUrl);
foreach (string origWlUrl in whitelist) foreach (string origWlUrl in whitelist)
@ -575,7 +575,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
if (url.Host.Contains(wlUrl)) if (url.Host.Contains(wlUrl))
{ {
// m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl); // m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl);
return true; return true;
} }
} }
else else
@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
return true; return true;
} }
} }
} }
return false; return false;
} }

View File

@ -49,8 +49,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
protected Scene m_scene = null; protected Scene m_scene = null;
protected IDialogModule m_dialogModule; protected IDialogModule m_dialogModule;
public string Name { get { return "Object BuySell Module"; } } public string Name { get { return "Object BuySell Module"; } }
public Type ReplaceableInterface { get { return null; } } public Type ReplaceableInterface { get { return null; } }
public void Initialise(IConfigSource source) {} public void Initialise(IConfigSource source) {}
@ -78,8 +78,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
public void SubscribeToClientEvents(IClientAPI client) public void SubscribeToClientEvents(IClientAPI client)
{ {
client.OnObjectSaleInfo += ObjectSaleInfo; client.OnObjectSaleInfo += ObjectSaleInfo;
} }
protected void ObjectSaleInfo( protected void ObjectSaleInfo(
IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice) IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice)
@ -99,7 +99,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
part.ParentGroup.HasGroupChanged = true; part.ParentGroup.HasGroupChanged = true;
part.GetProperties(client); part.GetProperties(client);
} }
public bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType) public bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType)
{ {
@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
} }
else else
{ {
if (m_dialogModule != null) if (m_dialogModule != null)
m_dialogModule.SendAlertToUser(remoteClient, "Cannot buy now. Your inventory is unavailable"); m_dialogModule.SendAlertToUser(remoteClient, "Cannot buy now. Your inventory is unavailable");
return false; return false;
} }
@ -261,6 +261,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
} }
return true; return true;
} }
} }
} }

View File

@ -397,13 +397,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
m_groupsModule = m_scene.RequestModuleInterface<IGroupsModule>(); m_groupsModule = m_scene.RequestModuleInterface<IGroupsModule>();
if (m_groupsModule == null) if (m_groupsModule == null)
m_log.Warn("[PERMISSIONS]: Groups module not found, group permissions will not work"); m_log.Warn("[PERMISSIONS]: Groups module not found, group permissions will not work");
m_moapModule = m_scene.RequestModuleInterface<IMoapModule>(); m_moapModule = m_scene.RequestModuleInterface<IMoapModule>();
// This log line will be commented out when no longer required for debugging // This log line will be commented out when no longer required for debugging
// if (m_moapModule == null) // if (m_moapModule == null)
// m_log.Warn("[PERMISSIONS]: Media on a prim module not found, media on a prim permissions will not work"); // m_log.Warn("[PERMISSIONS]: Media on a prim module not found, media on a prim permissions will not work");
} }
public void Close() public void Close()
@ -1906,7 +1906,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
} }
private bool CanControlPrimMedia(UUID agentID, UUID primID, int face) private bool CanControlPrimMedia(UUID agentID, UUID primID, int face)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}", // "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}",
// agentID, primID, face); // agentID, primID, face);
@ -1918,7 +1918,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
if (null == part) if (null == part)
return false; return false;
MediaEntry me = m_moapModule.GetMediaEntry(part, face); MediaEntry me = m_moapModule.GetMediaEntry(part, face);
// If there is no existing media entry then it can be controlled (in this context, created). // If there is no existing media entry then it can be controlled (in this context, created).
if (null == me) if (null == me)
@ -1929,7 +1929,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
// agentID, primID, face, me.ControlPermissions); // agentID, primID, face, me.ControlPermissions);
return GenericPrimMediaPermission(part, agentID, me.ControlPermissions); return GenericPrimMediaPermission(part, agentID, me.ControlPermissions);
} }
private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face) private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face)
{ {
@ -1952,15 +1952,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions
// m_log.DebugFormat( // m_log.DebugFormat(
// "[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}", // "[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}",
// agentID, primID, face, me.InteractPermissions); // agentID, primID, face, me.InteractPermissions);
return GenericPrimMediaPermission(part, agentID, me.InteractPermissions); return GenericPrimMediaPermission(part, agentID, me.InteractPermissions);
} }
private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms) private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms)
{ {
// if (IsAdministrator(agentID)) // if (IsAdministrator(agentID))
// return true; // return true;
if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone) if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone)
return true; return true;
@ -1969,15 +1969,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions
{ {
if (agentID == part.OwnerID) if (agentID == part.OwnerID)
return true; return true;
} }
if ((perms & MediaPermission.Group) == MediaPermission.Group) if ((perms & MediaPermission.Group) == MediaPermission.Group)
{ {
if (IsGroupMember(part.GroupID, agentID, 0)) if (IsGroupMember(part.GroupID, agentID, 0))
return true; return true;
} }
return false; return false;
} }
} }
} }

View File

@ -814,7 +814,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
{ {
//m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY);
client.SendLayerData(patchX, patchY, m_scene.Heightmap.GetFloatsSerialised()); client.SendLayerData(patchX, patchY, m_scene.Heightmap.GetFloatsSerialised());
} }
private void StoreUndoState() private void StoreUndoState()
{ {

View File

@ -425,7 +425,7 @@ namespace OpenSim.Region.CoreModules
{ {
if (m_ready) if (m_ready)
{ {
if(m_scene.GetRootAgentCount() > 0) if (m_scene.GetRootAgentCount() > 0)
{ {
// Ask wind plugin to generate a LL wind array to be cached locally // Ask wind plugin to generate a LL wind array to be cached locally
// Try not to update this too often, as it may involve array copies // Try not to update this too often, as it may involve array copies

View File

@ -228,7 +228,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
SceneObjectGroup mapdot = (SceneObjectGroup)obj; SceneObjectGroup mapdot = (SceneObjectGroup)obj;
Color mapdotspot = Color.Gray; // Default color when prim color is white Color mapdotspot = Color.Gray; // Default color when prim color is white
// Loop over prim in group // Loop over prim in group
List<SceneObjectPart> partList = null; List<SceneObjectPart> partList = null;
lock (mapdot.Children) lock (mapdot.Children)
partList = new List<SceneObjectPart>(mapdot.Children.Values); partList = new List<SceneObjectPart>(mapdot.Children.Values);

View File

@ -307,7 +307,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
lock (m_rootAgents) lock (m_rootAgents)
{ {
m_rootAgents.Remove(AgentId); m_rootAgents.Remove(AgentId);
if(m_rootAgents.Count == 0) if (m_rootAgents.Count == 0)
StopThread(); StopThread();
} }
} }

View File

@ -55,7 +55,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="rot"></param> /// <param name="rot"></param>
/// <param name="attachPos"></param> /// <param name="attachPos"></param>
/// <param name="silent"></param> /// <param name="silent"></param>
/// <returns>true if the object was successfully attached, false otherwise</returns> /// <returns>true if the object was successfully attached, false otherwise</returns>
bool AttachObject( bool AttachObject(
IClientAPI remoteClient, SceneObjectGroup grp, uint AttachmentPt, bool silent); IClientAPI remoteClient, SceneObjectGroup grp, uint AttachmentPt, bool silent);

View File

@ -65,7 +65,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// Get a group /// Get a group
/// </summary> /// </summary>
/// <param name="GroupID">ID of the group</param> /// <param name="GroupID">ID of the group</param>
/// <returns>The group's data. Null if there is no such group.</returns> /// <returns>The group's data. Null if there is no such group.</returns>
GroupRecord GetGroupRecord(UUID GroupID); GroupRecord GetGroupRecord(UUID GroupID);
void ActivateGroup(IClientAPI remoteClient, UUID groupID); void ActivateGroup(IClientAPI remoteClient, UUID groupID);
@ -74,14 +74,14 @@ namespace OpenSim.Region.Framework.Interfaces
List<GroupRolesData> GroupRoleDataRequest(IClientAPI remoteClient, UUID groupID); List<GroupRolesData> GroupRoleDataRequest(IClientAPI remoteClient, UUID groupID);
List<GroupRoleMembersData> GroupRoleMembersRequest(IClientAPI remoteClient, UUID groupID); List<GroupRoleMembersData> GroupRoleMembersRequest(IClientAPI remoteClient, UUID groupID);
GroupProfileData GroupProfileRequest(IClientAPI remoteClient, UUID groupID); GroupProfileData GroupProfileRequest(IClientAPI remoteClient, UUID groupID);
GroupMembershipData[] GetMembershipData(UUID UserID); GroupMembershipData[] GetMembershipData(UUID UserID);
GroupMembershipData GetMembershipData(UUID GroupID, UUID UserID); GroupMembershipData GetMembershipData(UUID GroupID, UUID UserID);
void UpdateGroupInfo(IClientAPI remoteClient, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish); void UpdateGroupInfo(IClientAPI remoteClient, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish);
void SetGroupAcceptNotices(IClientAPI remoteClient, UUID groupID, bool acceptNotices, bool listInProfile); void SetGroupAcceptNotices(IClientAPI remoteClient, UUID groupID, bool acceptNotices, bool listInProfile);
void GroupTitleUpdate(IClientAPI remoteClient, UUID GroupID, UUID TitleRoleID); void GroupTitleUpdate(IClientAPI remoteClient, UUID GroupID, UUID TitleRoleID);
GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID GroupID); GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID GroupID);
string GetGroupTitle(UUID avatarID); string GetGroupTitle(UUID avatarID);

View File

@ -43,14 +43,14 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="reportedException">Contains the exception generated if the save did not succeed</param> /// <param name="reportedException">Contains the exception generated if the save did not succeed</param>
public delegate void InventoryArchiveSaved( public delegate void InventoryArchiveSaved(
Guid id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, Exception reportedException); Guid id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, Exception reportedException);
public interface IInventoryArchiverModule public interface IInventoryArchiverModule
{ {
/// <summary> /// <summary>
/// Fired when an archive inventory save has been completed. /// Fired when an archive inventory save has been completed.
/// </summary> /// </summary>
event InventoryArchiveSaved OnInventoryArchiveSaved; event InventoryArchiveSaved OnInventoryArchiveSaved;
/// <summary> /// <summary>
/// Dearchive a user's inventory folder from the given stream /// Dearchive a user's inventory folder from the given stream
/// </summary> /// </summary>
@ -60,7 +60,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="loadStream">The stream from which the inventory archive will be loaded</param> /// <param name="loadStream">The stream from which the inventory archive will be loaded</param>
/// <returns>true if the first stage of the operation succeeded, false otherwise</returns> /// <returns>true if the first stage of the operation succeeded, false otherwise</returns>
bool DearchiveInventory(string firstName, string lastName, string invPath, string pass, Stream loadStream); bool DearchiveInventory(string firstName, string lastName, string invPath, string pass, Stream loadStream);
/// <summary> /// <summary>
/// Dearchive a user's inventory folder from the given stream /// Dearchive a user's inventory folder from the given stream
/// </summary> /// </summary>
@ -72,8 +72,8 @@ namespace OpenSim.Region.Framework.Interfaces
/// the loaded IAR with existing folders where possible.</param> /// the loaded IAR with existing folders where possible.</param>
/// <returns>true if the first stage of the operation succeeded, false otherwise</returns> /// <returns>true if the first stage of the operation succeeded, false otherwise</returns>
bool DearchiveInventory( bool DearchiveInventory(
string firstName, string lastName, string invPath, string pass, Stream loadStream, string firstName, string lastName, string invPath, string pass, Stream loadStream,
Dictionary<string, object> options); Dictionary<string, object> options);
/// <summary> /// <summary>
/// Archive a user's inventory folder to the given stream /// Archive a user's inventory folder to the given stream
@ -85,7 +85,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="saveStream">The stream to which the inventory archive will be saved</param> /// <param name="saveStream">The stream to which the inventory archive will be saved</param>
/// <returns>true if the first stage of the operation succeeded, false otherwise</returns> /// <returns>true if the first stage of the operation succeeded, false otherwise</returns>
bool ArchiveInventory(Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream); bool ArchiveInventory(Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream);
/// <summary> /// <summary>
/// Archive a user's inventory folder to the given stream /// Archive a user's inventory folder to the given stream
/// </summary> /// </summary>
@ -97,7 +97,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="options">Archiving options. Currently, there are none.</param> /// <param name="options">Archiving options. Currently, there are none.</param>
/// <returns>true if the first stage of the operation succeeded, false otherwise</returns> /// <returns>true if the first stage of the operation succeeded, false otherwise</returns>
bool ArchiveInventory( bool ArchiveInventory(
Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream, Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream,
Dictionary<string, object> options); Dictionary<string, object> options);
} }
} }

View File

@ -63,5 +63,5 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="part"></param> /// <param name="part"></param>
/// <param name="face">/param> /// <param name="face">/param>
void ClearMediaEntry(SceneObjectPart part, int face); void ClearMediaEntry(SceneObjectPart part, int face);
} }
} }

View File

@ -31,7 +31,7 @@ namespace OpenSim.Region.Framework.Interfaces
{ {
/// <summary> /// <summary>
/// Generate a map tile for the scene. a terrain texture for this scene /// Generate a map tile for the scene. a terrain texture for this scene
/// </summary> /// </summary>
void GenerateMaptile(); void GenerateMaptile();
} }
} }

View File

@ -332,7 +332,7 @@ namespace OpenSim.Region.Framework.Scenes
/// If the object is being attached, then the avatarID will be present. If the object is being detached then /// If the object is being attached, then the avatarID will be present. If the object is being detached then
/// the avatarID is UUID.Zero (I know, this doesn't make much sense but now it's historical). /// the avatarID is UUID.Zero (I know, this doesn't make much sense but now it's historical).
public delegate void Attach(uint localID, UUID itemID, UUID avatarID); public delegate void Attach(uint localID, UUID itemID, UUID avatarID);
public event Attach OnAttach; public event Attach OnAttach;
/// <summary> /// <summary>
/// Called immediately after an object is loaded from storage. /// Called immediately after an object is loaded from storage.
@ -344,7 +344,7 @@ namespace OpenSim.Region.Framework.Scenes
/// Called immediately before an object is saved to storage. /// Called immediately before an object is saved to storage.
/// </summary> /// </summary>
/// <param name="persistingSo"> /// <param name="persistingSo">
/// The scene object being persisted. /// The scene object being persisted.
/// This is actually a copy of the original scene object so changes made here will be saved to storage but will not be kept in memory. /// This is actually a copy of the original scene object so changes made here will be saved to storage but will not be kept in memory.
/// </param> /// </param>
/// <param name="originalSo"> /// <param name="originalSo">
@ -363,7 +363,7 @@ namespace OpenSim.Region.Framework.Scenes
public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed); public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed);
public delegate void RegionUp(GridRegion region); public delegate void RegionUp(GridRegion region);
public event RegionUp OnRegionUp; public event RegionUp OnRegionUp;
public class MoneyTransferArgs : EventArgs public class MoneyTransferArgs : EventArgs
{ {
@ -2063,7 +2063,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
} }
} }
public void TriggerOnSceneObjectPreSave(SceneObjectGroup persistingSo, SceneObjectGroup originalSo) public void TriggerOnSceneObjectPreSave(SceneObjectGroup persistingSo, SceneObjectGroup originalSo)
{ {
@ -2105,7 +2105,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
} }
} }
public void TriggerOnParcelPropertiesUpdateRequest(LandUpdateArgs args, public void TriggerOnParcelPropertiesUpdateRequest(LandUpdateArgs args,
int local_id, IClientAPI remote_client) int local_id, IClientAPI remote_client)
@ -2127,6 +2127,6 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
} }
} }
} }
} }

View File

@ -62,7 +62,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary> /// <summary>
/// This is added to the priority of all child prims, to make sure that the root prim update is sent to the /// This is added to the priority of all child prims, to make sure that the root prim update is sent to the
/// viewer before child prim updates. /// viewer before child prim updates.
/// The adjustment is added to child prims and subtracted from root prims, so the gap ends up /// The adjustment is added to child prims and subtracted from root prims, so the gap ends up
/// being double. We do it both ways so that there is a still a priority delta even if the priority is already /// being double. We do it both ways so that there is a still a priority delta even if the priority is already
/// double.MinValue or double.MaxValue. /// double.MinValue or double.MaxValue.
@ -150,9 +150,9 @@ namespace OpenSim.Region.Framework.Scenes
if (entity is SceneObjectPart) if (entity is SceneObjectPart)
{ {
// Can't use Scene.GetGroupByPrim() here, since the entity may have been delete from the scene // Can't use Scene.GetGroupByPrim() here, since the entity may have been delete from the scene
// before its scheduled update was triggered // before its scheduled update was triggered
//entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition; //entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition;
entityPos = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition; entityPos = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition;
} }
else else
{ {
@ -177,11 +177,11 @@ namespace OpenSim.Region.Framework.Scenes
// Use group position for child prims // Use group position for child prims
Vector3 entityPos = entity.AbsolutePosition; Vector3 entityPos = entity.AbsolutePosition;
if (entity is SceneObjectPart) if (entity is SceneObjectPart)
{ {
// Can't use Scene.GetGroupByPrim() here, since the entity may have been delete from the scene // Can't use Scene.GetGroupByPrim() here, since the entity may have been delete from the scene
// before its scheduled update was triggered // before its scheduled update was triggered
//entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition; //entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition;
entityPos = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition; entityPos = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition;
} }
else else
{ {

View File

@ -145,7 +145,7 @@ namespace OpenSim.Region.Framework.Scenes
item.Owner, item.Name, item.ID); item.Owner, item.Name, item.ID);
return false; return false;
} }
} }
/// <summary> /// <summary>
@ -253,7 +253,7 @@ namespace OpenSim.Region.Framework.Scenes
// Update item with new asset // Update item with new asset
item.AssetID = asset.FullID; item.AssetID = asset.FullID;
if (group.UpdateInventoryItem(item)) if (group.UpdateInventoryItem(item))
remoteClient.SendAgentAlertMessage("Script saved", false); remoteClient.SendAgentAlertMessage("Script saved", false);
part.GetProperties(remoteClient); part.GetProperties(remoteClient);
@ -1975,7 +1975,7 @@ namespace OpenSim.Region.Framework.Scenes
return null; return null;
if (!Permissions.CanRezObject(group.PrimCount, item.OwnerID, pos)) if (!Permissions.CanRezObject(group.PrimCount, item.OwnerID, pos))
return null; return null;
if (!Permissions.BypassPermissions()) if (!Permissions.BypassPermissions())
{ {
@ -2053,7 +2053,7 @@ namespace OpenSim.Region.Framework.Scenes
List<SceneObjectPart> partList = null; List<SceneObjectPart> partList = null;
lock (sog.Children) lock (sog.Children)
partList = new List<SceneObjectPart>(sog.Children.Values); partList = new List<SceneObjectPart>(sog.Children.Values);
foreach (SceneObjectPart child in partList) foreach (SceneObjectPart child in partList)
child.Inventory.ChangeInventoryOwner(ownerID); child.Inventory.ChangeInventoryOwner(ownerID);
@ -2068,7 +2068,7 @@ namespace OpenSim.Region.Framework.Scenes
List<SceneObjectPart> partList = null; List<SceneObjectPart> partList = null;
lock (sog.Children) lock (sog.Children)
partList = new List<SceneObjectPart>(sog.Children.Values); partList = new List<SceneObjectPart>(sog.Children.Values);
foreach (SceneObjectPart child in partList) foreach (SceneObjectPart child in partList)
{ {
@ -2078,7 +2078,7 @@ namespace OpenSim.Region.Framework.Scenes
sog.SetOwnerId(groupID); sog.SetOwnerId(groupID);
sog.ApplyNextOwnerPermissions(); sog.ApplyNextOwnerPermissions();
} }
} }
foreach (uint localID in localIDs) foreach (uint localID in localIDs)

View File

@ -164,7 +164,7 @@ namespace OpenSim.Region.Framework.Scenes
List<SceneObjectPart> partList = null; List<SceneObjectPart> partList = null;
lock (sog.Children) lock (sog.Children)
partList = new List<SceneObjectPart>(sog.Children.Values); partList = new List<SceneObjectPart>(sog.Children.Values);
foreach (SceneObjectPart part in partList) foreach (SceneObjectPart part in partList)
{ {

View File

@ -997,6 +997,6 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
return true; return true;
} }
} }
} }

View File

@ -1916,7 +1916,7 @@ namespace OpenSim.Region.Framework.Scenes
sceneObject.ScheduleGroupForFullUpdate(); sceneObject.ScheduleGroupForFullUpdate();
return sceneObject; return sceneObject;
} }
/// <summary> /// <summary>
/// Add an object into the scene that has come from storage /// Add an object into the scene that has come from storage
@ -2009,7 +2009,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <returns></returns> /// <returns></returns>
public bool AddNewSceneObject( public bool AddNewSceneObject(
SceneObjectGroup sceneObject, bool attachToBackup, Vector3 pos, Quaternion rot, Vector3 vel) SceneObjectGroup sceneObject, bool attachToBackup, Vector3 pos, Quaternion rot, Vector3 vel)
{ {
return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, pos, rot, vel); return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, pos, rot, vel);
} }
@ -2102,12 +2102,12 @@ namespace OpenSim.Region.Framework.Scenes
// group has recently been delinked from another group but that this change has not been persisted // group has recently been delinked from another group but that this change has not been persisted
// to the DB. // to the DB.
ForceSceneObjectBackup(so); ForceSceneObjectBackup(so);
so.DetachFromBackup(); so.DetachFromBackup();
m_storageManager.DataStore.RemoveObject(so.UUID, m_regInfo.RegionID); m_storageManager.DataStore.RemoveObject(so.UUID, m_regInfo.RegionID);
} }
// We need to keep track of this state in case this group is still queued for further backup. // We need to keep track of this state in case this group is still queued for further backup.
so.IsDeleted = true; so.IsDeleted = true;
return true; return true;
} }
@ -2394,7 +2394,7 @@ namespace OpenSim.Region.Framework.Scenes
ScenePresence sp = GetScenePresence(userID); ScenePresence sp = GetScenePresence(userID);
if (sp != null && AttachmentsModule != null) if (sp != null && AttachmentsModule != null)
{ {
uint attPt = (uint)sp.Appearance.GetAttachpoint(itemID); uint attPt = (uint)sp.Appearance.GetAttachpoint(itemID);
AttachmentsModule.RezSingleAttachmentFromInventory(sp.ControllingClient, itemID, attPt); AttachmentsModule.RezSingleAttachmentFromInventory(sp.ControllingClient, itemID, attPt);
} }
@ -2437,7 +2437,7 @@ namespace OpenSim.Region.Framework.Scenes
sceneObject.RootPart.AddFlag(PrimFlags.Phantom); sceneObject.RootPart.AddFlag(PrimFlags.Phantom);
// Don't sent a full update here because this will cause full updates to be sent twice for // Don't sent a full update here because this will cause full updates to be sent twice for
// attachments on region crossings, resulting in viewer glitches. // attachments on region crossings, resulting in viewer glitches.
AddRestoredSceneObject(sceneObject, false, false, false); AddRestoredSceneObject(sceneObject, false, false, false);
// Handle attachment special case // Handle attachment special case
@ -2681,7 +2681,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
public virtual void SubscribeToClientPrimEvents(IClientAPI client) public virtual void SubscribeToClientPrimEvents(IClientAPI client)
{ {
client.OnUpdatePrimGroupPosition += m_sceneGraph.UpdatePrimPosition; client.OnUpdatePrimGroupPosition += m_sceneGraph.UpdatePrimPosition;
client.OnUpdatePrimSinglePosition += m_sceneGraph.UpdatePrimSinglePosition; client.OnUpdatePrimSinglePosition += m_sceneGraph.UpdatePrimSinglePosition;
client.OnUpdatePrimGroupRotation += m_sceneGraph.UpdatePrimRotation; client.OnUpdatePrimGroupRotation += m_sceneGraph.UpdatePrimRotation;
@ -2717,7 +2717,7 @@ namespace OpenSim.Region.Framework.Scenes
client.OnUndo += m_sceneGraph.HandleUndo; client.OnUndo += m_sceneGraph.HandleUndo;
client.OnRedo += m_sceneGraph.HandleRedo; client.OnRedo += m_sceneGraph.HandleRedo;
client.OnObjectDescription += m_sceneGraph.PrimDescription; client.OnObjectDescription += m_sceneGraph.PrimDescription;
client.OnObjectDrop += m_sceneGraph.DropObject; client.OnObjectDrop += m_sceneGraph.DropObject;
client.OnObjectIncludeInSearch += m_sceneGraph.MakeObjectSearchable; client.OnObjectIncludeInSearch += m_sceneGraph.MakeObjectSearchable;
client.OnObjectOwner += ObjectOwner; client.OnObjectOwner += ObjectOwner;
} }
@ -3669,7 +3669,7 @@ namespace OpenSim.Region.Framework.Scenes
public virtual void AgentCrossing(UUID agentID, Vector3 position, bool isFlying) public virtual void AgentCrossing(UUID agentID, Vector3 position, bool isFlying)
{ {
ScenePresence presence = GetScenePresence(agentID); ScenePresence presence = GetScenePresence(agentID);
if(presence != null) if (presence != null)
{ {
try try
{ {

View File

@ -521,7 +521,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="shorthelp"></param> /// <param name="shorthelp"></param>
/// <param name="longhelp"></param> /// <param name="longhelp"></param>
/// <param name="descriptivehelp"></param> /// <param name="descriptivehelp"></param>
/// <param name="callback"></param> /// <param name="callback"></param>
public void AddCommand( public void AddCommand(
object mod, string command, string shorthelp, string longhelp, string descriptivehelp, CommandDelegate callback) object mod, string command, string shorthelp, string longhelp, string descriptivehelp, CommandDelegate callback)
{ {

View File

@ -298,7 +298,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="pos">Position of the object</param> /// <param name="pos">Position of the object</param>
/// <param name="rot">Rotation of the object</param> /// <param name="rot">Rotation of the object</param>
/// <param name="vel">Velocity of the object. This parameter only has an effect if the object is physical</param> /// <param name="vel">Velocity of the object. This parameter only has an effect if the object is physical</param>
/// <returns></returns> /// <returns></returns>
public bool AddNewSceneObject( public bool AddNewSceneObject(
SceneObjectGroup sceneObject, bool attachToBackup, Vector3 pos, Quaternion rot, Vector3 vel) SceneObjectGroup sceneObject, bool attachToBackup, Vector3 pos, Quaternion rot, Vector3 vel)
{ {
@ -322,7 +322,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
return true; return true;
} }
/// <summary> /// <summary>
/// Add an object to the scene. This will both update the scene, and send information about the /// Add an object to the scene. This will both update the scene, and send information about the
@ -1284,7 +1284,7 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectGroup group = GetGroupByPrim(localID); SceneObjectGroup group = GetGroupByPrim(localID);
if (group != null) if (group != null)
{ {
if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0)) if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0))
{ {
if (m_parentScene.AttachmentsModule != null) if (m_parentScene.AttachmentsModule != null)

View File

@ -677,7 +677,7 @@ namespace OpenSim.Region.Framework.Scenes
minY = 256f; minY = 256f;
minZ = 8192f; minZ = 8192f;
lock(m_parts) lock (m_parts)
{ {
foreach (SceneObjectPart part in m_parts.Values) foreach (SceneObjectPart part in m_parts.Values)
{ {
@ -1005,7 +1005,7 @@ namespace OpenSim.Region.Framework.Scenes
AbsolutePosition = detachedpos; AbsolutePosition = detachedpos;
m_rootPart.AttachedAvatar = UUID.Zero; m_rootPart.AttachedAvatar = UUID.Zero;
//Anakin Lohner bug #3839 //Anakin Lohner bug #3839
lock (m_parts) lock (m_parts)
{ {
foreach (SceneObjectPart p in m_parts.Values) foreach (SceneObjectPart p in m_parts.Values)
@ -1226,7 +1226,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
/// <summary> /// <summary>
/// Delete this group from its scene. /// Delete this group from its scene.
/// </summary> /// </summary>
/// ///
/// This only handles the in-world consequences of deletion (e.g. any avatars sitting on it are forcibly stood /// This only handles the in-world consequences of deletion (e.g. any avatars sitting on it are forcibly stood
@ -1383,7 +1383,7 @@ namespace OpenSim.Region.Framework.Scenes
if (!m_isBackedUp) if (!m_isBackedUp)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[WATER WARS]: Ignoring backup of {0} {1} since object is not marked to be backed up", Name, UUID); // "[WATER WARS]: Ignoring backup of {0} {1} since object is not marked to be backed up", Name, UUID);
return; return;
} }
@ -1395,7 +1395,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
// Since this is the top of the section of call stack for backing up a particular scene object, don't let // Since this is the top of the section of call stack for backing up a particular scene object, don't let
// any exception propogate upwards. // any exception propogate upwards.
try try
{ {
if (!m_scene.ShuttingDown) // if shutting down then there will be nothing to handle the return so leave till next restart if (!m_scene.ShuttingDown) // if shutting down then there will be nothing to handle the return so leave till next restart
@ -1546,7 +1546,7 @@ namespace OpenSim.Region.Framework.Scenes
newPart.LinkNum = part.LinkNum; newPart.LinkNum = part.LinkNum;
} }
// Need to duplicate the physics actor as well // Need to duplicate the physics actor as well
if (part.PhysActor != null && userExposed) if (part.PhysActor != null && userExposed)
{ {
PrimitiveBaseShape pbs = part.Shape; PrimitiveBaseShape pbs = part.Shape;
@ -1562,7 +1562,7 @@ namespace OpenSim.Region.Framework.Scenes
part.PhysActor.LocalID = part.LocalId; part.PhysActor.LocalID = part.LocalId;
part.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true); part.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true);
} }
} }
if (userExposed) if (userExposed)
@ -1838,7 +1838,7 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectPart newPart = null; SceneObjectPart newPart = null;
lock (m_parts) lock (m_parts)
{ {
newPart = part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_parts.Count, userExposed); newPart = part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_parts.Count, userExposed);
newPart.SetParent(this); newPart.SetParent(this);
m_parts.Add(newPart.UUID, newPart); m_parts.Add(newPart.UUID, newPart);
@ -2337,7 +2337,7 @@ namespace OpenSim.Region.Framework.Scenes
if (p.LinkNum > linkPart.LinkNum) if (p.LinkNum > linkPart.LinkNum)
p.LinkNum--; p.LinkNum--;
} }
} }
} }
linkPart.ParentID = 0; linkPart.ParentID = 0;

View File

@ -1010,12 +1010,12 @@ namespace OpenSim.Region.Framework.Scenes
return m_mediaUrl; return m_mediaUrl;
} }
set set
{ {
m_mediaUrl = value; m_mediaUrl = value;
if (ParentGroup != null) if (ParentGroup != null)
ParentGroup.HasGroupChanged = true; ParentGroup.HasGroupChanged = true;
} }
} }
@ -1028,7 +1028,7 @@ namespace OpenSim.Region.Framework.Scenes
// m_log.DebugFormat("[SOP]: Setting CreateSelected to {0} for {1} {2}", value, Name, UUID); // m_log.DebugFormat("[SOP]: Setting CreateSelected to {0} for {1} {2}", value, Name, UUID);
m_createSelected = value; m_createSelected = value;
} }
} }
#endregion #endregion
@ -1189,7 +1189,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary> /// <summary>
/// Property flags. See OpenMetaverse.PrimFlags /// Property flags. See OpenMetaverse.PrimFlags
/// </summary> /// </summary>
/// Example properties are PrimFlags.Phantom and PrimFlags.DieAtEdge /// Example properties are PrimFlags.Phantom and PrimFlags.DieAtEdge
public PrimFlags Flags public PrimFlags Flags
{ {
@ -1355,7 +1355,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary> /// <summary>
/// Tell the scene presence that it should send updates for this part to its client /// Tell the scene presence that it should send updates for this part to its client
/// </summary> /// </summary>
public void AddFullUpdateToAvatar(ScenePresence presence) public void AddFullUpdateToAvatar(ScenePresence presence)
{ {
presence.SceneViewer.QueuePartForUpdate(this); presence.SceneViewer.QueuePartForUpdate(this);
@ -1414,7 +1414,7 @@ namespace OpenSim.Region.Framework.Scenes
m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp) m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp)
{ {
if(!sp.IsChildAgent) if (!sp.IsChildAgent)
sp.ControllingClient.SendAttachedSoundGainChange(UUID, (float)volume); sp.ControllingClient.SendAttachedSoundGainChange(UUID, (float)volume);
}); });
} }
@ -1659,7 +1659,7 @@ namespace OpenSim.Region.Framework.Scenes
// m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID); // m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID);
return dupe; return dupe;
} }
protected void AssetReceived(string id, Object sender, AssetBase asset) protected void AssetReceived(string id, Object sender, AssetBase asset)
@ -1969,10 +1969,10 @@ namespace OpenSim.Region.Framework.Scenes
} }
public uint GetEffectiveObjectFlags() public uint GetEffectiveObjectFlags()
{ {
// Commenting this section of code out since it doesn't actually do anything, as enums are handled by // Commenting this section of code out since it doesn't actually do anything, as enums are handled by
// value rather than reference // value rather than reference
// PrimFlags f = _flags; // PrimFlags f = _flags;
// if (m_parentGroup == null || m_parentGroup.RootPart == this) // if (m_parentGroup == null || m_parentGroup.RootPart == this)
// f &= ~(PrimFlags.Touch | PrimFlags.Money); // f &= ~(PrimFlags.Touch | PrimFlags.Money);
@ -4733,7 +4733,7 @@ namespace OpenSim.Region.Framework.Scenes
if (ParentGroup == null || ParentGroup.IsDeleted) if (ParentGroup == null || ParentGroup.IsDeleted)
return; return;
if (IsAttachment && ParentGroup.RootPart != this) if (IsAttachment && ParentGroup.RootPart != this)
return; return;
// Causes this thread to dig into the Client Thread Data. // Causes this thread to dig into the Client Thread Data.

View File

@ -1094,7 +1094,7 @@ namespace OpenSim.Region.Framework.Scenes
item.OwnerChanged = false; item.OwnerChanged = false;
engine.ResumeScript(item.ItemID); engine.ResumeScript(item.ItemID);
} }
} }
} }
} }
} }

View File

@ -1287,7 +1287,7 @@ namespace OpenSim.Region.Framework.Scenes
// Setting parent ID would fix this, if we knew what value // Setting parent ID would fix this, if we knew what value
// to use. Or we could add a m_isSitting variable. // to use. Or we could add a m_isSitting variable.
//Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); //Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
SitGround = true; SitGround = true;
} }
// In the future, these values might need to go global. // In the future, these values might need to go global.

View File

@ -73,7 +73,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
m_pendingObjects = new Queue<SceneObjectGroup>(); m_pendingObjects = new Queue<SceneObjectGroup>();
lock(m_pendingObjects) lock (m_pendingObjects)
{ {
EntityBase[] entities = m_presence.Scene.Entities.GetEntities(); EntityBase[] entities = m_presence.Scene.Entities.GetEntities();
foreach (EntityBase e in entities) foreach (EntityBase e in entities)
@ -85,7 +85,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
lock(m_pendingObjects) lock (m_pendingObjects)
{ {
while (m_pendingObjects != null && m_pendingObjects.Count > 0) while (m_pendingObjects != null && m_pendingObjects.Count > 0)
{ {

View File

@ -71,7 +71,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Assert.That(dupeSo.Children.Count, Is.EqualTo(2)); Assert.That(dupeSo.Children.Count, Is.EqualTo(2));
SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1); SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1);
SceneObjectPart dupePart2 = dupeSo.GetLinkNumPart(2); SceneObjectPart dupePart2 = dupeSo.GetLinkNumPart(2);
Assert.That(dupePart1.LocalId, Is.Not.EqualTo(part1.LocalId)); Assert.That(dupePart1.LocalId, Is.Not.EqualTo(part1.LocalId));
Assert.That(dupePart2.LocalId, Is.Not.EqualTo(part2.LocalId)); Assert.That(dupePart2.LocalId, Is.Not.EqualTo(part2.LocalId));
@ -84,6 +84,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Assert.That(dupePart1.PhysActor, Is.Not.Null); Assert.That(dupePart1.PhysActor, Is.Not.Null);
Assert.That(dupePart2.PhysActor, Is.Not.Null); Assert.That(dupePart2.PhysActor, Is.Not.Null);
*/ */
} }
} }
} }

View File

@ -270,7 +270,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
TestHelper.InMethod(); TestHelper.InMethod();
//log4net.Config.XmlConfigurator.Configure(); //log4net.Config.XmlConfigurator.Configure();
TestScene scene = SceneSetupHelpers.SetupScene(); TestScene scene = SceneSetupHelpers.SetupScene();
string rootPartName = "rootpart"; string rootPartName = "rootpart";
UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001");
@ -282,11 +282,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
{ Name = rootPartName, UUID = rootPartUuid }; { Name = rootPartName, UUID = rootPartUuid };
SceneObjectPart linkPart SceneObjectPart linkPart
= new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
{ Name = linkPartName, UUID = linkPartUuid }; { Name = linkPartName, UUID = linkPartUuid };
SceneObjectGroup sog = new SceneObjectGroup(rootPart); SceneObjectGroup sog = new SceneObjectGroup(rootPart);
sog.AddPart(linkPart); sog.AddPart(linkPart);
scene.AddNewSceneObject(sog, true); scene.AddNewSceneObject(sog, true);
// In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked
// scene backup thread. // scene backup thread.
@ -309,7 +309,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
TestHelper.InMethod(); TestHelper.InMethod();
//log4net.Config.XmlConfigurator.Configure(); //log4net.Config.XmlConfigurator.Configure();
TestScene scene = SceneSetupHelpers.SetupScene(); TestScene scene = SceneSetupHelpers.SetupScene();
string rootPartName = "rootpart"; string rootPartName = "rootpart";
UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001");
@ -321,11 +321,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
{ Name = rootPartName, UUID = rootPartUuid }; { Name = rootPartName, UUID = rootPartUuid };
SceneObjectPart linkPart SceneObjectPart linkPart
= new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
{ Name = linkPartName, UUID = linkPartUuid }; { Name = linkPartName, UUID = linkPartUuid };
SceneObjectGroup sog = new SceneObjectGroup(rootPart); SceneObjectGroup sog = new SceneObjectGroup(rootPart);
sog.AddPart(linkPart); sog.AddPart(linkPart);
scene.AddNewSceneObject(sog, true); scene.AddNewSceneObject(sog, true);
// In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked
// scene backup thread. // scene backup thread.
@ -333,7 +333,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
// These changes should occur immediately without waiting for a backup pass // These changes should occur immediately without waiting for a backup pass
SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false); SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false);
scene.DeleteSceneObject(groupToDelete, false); scene.DeleteSceneObject(groupToDelete, false);
List<SceneObjectGroup> storedObjects = scene.StorageManager.DataStore.LoadObjects(scene.RegionInfo.RegionID); List<SceneObjectGroup> storedObjects = scene.StorageManager.DataStore.LoadObjects(scene.RegionInfo.RegionID);

View File

@ -59,8 +59,8 @@ namespace OpenSim.Region.Framework.Tests
string userFirstName = "Jock"; string userFirstName = "Jock";
string userLastName = "Stirrup"; string userLastName = "Stirrup";
string userPassword = "troll"; string userPassword = "troll";
UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020");
return UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, userPassword); return UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, userPassword);
} }
protected SceneObjectGroup CreateSO1(Scene scene, UUID ownerId) protected SceneObjectGroup CreateSO1(Scene scene, UUID ownerId)
@ -70,7 +70,7 @@ namespace OpenSim.Region.Framework.Tests
SceneObjectPart part1 SceneObjectPart part1
= new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
{ Name = part1Name, UUID = part1Id }; { Name = part1Name, UUID = part1Id };
return new SceneObjectGroup(part1); return new SceneObjectGroup(part1);
} }
protected TaskInventoryItem CreateSOItem1(Scene scene, SceneObjectPart part) protected TaskInventoryItem CreateSOItem1(Scene scene, SceneObjectPart part)
@ -79,7 +79,7 @@ namespace OpenSim.Region.Framework.Tests
nc.BodyText = "Hello World!"; nc.BodyText = "Hello World!";
nc.Encode(); nc.Encode();
UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000"); UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000");
UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000");
AssetBase ncAsset AssetBase ncAsset
= AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero); = AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero);
scene.AssetService.Store(ncAsset); scene.AssetService.Store(ncAsset);
@ -114,9 +114,9 @@ namespace OpenSim.Region.Framework.Tests
scene.MoveTaskInventoryItem(user1.PrincipalID, folder.ID, sop1, sopItem1.ItemID); scene.MoveTaskInventoryItem(user1.PrincipalID, folder.ID, sop1, sopItem1.ItemID);
InventoryItemBase ncUserItem InventoryItemBase ncUserItem
= InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Objects/ncItem"); = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Objects/ncItem");
Assert.That(ncUserItem, Is.Not.Null, "Objects/ncItem was not found"); Assert.That(ncUserItem, Is.Not.Null, "Objects/ncItem was not found");
} }
/// <summary> /// <summary>
/// Test MoveTaskInventoryItem where the item has no parent folder assigned. /// Test MoveTaskInventoryItem where the item has no parent folder assigned.
@ -138,7 +138,7 @@ namespace OpenSim.Region.Framework.Tests
scene.MoveTaskInventoryItem(user1.PrincipalID, UUID.Zero, sop1, sopItem1.ItemID); scene.MoveTaskInventoryItem(user1.PrincipalID, UUID.Zero, sop1, sopItem1.ItemID);
InventoryItemBase ncUserItem InventoryItemBase ncUserItem
= InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Notecards/ncItem"); = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Notecards/ncItem");
Assert.That(ncUserItem, Is.Not.Null, "Notecards/ncItem was not found"); Assert.That(ncUserItem, Is.Not.Null, "Notecards/ncItem was not found");
} }
} }

View File

@ -962,7 +962,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
if ((groupInfo == null) || (account == null)) if ((groupInfo == null) || (account == null))
{ {
return; return;
} }
// Send Message to Ejectee // Send Message to Ejectee
GridInstantMessage msg = new GridInstantMessage(); GridInstantMessage msg = new GridInstantMessage();

View File

@ -91,11 +91,11 @@ using OpenSim.Services.Interfaces;
* + RoleID * + RoleID
* *
* GroupID -> GroupNotice -> NoticeID * GroupID -> GroupNotice -> NoticeID
* + TimeStamp [uint] * + TimeStamp [uint]
* + FromName [string] * + FromName [string]
* + Subject [string] * + Subject [string]
* + Message [string] * + Message [string]
* + BinaryBucket [byte[]] * + BinaryBucket [byte[]]
* *
* */ * */
@ -309,7 +309,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
GroupInfoMap["OwnerRoleID"] = OSD.FromUUID(OwnerRoleID); GroupInfoMap["OwnerRoleID"] = OSD.FromUUID(OwnerRoleID);
GroupInfoMap["OwnersPowers"] = OSD.FromULong((ulong)m_DefaultOwnerPowers); GroupInfoMap["OwnersPowers"] = OSD.FromULong((ulong)m_DefaultOwnerPowers);
if(SimianAddGeneric(GroupID, "Group", name, GroupInfoMap)) if (SimianAddGeneric(GroupID, "Group", name, GroupInfoMap))
{ {
AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers); AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers);
AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers); AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers);
@ -334,7 +334,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
string GroupName; string GroupName;
OSDMap GroupInfoMap; OSDMap GroupInfoMap;
if( SimianGetFirstGenericEntry(groupID, "GroupInfo", out GroupName, out GroupInfoMap) ) if (SimianGetFirstGenericEntry(groupID, "GroupInfo", out GroupName, out GroupInfoMap))
{ {
GroupInfoMap["Charter"] = OSD.FromString(charter); GroupInfoMap["Charter"] = OSD.FromString(charter);
GroupInfoMap["ShowInList"] = OSD.FromBoolean(showInList); GroupInfoMap["ShowInList"] = OSD.FromBoolean(showInList);
@ -379,7 +379,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
string GroupRoleMemberType = "GroupRole" + groupID.ToString(); string GroupRoleMemberType = "GroupRole" + groupID.ToString();
if (SimianGetGenericEntries(GroupRoleMemberType, roleID.ToString(), out GroupRoleMembers)) if (SimianGetGenericEntries(GroupRoleMemberType, roleID.ToString(), out GroupRoleMembers))
{ {
foreach(UUID UserID in GroupRoleMembers.Keys) foreach (UUID UserID in GroupRoleMembers.Keys)
{ {
EnsureRoleNotSelectedByMember(groupID, roleID, UserID); EnsureRoleNotSelectedByMember(groupID, roleID, UserID);
@ -724,7 +724,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
} }
OSDMap UserGroupMemberInfo; OSDMap UserGroupMemberInfo;
if( SimianGetGenericEntry(agentID, "GroupMember", groupID.ToString(), out UserGroupMemberInfo) ) if (SimianGetGenericEntry(agentID, "GroupMember", groupID.ToString(), out UserGroupMemberInfo))
{ {
data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean(); data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean();
data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger(); data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger();
@ -736,7 +736,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
// //
OSDMap GroupRoleInfo; OSDMap GroupRoleInfo;
if( SimianGetGenericEntry(groupID, "GroupRole", data.ActiveRole.ToString(), out GroupRoleInfo) ) if (SimianGetGenericEntry(groupID, "GroupRole", data.ActiveRole.ToString(), out GroupRoleInfo))
{ {
data.GroupTitle = GroupRoleInfo["Title"].AsString(); data.GroupTitle = GroupRoleInfo["Title"].AsString();
data.GroupPowers = GroupRoleInfo["Powers"].AsULong(); data.GroupPowers = GroupRoleInfo["Powers"].AsULong();
@ -748,7 +748,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
// //
OSDMap GroupInfo; OSDMap GroupInfo;
string GroupName; string GroupName;
if( SimianGetFirstGenericEntry(groupID, "Group", out GroupName, out GroupInfo) ) if (SimianGetFirstGenericEntry(groupID, "Group", out GroupName, out GroupInfo))
{ {
data.GroupID = groupID; data.GroupID = groupID;
data.AllowPublish = GroupInfo["AllowPublish"].AsBoolean(); data.AllowPublish = GroupInfo["AllowPublish"].AsBoolean();
@ -928,12 +928,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
Dictionary<string, OSDMap> GroupRoles; Dictionary<string, OSDMap> GroupRoles;
if (SimianGetGenericEntries(groupID, "GroupRole", out GroupRoles)) if (SimianGetGenericEntries(groupID, "GroupRole", out GroupRoles))
{ {
foreach( KeyValuePair<string, OSDMap> Role in GroupRoles ) foreach (KeyValuePair<string, OSDMap> Role in GroupRoles)
{ {
Dictionary<UUID, OSDMap> GroupRoleMembers; Dictionary<UUID, OSDMap> GroupRoleMembers;
if( SimianGetGenericEntries("GroupRole"+groupID.ToString(), Role.Key, out GroupRoleMembers) ) if (SimianGetGenericEntries("GroupRole"+groupID.ToString(), Role.Key, out GroupRoleMembers))
{ {
foreach( KeyValuePair<UUID, OSDMap> GroupRoleMember in GroupRoleMembers ) foreach (KeyValuePair<UUID, OSDMap> GroupRoleMember in GroupRoleMembers)
{ {
GroupRoleMembersData data = new GroupRoleMembersData(); GroupRoleMembersData data = new GroupRoleMembersData();
@ -1264,7 +1264,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString());
maps.Add(entryMap["Key"].AsString(), (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString())); maps.Add(entryMap["Key"].AsString(), (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString()));
} }
if(maps.Count == 0) if (maps.Count == 0)
{ {
if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results");
} }
@ -1352,17 +1352,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
} }
// Check if this is an update or a request // Check if this is an update or a request
if ( requestArgs["RequestMethod"] == "RemoveGeneric" if (requestArgs["RequestMethod"] == "RemoveGeneric"
|| requestArgs["RequestMethod"] == "AddGeneric" || requestArgs["RequestMethod"] == "AddGeneric")
)
{ {
// Any and all updates cause the cache to clear // Any and all updates cause the cache to clear
m_memoryCache.Clear(); m_memoryCache.Clear();
// Send update to server, return the response without caching it // Send update to server, return the response without caching it
return WebUtil.PostToService(m_groupsServerURI, requestArgs); return WebUtil.PostToService(m_groupsServerURI, requestArgs);
} }
// If we're not doing an update, we must be requesting data // If we're not doing an update, we must be requesting data
@ -1372,7 +1369,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
OSDMap response = null; OSDMap response = null;
if (!m_memoryCache.TryGetValue(CacheKey, out response)) if (!m_memoryCache.TryGetValue(CacheKey, out response))
{ {
// if it wasn't in the cache, pass the request to the Simian Grid Services // if it wasn't in the cache, pass the request to the Simian Grid Services
response = WebUtil.PostToService(m_groupsServerURI, requestArgs); response = WebUtil.PostToService(m_groupsServerURI, requestArgs);
// and cache the response // and cache the response

View File

@ -960,7 +960,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
} }
if( resp == null ) if (resp == null)
{ {
string UserService; string UserService;
UUID SessionID; UUID SessionID;
@ -1065,7 +1065,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
/// <summary> /// <summary>
/// Group Request Tokens are an attempt to allow the groups service to authenticate /// Group Request Tokens are an attempt to allow the groups service to authenticate
/// requests. /// requests.
/// TODO: This broke after the big grid refactor, either find a better way, or discard this /// TODO: This broke after the big grid refactor, either find a better way, or discard this
/// </summary> /// </summary>
/// <param name="client"></param> /// <param name="client"></param>

View File

@ -161,7 +161,7 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
//finalize //finalize
m_Entity.RootPart.PhysActor = null; m_Entity.RootPart.PhysActor = null;
m_Entity.Children = parts; m_Entity.Children = parts;
} }
} }

View File

@ -432,7 +432,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
return; return;
} }
foreach(string button in buttons) foreach (string button in buttons)
{ {
if (button == String.Empty) if (button == String.Empty)
{ {
@ -448,7 +448,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
dm.SendDialogToUser( dm.SendDialogToUser(
avatar, GetSOP().Name, GetSOP().UUID, GetSOP().OwnerID, avatar, GetSOP().Name, GetSOP().UUID, GetSOP().OwnerID,
message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buttons); message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buttons);
} }

View File

@ -824,5 +824,5 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
RegionMoneyRequest = 1, RegionMoneyRequest = 1,
Gift = 2, Gift = 2,
Purchase = 3 Purchase = 3
} }
} }

View File

@ -49,7 +49,7 @@ namespace OpenSim.Region.RegionCombinerModule
public void ClientConnect(IClientAPI client) public void ClientConnect(IClientAPI client)
{ {
m_virtScene.UnSubscribeToClientPrimEvents(client); m_virtScene.UnSubscribeToClientPrimEvents(client);
m_virtScene.UnSubscribeToClientPrimRezEvents(client); m_virtScene.UnSubscribeToClientPrimRezEvents(client);
m_virtScene.UnSubscribeToClientInventoryEvents(client); m_virtScene.UnSubscribeToClientInventoryEvents(client);
((AttachmentsModule)m_virtScene.AttachmentsModule).UnsubscribeFromClientEvents(client); ((AttachmentsModule)m_virtScene.AttachmentsModule).UnsubscribeFromClientEvents(client);
//m_virtScene.UnSubscribeToClientTeleportEvents(client); //m_virtScene.UnSubscribeToClientTeleportEvents(client);
@ -66,7 +66,7 @@ namespace OpenSim.Region.RegionCombinerModule
client.OnRezObject += LocalRezObject; client.OnRezObject += LocalRezObject;
m_rootScene.SubscribeToClientInventoryEvents(client); m_rootScene.SubscribeToClientInventoryEvents(client);
((AttachmentsModule)m_rootScene.AttachmentsModule).SubscribeToClientEvents(client); ((AttachmentsModule)m_rootScene.AttachmentsModule).SubscribeToClientEvents(client);
//m_rootScene.SubscribeToClientTeleportEvents(client); //m_rootScene.SubscribeToClientTeleportEvents(client);
m_rootScene.SubscribeToClientScriptEvents(client); m_rootScene.SubscribeToClientScriptEvents(client);

View File

@ -118,7 +118,7 @@ public class RegionCombinerLargeLandChannel : ILandChannel
return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY); return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY);
} }
} }
ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene); ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene);
obj.LandData.Name = "NO LAND"; obj.LandData.Name = "NO LAND";
return obj; return obj;
@ -142,14 +142,14 @@ public class RegionCombinerLargeLandChannel : ILandChannel
public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id)
{ {
RootRegionLandChannel.Join(start_x, start_y, end_x, end_y, attempting_user_id); RootRegionLandChannel.Join(start_x, start_y, end_x, end_y, attempting_user_id);
} }
public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id)
{ {
RootRegionLandChannel.Subdivide(start_x, start_y, end_x, end_y, attempting_user_id); RootRegionLandChannel.Subdivide(start_x, start_y, end_x, end_y, attempting_user_id);
} }
public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
{ {
RootRegionLandChannel.ReturnObjectsInParcel(localID, returnType, agentIDs, taskIDs, remoteClient); RootRegionLandChannel.ReturnObjectsInParcel(localID, returnType, agentIDs, taskIDs, remoteClient);

View File

@ -7977,7 +7977,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
res.Add(new LSL_Integer((int)me.ControlPermissions)); res.Add(new LSL_Integer((int)me.ControlPermissions));
break; break;
} }
} }
return res; return res;
} }
@ -7993,7 +7993,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (face < 0 || face > m_host.GetNumberOfSides() - 1) if (face < 0 || face > m_host.GetNumberOfSides() - 1)
return ScriptBaseClass.LSL_STATUS_OK; return ScriptBaseClass.LSL_STATUS_OK;
return SetPrimMediaParams(face, rules); return SetPrimMediaParams(face, rules);
} }
private LSL_Integer SetPrimMediaParams(int face, LSL_List rules) private LSL_Integer SetPrimMediaParams(int face, LSL_List rules)
@ -8082,7 +8082,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
me.ControlPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++); me.ControlPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++);
break; break;
} }
} }
module.SetMediaEntry(m_host, face, me); module.SetMediaEntry(m_host, face, me);
@ -8102,7 +8102,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>(); IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
if (null == module) if (null == module)
throw new Exception("Media on a prim functions not available"); throw new Exception("Media on a prim functions not available");
module.ClearMediaEntry(m_host, face); module.ClearMediaEntry(m_host, face);

View File

@ -1190,7 +1190,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
World.LandChannel.Join(startx,starty,endx,endy,m_host.OwnerID); World.LandChannel.Join(startx,starty,endx,endy,m_host.OwnerID);
} }
public void osParcelSubdivide(LSL_Vector pos1, LSL_Vector pos2) public void osParcelSubdivide(LSL_Vector pos1, LSL_Vector pos2)
{ {
CheckThreatLevel(ThreatLevel.High, "osParcelSubdivide"); CheckThreatLevel(ThreatLevel.High, "osParcelSubdivide");
@ -1213,7 +1213,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// can modify it // can modify it
ILandObject startLandObject = World.LandChannel.GetLandObject((int)pos.x, (int)pos.y); ILandObject startLandObject = World.LandChannel.GetLandObject((int)pos.x, (int)pos.y);
if (startLandObject == null) if (startLandObject == null)
{ {
OSSLShoutError("There is no land at that location"); OSSLShoutError("There is no land at that location");
return; return;
@ -1230,7 +1230,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
UUID uuid; UUID uuid;
// Process the rules, not sure what the impact would be of changing owner or group // Process the rules, not sure what the impact would be of changing owner or group
for (int idx = 0; idx < rules.Length; ) for (int idx = 0; idx < rules.Length;)
{ {
int code = rules.GetLSLIntegerItem(idx++); int code = rules.GetLSLIntegerItem(idx++);
string arg = rules.GetLSLStringItem(idx++); string arg = rules.GetLSLStringItem(idx++);

View File

@ -416,7 +416,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
List<SensedEntity> sensedEntities = new List<SensedEntity>(); List<SensedEntity> sensedEntities = new List<SensedEntity>();
// If nobody about quit fast // If nobody about quit fast
if(m_CmdManager.m_ScriptEngine.World.GetRootAgentCount() == 0) if (m_CmdManager.m_ScriptEngine.World.GetRootAgentCount() == 0)
return sensedEntities; return sensedEntities;
SceneObjectPart SensePoint = ts.host; SceneObjectPart SensePoint = ts.host;
@ -485,7 +485,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
{ {
ScenePresence sp; ScenePresence sp;
// Try direct lookup by UUID // Try direct lookup by UUID
if(!m_CmdManager.m_ScriptEngine.World.TryGetScenePresence(ts.keyID, out sp)) if (!m_CmdManager.m_ScriptEngine.World.TryGetScenePresence(ts.keyID, out sp))
return sensedEntities; return sensedEntities;
senseEntity(sp); senseEntity(sp);
} }

View File

@ -564,7 +564,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
bool postOnRez = (bool)p[4]; bool postOnRez = (bool)p[4];
StateSource stateSource = (StateSource)p[5]; StateSource stateSource = (StateSource)p[5];
lock(m_CompileDict) lock (m_CompileDict)
{ {
if (!m_CompileDict.ContainsKey(itemID)) if (!m_CompileDict.ContainsKey(itemID))
return false; return false;

View File

@ -62,7 +62,7 @@ namespace OpenSim.Server.Base
/// </summary> /// </summary>
/// <param name="dllName"></param> /// <param name="dllName"></param>
/// <param name="args">The arguments which control which constructor is invoked on the plugin</param> /// <param name="args">The arguments which control which constructor is invoked on the plugin</param>
/// <returns></returns> /// <returns></returns>
public static T LoadPlugin<T>(string dllName, Object[] args) where T:class public static T LoadPlugin<T>(string dllName, Object[] args) where T:class
{ {
string[] parts = dllName.Split(new char[] {':'}); string[] parts = dllName.Split(new char[] {':'});

View File

@ -86,7 +86,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
paramList.Add(hash); paramList.Add(hash);
XmlRpcRequest request = new XmlRpcRequest("link_region", paramList); XmlRpcRequest request = new XmlRpcRequest("link_region", paramList);
string uri = "http://" + ((info.ServerURI != null && info.ServerURI != string.Empty && !info.ServerURI.StartsWith("http:")) ? info.ServerURI : info.ExternalEndPoint.Address + ":" + info.HttpPort + "/" ); string uri = "http://" + ((info.ServerURI != null && info.ServerURI != string.Empty && !info.ServerURI.StartsWith("http:")) ? info.ServerURI : info.ExternalEndPoint.Address + ":" + info.HttpPort + "/");
m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri); m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri);
XmlRpcResponse response = null; XmlRpcResponse response = null;
try try

View File

@ -526,7 +526,7 @@ namespace OpenSim.Services.Connectors
InventoryFolderBase folder = new InventoryFolderBase(); InventoryFolderBase folder = new InventoryFolderBase();
try try
{ {
folder.ParentID = new UUID(data["ParentID"].ToString()); folder.ParentID = new UUID(data["ParentID"].ToString());
folder.Type = short.Parse(data["Type"].ToString()); folder.Type = short.Parse(data["Type"].ToString());
folder.Version = ushort.Parse(data["Version"].ToString()); folder.Version = ushort.Parse(data["Version"].ToString());

View File

@ -276,11 +276,11 @@ namespace OpenSim.Services.InventoryService
List<InventoryFolderBase> folders = RequestSubFolders(root.ID); List<InventoryFolderBase> folders = RequestSubFolders(root.ID);
foreach (InventoryFolderBase folder in folders) foreach (InventoryFolderBase folder in folders)
{ {
if (folder.Type == (short)type) if (folder.Type == (short)type)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[INVENTORY SERVICE]: Found folder {0} type {1}", folder.Name, (AssetType)folder.Type); // "[INVENTORY SERVICE]: Found folder {0} type {1}", folder.Name, (AssetType)folder.Type);
return folder; return folder;
} }

View File

@ -308,7 +308,7 @@ namespace OpenSim.Services.LLLoginService
{ {
// something went wrong, make something up, so that we don't have to test this anywhere else // something went wrong, make something up, so that we don't have to test this anywhere else
guinfo = new GridUserInfo(); guinfo = new GridUserInfo();
guinfo.LastPosition = guinfo.HomePosition = new Vector3(128, 128, 30); guinfo.LastPosition = guinfo.HomePosition = new Vector3(128, 128, 30);
} }
// //

View File

@ -97,10 +97,10 @@ namespace OpenSim.Services.UserAccountService
public UserAccount GetUserAccount(UUID scopeID, string firstName, public UserAccount GetUserAccount(UUID scopeID, string firstName,
string lastName) string lastName)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[USER ACCOUNT SERVICE]: Retrieving account by username for {0} {1}, scope {2}", // "[USER ACCOUNT SERVICE]: Retrieving account by username for {0} {1}, scope {2}",
// firstName, lastName, scopeID); // firstName, lastName, scopeID);
UserAccountData[] d; UserAccountData[] d;
if (scopeID != UUID.Zero) if (scopeID != UUID.Zero)
@ -235,10 +235,10 @@ namespace OpenSim.Services.UserAccountService
public bool StoreUserAccount(UserAccount data) public bool StoreUserAccount(UserAccount data)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[USER ACCOUNT SERVICE]: Storing user account for {0} {1} {2}, scope {3}", // "[USER ACCOUNT SERVICE]: Storing user account for {0} {1} {2}, scope {3}",
// data.FirstName, data.LastName, data.PrincipalID, data.ScopeID); // data.FirstName, data.LastName, data.PrincipalID, data.ScopeID);
UserAccountData d = new UserAccountData(); UserAccountData d = new UserAccountData();
d.FirstName = data.FirstName; d.FirstName = data.FirstName;
@ -285,7 +285,7 @@ namespace OpenSim.Services.UserAccountService
#endregion #endregion
#region Console commands #region Console commands
/// <summary> /// <summary>
/// Handle the create user command from the console. /// Handle the create user command from the console.
/// </summary> /// </summary>
@ -296,7 +296,7 @@ namespace OpenSim.Services.UserAccountService
string lastName; string lastName;
string password; string password;
string email; string email;
List<char> excluded = new List<char>(new char[]{' '}); List<char> excluded = new List<char>(new char[]{' '});
if (cmdparams.Length < 3) if (cmdparams.Length < 3)

View File

@ -99,7 +99,7 @@ namespace OpenSim.Data.Null
} }
public void RemoveObject(UUID obj, UUID regionUUID) public void RemoveObject(UUID obj, UUID regionUUID)
{ {
// All parts belonging to the object with the uuid are removed. // All parts belonging to the object with the uuid are removed.
List<SceneObjectPart> parts = new List<SceneObjectPart>(m_sceneObjectParts.Values); List<SceneObjectPart> parts = new List<SceneObjectPart>(m_sceneObjectParts.Values);
foreach (SceneObjectPart part in parts) foreach (SceneObjectPart part in parts)
@ -108,7 +108,7 @@ namespace OpenSim.Data.Null
{ {
m_log.DebugFormat( m_log.DebugFormat(
"[MOCK REGION DATA PLUGIN]: Removing part {0} {1} as part of object {2} from {3}", "[MOCK REGION DATA PLUGIN]: Removing part {0} {1} as part of object {2} from {3}",
part.Name, part.UUID, obj, regionUUID); part.Name, part.UUID, obj, regionUUID);
m_sceneObjectParts.Remove(part.UUID); m_sceneObjectParts.Remove(part.UUID);
} }
} }
@ -129,7 +129,7 @@ namespace OpenSim.Data.Null
if (prim.IsRoot) if (prim.IsRoot)
{ {
m_log.DebugFormat( m_log.DebugFormat(
"[MOCK REGION DATA PLUGIN]: Loading root part {0} {1} in {2}", prim.Name, prim.UUID, regionUUID); "[MOCK REGION DATA PLUGIN]: Loading root part {0} {1} in {2}", prim.Name, prim.UUID, regionUUID);
objects[prim.UUID] = new SceneObjectGroup(prim); objects[prim.UUID] = new SceneObjectGroup(prim);
} }
} }

View File

@ -69,6 +69,6 @@ namespace OpenSim.Tests.Common.Mock
public AsyncSceneObjectGroupDeleter SceneObjectGroupDeleter public AsyncSceneObjectGroupDeleter SceneObjectGroupDeleter
{ {
get { return m_asyncSceneObjectDeleter; } get { return m_asyncSceneObjectDeleter; }
} }
} }
} }

View File

@ -54,8 +54,8 @@ namespace OpenSim.Tests.Common
{ {
AssetBase asset = CreateAsset(UUID.Random(), AssetType.Notecard, "hello", creatorId); AssetBase asset = CreateAsset(UUID.Random(), AssetType.Notecard, "hello", creatorId);
scene.AssetService.Store(asset); scene.AssetService.Store(asset);
return asset; return asset;
} }
/// <summary> /// <summary>
/// Create an asset from the given scene object. /// Create an asset from the given scene object.

View File

@ -58,7 +58,7 @@ namespace OpenSim.Tests.Common.Setup
public class SceneSetupHelpers public class SceneSetupHelpers
{ {
// These static variables in order to allow regions to be linked by shared modules and same // These static variables in order to allow regions to be linked by shared modules and same
// CommunicationsManager. // CommunicationsManager.
private static ISharedRegionModule m_assetService = null; private static ISharedRegionModule m_assetService = null;
// private static ISharedRegionModule m_authenticationService = null; // private static ISharedRegionModule m_authenticationService = null;
private static ISharedRegionModule m_inventoryService = null; private static ISharedRegionModule m_inventoryService = null;
@ -69,19 +69,19 @@ namespace OpenSim.Tests.Common.Setup
/// <summary> /// <summary>
/// Set up a test scene /// Set up a test scene
/// </summary> /// </summary>
/// ///
/// Automatically starts service threads, as would the normal runtime. /// Automatically starts service threads, as would the normal runtime.
/// ///
/// <returns></returns> /// <returns></returns>
public static TestScene SetupScene() public static TestScene SetupScene()
{ {
return SetupScene(""); return SetupScene("");
} }
/// <summary> /// <summary>
/// Set up a test scene /// Set up a test scene
/// </summary> /// </summary>
/// ///
/// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param> /// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param>
/// <returns></returns> /// <returns></returns>
public static TestScene SetupScene(String realServices) public static TestScene SetupScene(String realServices)
@ -94,7 +94,7 @@ namespace OpenSim.Tests.Common.Setup
///// <summary> ///// <summary>
///// Set up a test scene ///// Set up a test scene
///// </summary> ///// </summary>
///// /////
///// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param> ///// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param>
///// <param name="cm">This should be the same if simulating two scenes within a standalone</param> ///// <param name="cm">This should be the same if simulating two scenes within a standalone</param>
///// <returns></returns> ///// <returns></returns>
@ -167,13 +167,13 @@ namespace OpenSim.Tests.Common.Setup
capsModule.Initialise(new IniConfigSource()); capsModule.Initialise(new IniConfigSource());
testScene.AddRegionModule(capsModule.Name, capsModule); testScene.AddRegionModule(capsModule.Name, capsModule);
capsModule.AddRegion(testScene); capsModule.AddRegion(testScene);
IRegionModule godsModule = new GodsModule(); IRegionModule godsModule = new GodsModule();
godsModule.Initialise(testScene, new IniConfigSource()); godsModule.Initialise(testScene, new IniConfigSource());
testScene.AddModule(godsModule.Name, godsModule); testScene.AddModule(godsModule.Name, godsModule);
realServices = realServices.ToLower(); realServices = realServices.ToLower();
// IConfigSource config = new IniConfigSource(); // IConfigSource config = new IniConfigSource();
// If we have a brand new scene, need to initialize shared region modules // If we have a brand new scene, need to initialize shared region modules
if ((m_assetService == null && m_inventoryService == null) || newScene) if ((m_assetService == null && m_inventoryService == null) || newScene)
{ {
@ -184,13 +184,13 @@ namespace OpenSim.Tests.Common.Setup
// For now, always started a 'real' authentication service // For now, always started a 'real' authentication service
StartAuthenticationService(testScene, true); StartAuthenticationService(testScene, true);
if (realServices.Contains("inventory")) if (realServices.Contains("inventory"))
StartInventoryService(testScene, true); StartInventoryService(testScene, true);
else else
StartInventoryService(testScene, false); StartInventoryService(testScene, false);
StartGridService(testScene, true); StartGridService(testScene, true);
StartUserAccountService(testScene); StartUserAccountService(testScene);
StartPresenceService(testScene); StartPresenceService(testScene);
} }
@ -207,7 +207,7 @@ namespace OpenSim.Tests.Common.Setup
m_presenceService.RegionLoaded(testScene); m_presenceService.RegionLoaded(testScene);
} }
m_inventoryService.PostInitialise(); m_inventoryService.PostInitialise();
m_assetService.PostInitialise(); m_assetService.PostInitialise();
m_userAccountService.PostInitialise(); m_userAccountService.PostInitialise();
@ -250,7 +250,7 @@ namespace OpenSim.Tests.Common.Setup
else else
config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockAssetService"); config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockAssetService");
config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
assetService.Initialise(config); assetService.Initialise(config);
assetService.AddRegion(testScene); assetService.AddRegion(testScene);
assetService.RegionLoaded(testScene); assetService.RegionLoaded(testScene);
testScene.AddRegionModule(assetService.Name, assetService); testScene.AddRegionModule(assetService.Name, assetService);
@ -277,7 +277,7 @@ namespace OpenSim.Tests.Common.Setup
testScene.AddRegionModule(service.Name, service); testScene.AddRegionModule(service.Name, service);
//m_authenticationService = service; //m_authenticationService = service;
} }
private static void StartInventoryService(Scene testScene, bool real) private static void StartInventoryService(Scene testScene, bool real)
{ {
ISharedRegionModule inventoryService = new LocalInventoryServicesConnector(); ISharedRegionModule inventoryService = new LocalInventoryServicesConnector();
@ -285,7 +285,7 @@ namespace OpenSim.Tests.Common.Setup
config.AddConfig("Modules"); config.AddConfig("Modules");
config.AddConfig("InventoryService"); config.AddConfig("InventoryService");
config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector"); config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector");
if (real) if (real)
{ {
config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Services.InventoryService.dll:InventoryService"); config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Services.InventoryService.dll:InventoryService");
@ -294,7 +294,7 @@ namespace OpenSim.Tests.Common.Setup
{ {
config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockInventoryService"); config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockInventoryService");
} }
config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
inventoryService.Initialise(config); inventoryService.Initialise(config);
inventoryService.AddRegion(testScene); inventoryService.AddRegion(testScene);
@ -338,14 +338,14 @@ namespace OpenSim.Tests.Common.Setup
config.Configs["UserAccountService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); config.Configs["UserAccountService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
config.Configs["UserAccountService"].Set( config.Configs["UserAccountService"].Set(
"LocalServiceModule", "OpenSim.Services.UserAccountService.dll:UserAccountService"); "LocalServiceModule", "OpenSim.Services.UserAccountService.dll:UserAccountService");
if (m_userAccountService == null) if (m_userAccountService == null)
{ {
ISharedRegionModule userAccountService = new LocalUserAccountServicesConnector(); ISharedRegionModule userAccountService = new LocalUserAccountServicesConnector();
userAccountService.Initialise(config); userAccountService.Initialise(config);
m_userAccountService = userAccountService; m_userAccountService = userAccountService;
} }
m_userAccountService.AddRegion(testScene); m_userAccountService.AddRegion(testScene);
m_userAccountService.RegionLoaded(testScene); m_userAccountService.RegionLoaded(testScene);
testScene.AddRegionModule(m_userAccountService.Name, m_userAccountService); testScene.AddRegionModule(m_userAccountService.Name, m_userAccountService);
@ -559,5 +559,4 @@ namespace OpenSim.Tests.Common.Setup
sogd.InventoryDeQueueAndDelete(); sogd.InventoryDeQueueAndDelete();
} }
} }
} }

View File

@ -42,7 +42,7 @@ namespace OpenSim.Tests.Common
public static InventoryItemBase CreateInventoryItem( public static InventoryItemBase CreateInventoryItem(
Scene scene, string itemName, UUID itemId, string folderPath, UUID userId) Scene scene, string itemName, UUID itemId, string folderPath, UUID userId)
{ {
InventoryItemBase item = new InventoryItemBase(); InventoryItemBase item = new InventoryItemBase();
item.Name = itemName; item.Name = itemName;
item.AssetID = AssetHelpers.CreateAsset(scene, userId).FullID; item.AssetID = AssetHelpers.CreateAsset(scene, userId).FullID;
@ -52,7 +52,7 @@ namespace OpenSim.Tests.Common
InventoryFolderBase objsFolder = scene.InventoryService.GetFolderForType(userId, AssetType.Object); InventoryFolderBase objsFolder = scene.InventoryService.GetFolderForType(userId, AssetType.Object);
item.Folder = objsFolder.ID; item.Folder = objsFolder.ID;
scene.AddInventoryItem(item); scene.AddInventoryItem(item);
return item; return item;
} }

View File

@ -53,7 +53,7 @@ namespace OpenSim.Tests.Common.Setup
// UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000099"); // UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000099");
// return CreateUserWithInventory(commsManager, userId, callback); // return CreateUserWithInventory(commsManager, userId, callback);
// } // }
// //
// /// <summary> // /// <summary>
// /// Create a test user with a standard inventory // /// Create a test user with a standard inventory
// /// </summary> // /// </summary>
@ -108,11 +108,11 @@ namespace OpenSim.Tests.Common.Setup
// { // {
// LocalUserServices lus = (LocalUserServices)commsManager.UserService; // LocalUserServices lus = (LocalUserServices)commsManager.UserService;
// lus.AddUser(firstName, lastName, password, "bill@bailey.com", 1000, 1000, userId); // lus.AddUser(firstName, lastName, password, "bill@bailey.com", 1000, 1000, userId);
// //
// CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId); // CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId);
// userInfo.OnInventoryReceived += callback; // userInfo.OnInventoryReceived += callback;
// userInfo.FetchInventory(); // userInfo.FetchInventory();
// //
// return userInfo; // return userInfo;
// } // }
@ -140,6 +140,6 @@ namespace OpenSim.Tests.Common.Setup
scene.UserAccountService.StoreUserAccount(ua); scene.UserAccountService.StoreUserAccount(ua);
scene.InventoryService.CreateUserInventory(ua.PrincipalID); scene.InventoryService.CreateUserInventory(ua.PrincipalID);
scene.AuthenticationService.SetPassword(ua.PrincipalID, pw); scene.AuthenticationService.SetPassword(ua.PrincipalID, pw);
} }
} }
} }