viewer-2-initial-appearance
John Hurliman 2010-09-12 14:21:51 -07:00
commit c03b24cbfd
96 changed files with 920 additions and 776 deletions

View File

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

View File

@ -1,4 +1,31 @@
using System;
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Text;
using OpenMetaverse;
@ -17,7 +44,7 @@ namespace OpenSim.Data
/// <returns></returns>
public static UUID FromDB(object id)
{
if( (id == null) || (id == DBNull.Value))
if ((id == null) || (id == DBNull.Value))
return UUID.Zero;
if (id.GetType() == typeof(Guid))

View File

@ -1136,7 +1136,7 @@ VALUES
prim.LinkNum = Convert.ToInt32(primRow["LinkNumber"]);
if (!(primRow["MediaURL"] is System.DBNull))
prim.MediaUrl = (string)primRow["MediaURL"];
prim.MediaUrl = (string)primRow["MediaURL"];
return prim;
}
@ -1190,7 +1190,7 @@ VALUES
{
}
if (!(shapeRow["Media"] is System.DBNull))
if (!(shapeRow["Media"] is System.DBNull))
baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]);
return baseShape;
@ -1521,7 +1521,7 @@ VALUES
parameters.Add(_Database.CreateParameter("PassTouches", 1));
else
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));
return parameters.ToArray();

View File

@ -122,7 +122,7 @@ namespace OpenSim.Data
int ver = FindVersion(_conn, "migrations");
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)");
InsertVersion("migrations", 1);
}
@ -288,7 +288,7 @@ namespace OpenSim.Data
SortedList<int, string[]> migrations = new SortedList<int, string[]>();
string[] names = _assem.GetManifestResourceNames();
if( names.Length == 0 ) // should never happen
if (names.Length == 0) // should never happen
return migrations;
Array.Sort(names); // we want all the migrations ordered
@ -297,7 +297,7 @@ namespace OpenSim.Data
Match m = null;
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
* 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( nLastVerFound <= after )
if (nLastVerFound <= after)
goto scan_old_style;
}
@ -329,7 +329,7 @@ namespace OpenSim.Data
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();
}
@ -345,7 +345,7 @@ namespace OpenSim.Data
string sLine = resourceReader.ReadLine();
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;
if (sLine.Trim().Equals(":GO", StringComparison.InvariantCultureIgnoreCase))
@ -392,7 +392,7 @@ scan_old_style:
if (m.Success)
{
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))
{

View File

@ -286,7 +286,7 @@ namespace OpenSim.Data.MySQL
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.
// ( 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();
// Be a bit safer in parsing these because the

View File

@ -689,7 +689,7 @@ namespace OpenSim.Data.MySQL
"UserLocationX, UserLocationY, UserLocationZ, " +
"UserLookAtX, UserLookAtY, UserLookAtZ, " +
"AuthbuyerID, OtherCleanTime, MediaType, MediaDescription, " +
"MediaSize, MediaLoop, ObscureMusic, ObscureMedia) values (" +
"MediaSize, MediaLoop, ObscureMusic, ObscureMedia) values (" +
"?UUID, ?RegionUUID, " +
"?LocalLandID, ?Bitmap, ?Name, ?Description, " +
"?OwnerUUID, ?IsGroupOwned, ?Area, ?AuctionID, " +
@ -700,7 +700,7 @@ namespace OpenSim.Data.MySQL
"?UserLocationX, ?UserLocationY, ?UserLocationZ, " +
"?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " +
"?AuthbuyerID, ?OtherCleanTime, ?MediaType, ?MediaDescription, "+
"CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia)";
"CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia)";
FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID);
@ -737,7 +737,7 @@ namespace OpenSim.Data.MySQL
string command = "select * from `regionwindlight` where region_id = ?regionID";
using(MySqlCommand cmd = new MySqlCommand(command))
using (MySqlCommand cmd = new MySqlCommand(command))
{
cmd.Connection = dbcon;
@ -1359,13 +1359,13 @@ namespace OpenSim.Data.MySQL
m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name);
}
newData.MediaDescription = (string) row["MediaDescription"];
newData.MediaType = (string) row["MediaType"];
newData.MediaWidth = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[0]);
newData.MediaHeight = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[1]);
newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]);
newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]);
newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]);
newData.MediaDescription = (string) row["MediaDescription"];
newData.MediaType = (string) row["MediaType"];
newData.MediaWidth = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[0]);
newData.MediaHeight = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[1]);
newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]);
newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]);
newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]);
newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
@ -1733,7 +1733,7 @@ namespace OpenSim.Data.MySQL
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"]);
return s;

View File

@ -1,4 +1,31 @@
using System;
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using OpenMetaverse;

View File

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

View File

@ -185,7 +185,7 @@ namespace OpenSim.Data.SQLite
{
m_log.Info("[SQLITE REGION DB]: Caught fill error on primitems table");
}
try
{
terrainDa.Fill(ds.Tables["terrain"]);
@ -519,7 +519,7 @@ namespace OpenSim.Data.SQLite
"[SQLITE REGION DB]: No shape found for prim in storage, so setting default box shape");
prim.Shape = PrimitiveBaseShape.Default;
}
createdObjects[new UUID(objID)].AddPart(prim);
LoadItems(prim);
}
@ -543,17 +543,17 @@ namespace OpenSim.Data.SQLite
/// </summary>
/// <param name="prim">the prim</param>
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"];
String sql = String.Format("primID = '{0}'", prim.UUID.ToString());
String sql = String.Format("primID = '{0}'", prim.UUID.ToString());
DataRow[] dbItemRows = dbItems.Select(sql);
IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>();
// m_log.DebugFormat(
// "[SQLITE REGION DB]: Found {0} items for {1} {2}", dbItemRows.Length, prim.Name, prim.UUID);
// m_log.DebugFormat(
// "[SQLITE REGION DB]: Found {0} items for {1} {2}", dbItemRows.Length, prim.Name, prim.UUID);
foreach (DataRow row in dbItemRows)
{
TaskInventoryItem item = buildItem(row);
@ -702,8 +702,6 @@ namespace OpenSim.Data.SQLite
{
landaccesslist.Rows.Remove(rowsToDelete[iter]);
}
}
Commit();
}
@ -813,7 +811,7 @@ namespace OpenSim.Data.SQLite
try
{
regionSettingsDa.Update(ds, "regionsettings");
}
}
catch (SqliteException SqlEx)
{
throw new Exception(
@ -983,7 +981,7 @@ namespace OpenSim.Data.SQLite
createCol(prims, "CollisionSoundVolume", typeof(Double));
createCol(prims, "VolumeDetect", typeof(Int16));
createCol(prims, "MediaURL", typeof(String));
// Add in contraints
@ -1200,10 +1198,10 @@ namespace OpenSim.Data.SQLite
private SceneObjectPart buildPrim(DataRow row)
{
// 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
// SceneObjectGroup sog = new SceneObjectGroup();
// SceneObjectPart sop = new SceneObjectPart();
// sop.LocalId = 1;
@ -1220,7 +1218,7 @@ namespace OpenSim.Data.SQLite
// TODO: this doesn't work yet because something more
// interesting has to be done to actually get these values
// back out. Not enough time to figure it out yet.
SceneObjectPart prim = new SceneObjectPart();
prim.UUID = new UUID((String) row["UUID"]);
// explicit conversion of integers is required, which sort
@ -1350,7 +1348,7 @@ namespace OpenSim.Data.SQLite
if (Convert.ToInt16(row["VolumeDetect"]) != 0)
prim.VolumeDetectActive = true;
if (!(row["MediaURL"] is System.DBNull))
{
//m_log.DebugFormat("[SQLITE]: MediaUrl type [{0}]", row["MediaURL"].GetType());
@ -1689,7 +1687,7 @@ namespace OpenSim.Data.SQLite
row["VolumeDetect"] = 1;
else
row["VolumeDetect"] = 0;
row["MediaURL"] = prim.MediaUrl;
}
@ -1767,12 +1765,12 @@ namespace OpenSim.Data.SQLite
row["UserLookAtZ"] = land.UserLookAt.Z;
row["AuthbuyerID"] = land.AuthBuyerID.ToString();
row["OtherCleanTime"] = land.OtherCleanTime;
row["MediaType"] = land.MediaType;
row["MediaDescription"] = land.MediaDescription;
row["MediaSize"] = land.MediaWidth.ToString() + "," + land.MediaHeight.ToString();
row["MediaLoop"] = land.MediaLoop.ToString();
row["ObscureMusic"] = land.ObscureMusic.ToString();
row["ObscureMedia"] = land.ObscureMedia.ToString();
row["MediaType"] = land.MediaType;
row["MediaDescription"] = land.MediaDescription;
row["MediaSize"] = land.MediaWidth.ToString() + "," + land.MediaHeight.ToString();
row["MediaLoop"] = land.MediaLoop.ToString();
row["ObscureMusic"] = land.ObscureMusic.ToString();
row["ObscureMedia"] = land.ObscureMedia.ToString();
}
/// <summary>
@ -1870,10 +1868,10 @@ namespace OpenSim.Data.SQLite
s.TextureEntry = textureEntry;
s.ExtraParams = (byte[]) row["ExtraParams"];
if (!(row["Media"] is System.DBNull))
s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
return s;
}
@ -1917,7 +1915,7 @@ namespace OpenSim.Data.SQLite
row["Texture"] = s.TextureEntry;
row["ExtraParams"] = s.ExtraParams;
if (s.Media != null)
row["Media"] = s.Media.ToXml();
}
@ -2255,7 +2253,6 @@ namespace OpenSim.Data.SQLite
delete.Parameters.Add(createSqliteParameter("AccessUUID", typeof(String)));
da.DeleteCommand = delete;
da.DeleteCommand.Connection = conn;
}
private void setupRegionSettingsCommands(SqliteDataAdapter da, SqliteConnection conn)
@ -2327,7 +2324,7 @@ namespace OpenSim.Data.SQLite
return DbType.String;
}
}
static void PrintDataSet(DataSet ds)
{
// Print out any name and extended properties.

View File

@ -1,4 +1,31 @@
using System;
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.IO;
using System.Collections.Generic;
using log4net.Config;
@ -41,13 +68,13 @@ namespace OpenSim.Data.Tests
{
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?
}
/// <summary>
/// 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.
/// </summary>
/// <param name="service">The service being tested</param>
@ -118,12 +145,12 @@ namespace OpenSim.Data.Tests
{
if (m_service != null)
{
if( m_service is IDisposable)
if (m_service is IDisposable)
((IDisposable)m_service).Dispose();
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);
}
@ -204,7 +231,7 @@ namespace OpenSim.Data.Tests
lst += ", " + s;
}
string sCond = stores.Length > 1 ? ("in (" + lst + ")") : ("=" + lst);
string sCond = stores.Length > 1 ? ("in (" + lst + ")") : ("=" + lst);
try
{
ExecuteSql("DELETE FROM migrations where name " + sCond);

View File

@ -1,4 +1,31 @@
using System;
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

View File

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

View File

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

View File

@ -38,7 +38,7 @@ namespace OpenSim.Framework.Console
{
/// <summary>
/// A console that uses cursor control and color
/// </summary>
/// </summary>
public class LocalConsole : CommandConsole
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -100,8 +100,8 @@ namespace OpenSim.Framework.Console
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
// 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.
// 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.
int left = System.Console.CursorLeft;
if (left < 0)
@ -121,7 +121,7 @@ namespace OpenSim.Framework.Console
{
top = 0;
}
else
else
{
int bh = System.Console.BufferHeight;
@ -133,7 +133,7 @@ namespace OpenSim.Framework.Console
System.Console.CursorTop = top;
return top;
}
}
/// <summary>
/// Set the cursor column.
@ -145,12 +145,12 @@ namespace OpenSim.Framework.Console
/// </param>
/// <returns>
/// The new cursor column.
/// </returns>
/// </returns>
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
// 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.
// 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.
int top = System.Console.CursorTop;
if (top < 0)
@ -214,7 +214,7 @@ namespace OpenSim.Framework.Console
System.Console.Write("{0}", prompt);
SetCursorTop(new_y);
SetCursorLeft(new_x);
SetCursorLeft(new_x);
}
}

View File

@ -1,4 +1,31 @@
using System;
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Threading;
using System.Collections.Generic;
using System.Text;

View File

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

View File

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

View File

@ -1,4 +1,4 @@
//
//
// Lazy.cs
//
// Authors:

View File

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

View File

@ -97,9 +97,9 @@ namespace OpenSim.Framework
[Serializable]
public class SimpleRegionInfo
{
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
/// <summary>
/// The port by which http communication occurs with the region (most noticeably, CAPS communication)
/// </summary>
@ -344,7 +344,7 @@ namespace OpenSim.Framework
public string proxyUrl = "";
public int ProxyOffset = 0;
public string regionSecret = UUID.Random().ToString();
public string osSecret;
public UUID lastMapUUID = UUID.Zero;
@ -699,7 +699,7 @@ namespace OpenSim.Framework
RegionID = new UUID(regionUUID);
originRegionID = RegionID; // What IS this?!
RegionName = name;
string location = config.GetString("Location", String.Empty);
@ -720,7 +720,7 @@ namespace OpenSim.Framework
// Internal IP
IPAddress address;
if (config.Contains("InternalAddress"))
{
address = IPAddress.Parse(config.GetString("InternalAddress", String.Empty));
@ -774,7 +774,7 @@ namespace OpenSim.Framework
{
m_externalHostName = Util.GetLocalHost().ToString();
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);
}
else
@ -909,16 +909,16 @@ namespace OpenSim.Framework
configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
"Maximum size for nonphysical prims", m_nonphysPrimMax.ToString(), true);
configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
"Maximum size for physical prims", m_physPrimMax.ToString(), true);
configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
"Clamp prims to max size", m_clampPrimSize.ToString(), true);
configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
"Max objects this sim will hold", m_objectCapacity.ToString(), true);
configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
"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,
"Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true);
configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
"Maximum size for nonphysical prims", "0", true);
configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
"Maximum size for physical prims", "0", true);
configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
"Clamp prims to max size", "false", true);
configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
"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)
{
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),
uuid);
uuid);
}
/// <summary>
@ -171,9 +171,9 @@ namespace OpenSim.Framework.Serialization
/// <returns></returns>
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>
/// Extract a plain path from an IAR path
/// </summary>
@ -184,18 +184,18 @@ namespace OpenSim.Framework.Serialization
List<string> plainDirs = new List<string>();
string[] iarDirs = iarPath.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
foreach (string iarDir in iarDirs)
{
if (!iarDir.Contains(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR))
plainDirs.Add(iarDir);
int i = iarDir.LastIndexOf(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR);
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 HttpServerLogWriter httpserverlog = new HttpServerLogWriter();
private volatile int NotSocketErrors = 0;
public volatile bool HTTPDRunning = false;
@ -160,7 +160,7 @@ namespace OpenSim.Framework.Servers.HttpServer
m_rpcHandlers[method] = handler;
m_rpcHandlersKeepAlive[method] = keepAlive; // default
}
return true;
}
@ -182,7 +182,7 @@ namespace OpenSim.Framework.Servers.HttpServer
public bool AddHTTPHandler(string methodName, GenericHTTPMethod handler)
{
//m_log.DebugFormat("[BASE HTTP SERVER]: Registering {0}", methodName);
lock (m_HTTPHandlers)
{
if (!m_HTTPHandlers.ContainsKey(methodName))
@ -204,14 +204,14 @@ namespace OpenSim.Framework.Servers.HttpServer
if (!m_pollHandlers.ContainsKey(methodName))
{
m_pollHandlers.Add(methodName,args);
pollHandlerResult = true;
pollHandlerResult = true;
}
}
if (pollHandlerResult)
return AddHTTPHandler(methodName, handler);
return false;
return false;
}
// Note that the agent string is provided simply to differentiate
@ -257,51 +257,51 @@ namespace OpenSim.Framework.Servers.HttpServer
{
IHttpClientContext context = (IHttpClientContext)source;
IHttpRequest request = args.Request;
PollServiceEventArgs psEvArgs;
if (TryGetPollServiceHTTPHandler(request.UriPath.ToString(), out psEvArgs))
{
PollServiceHttpRequest psreq = new PollServiceHttpRequest(psEvArgs, context, request);
if (psEvArgs.Request != null)
{
OSHttpRequest req = new OSHttpRequest(context, request);
Stream requestStream = req.InputStream;
Encoding encoding = Encoding.UTF8;
StreamReader reader = new StreamReader(requestStream, encoding);
string requestBody = reader.ReadToEnd();
Hashtable keysvals = new Hashtable();
Hashtable headervals = new Hashtable();
string[] querystringkeys = req.QueryString.AllKeys;
string[] rHeaders = req.Headers.AllKeys;
keysvals.Add("body", requestBody);
keysvals.Add("uri", req.RawUrl);
keysvals.Add("content-type", req.ContentType);
keysvals.Add("http-method", req.HttpMethod);
foreach (string queryname in querystringkeys)
{
keysvals.Add(queryname, req.QueryString[queryname]);
}
foreach (string headername in rHeaders)
{
headervals[headername] = req.Headers[headername];
}
keysvals.Add("headers", headervals);
keysvals.Add("querystringkeys", querystringkeys);
psEvArgs.Request(psreq.RequestID, keysvals);
}
m_PollServiceManager.Enqueue(psreq);
}
else
@ -348,10 +348,10 @@ namespace OpenSim.Framework.Servers.HttpServer
{
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);
// 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
// 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();
// HTTP IN support. The script engine taes it from here
// Nothing to worry about for us.
//
@ -540,7 +540,7 @@ namespace OpenSim.Framework.Servers.HttpServer
HandleLLSDRequests(request, response);
return;
}
// m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl);
if (DoWeHaveAHTTPHandler(request.RawUrl))
{
@ -594,7 +594,7 @@ namespace OpenSim.Framework.Servers.HttpServer
}
}
}
if (String.IsNullOrEmpty(bestMatch))
{
streamHandler = null;
@ -641,7 +641,7 @@ namespace OpenSim.Framework.Servers.HttpServer
private bool TryGetHTTPHandler(string handlerKey, out GenericHTTPMethod HTTPHandler)
{
// m_log.DebugFormat("[BASE HTTP HANDLER]: Looking for HTTP handler for {0}", handlerKey);
string bestMatch = null;
lock (m_HTTPHandlers)
@ -727,14 +727,14 @@ namespace OpenSim.Framework.Servers.HttpServer
{
xmlRprcRequest.Params.Add(request.RemoteIPEndPoint); // Param[1]
XmlRpcResponse xmlRpcResponse;
XmlRpcMethod method;
bool methodWasFound;
lock (m_rpcHandlers)
{
methodWasFound = m_rpcHandlers.TryGetValue(methodName, out method);
}
if (methodWasFound)
{
xmlRprcRequest.Params.Add(request.Url); // Param[2]
@ -766,10 +766,10 @@ namespace OpenSim.Framework.Servers.HttpServer
else
{
xmlRpcResponse = new XmlRpcResponse();
// Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
xmlRpcResponse.SetFault(
XmlRpcErrorCodes.SERVER_ERROR_METHOD,
XmlRpcErrorCodes.SERVER_ERROR_METHOD,
String.Format("Requested method [{0}] not found", methodName));
}
@ -786,11 +786,11 @@ namespace OpenSim.Framework.Servers.HttpServer
response.KeepAlive = false;
m_log.ErrorFormat("[BASE HTTP SERVER]: Handler not found for http request {0}", request.RawUrl);
response.SendChunked = false;
response.ContentLength64 = buf.Length;
response.ContentEncoding = Encoding.UTF8;
try
{
response.OutputStream.Write(buf, 0, buf.Length);
@ -872,13 +872,13 @@ namespace OpenSim.Framework.Servers.HttpServer
OSD llsdRequest = null;
OSD llsdResponse = null;
bool LegacyLLSDLoginLibOMV = (requestBody.Contains("passwd") && requestBody.Contains("mac") && requestBody.Contains("viewer_digest"));
if (requestBody.Length == 0)
// 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
{
@ -1090,7 +1090,7 @@ namespace OpenSim.Framework.Servers.HttpServer
string bestMatch = null;
//m_log.DebugFormat("[BASE HTTP HANDLER]: Checking if we have an HTTP handler for {0}", searchquery);
lock (m_HTTPHandlers)
{
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
//
if (pattern == "/" && searchquery == "/" || pattern != "/")
bestMatch = pattern;
bestMatch = pattern;
}
}
}
@ -1236,11 +1236,11 @@ namespace OpenSim.Framework.Servers.HttpServer
}
public void HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response)
{
{
// 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);
switch (request.HttpMethod)
{
case "OPTIONS":
@ -1256,7 +1256,7 @@ namespace OpenSim.Framework.Servers.HttpServer
private void HandleContentVerbs(OSHttpRequest request, OSHttpResponse response)
{
// 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.
// 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(
// "[BASE HTTP HANDLER]: TryGetHTTPHandlerPathBased() looking for HTTP handler to match {0}", searchquery);
lock (m_HTTPHandlers)
{
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
//and should check for NullReferenceExceptions
if (string.IsNullOrEmpty(contentType))
{
contentType = "text/html";
@ -1472,8 +1472,8 @@ namespace OpenSim.Framework.Servers.HttpServer
byte[] buffer;
if (!(contentType.Contains("image")
|| contentType.Contains("x-shockwave-flash")
if (!(contentType.Contains("image")
|| contentType.Contains("x-shockwave-flash")
|| contentType.Contains("application/x-oar")))
{
// Text
@ -1504,7 +1504,7 @@ namespace OpenSim.Framework.Servers.HttpServer
{
response.OutputStream.Flush();
response.Send();
//if (!response.KeepAlive && response.ReuseContext)
// response.FreeContext();
}
@ -1611,11 +1611,11 @@ namespace OpenSim.Framework.Servers.HttpServer
m_httpListener2 = CoolHTTPListener.Create(m_listenIPAddress, (int)m_port);
m_httpListener2.ExceptionThrown += httpServerException;
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
//m_httpListener2.UseTraceLogs = true;
//m_httpListener2.DisconnectHandler = httpServerDisconnectMonitor;
}
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]: 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.
throw e;
}
@ -1656,7 +1656,7 @@ namespace OpenSim.Framework.Servers.HttpServer
{
case SocketError.NotSocket:
NotSocketErrors++;
break;
}
}
@ -1686,12 +1686,11 @@ namespace OpenSim.Framework.Servers.HttpServer
m_httpListener2.LogWriter = null;
m_httpListener2.RequestReceived -= OnRequest;
m_httpListener2.Stop();
}
}
catch (NullReferenceException)
{
m_log.Warn("[BASE HTTP SERVER]: Null Reference when stopping HttpServer.");
}
}
public void RemoveStreamHandler(string httpMethod, string path)
@ -1712,7 +1711,7 @@ namespace OpenSim.Framework.Servers.HttpServer
m_HTTPHandlers.Remove(path);
return;
}
m_HTTPHandlers.Remove(GetHandlerKey(httpMethod, path));
}
}
@ -1728,7 +1727,6 @@ namespace OpenSim.Framework.Servers.HttpServer
}
RemoveHTTPHandler(httpMethod, path);
}
public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler)
@ -1759,7 +1757,6 @@ namespace OpenSim.Framework.Servers.HttpServer
}
}
public bool RemoveLLSDHandler(string path, LLSDMethod handler)
{
try
@ -1833,7 +1830,7 @@ namespace OpenSim.Framework.Servers.HttpServer
oresp = osresp;
}
}
/// <summary>
/// Relays HttpServer log messages to our own logging mechanism.
/// </summary>
@ -1852,7 +1849,7 @@ namespace OpenSim.Framework.Servers.HttpServer
{
case LogPrio.Trace:
m_log.DebugFormat("[{0}]: {1}", source, message);
break;
break;
case LogPrio.Debug:
m_log.DebugFormat("[{0}]: {1}", source, message);
break;
@ -1872,8 +1869,8 @@ namespace OpenSim.Framework.Servers.HttpServer
break;
}
*/
return;
}
}
}
}

View File

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

View File

@ -152,7 +152,7 @@ namespace OpenSim
RegisterConsoleCommands();
base.StartupSpecific();
MainServer.Instance.AddStreamHandler(new OpenSim.SimStatusHandler());
MainServer.Instance.AddStreamHandler(new OpenSim.XSimStatusHandler(this));
if (userStatsURI != String.Empty)
@ -192,7 +192,7 @@ namespace OpenSim
// Hook up to the watchdog timer
Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler;
PrintFileToConsole("startuplogo.txt");
PrintFileToConsole("startuplogo.txt");
// For now, start at the 'root' level by default
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",
"debug packet <level>",
"Turn on packet debugging",
"If level > 255 then all incoming and outgoing packets are logged.\n"
"Turn on packet debugging",
"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 <= 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"
@ -561,11 +561,11 @@ namespace OpenSim
{
regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source, regionName);
}
IScene scene;
PopulateRegionEstateInfo(regInfo);
CreateRegion(regInfo, true, out scene);
regInfo.EstateSettings.Save();
CreateRegion(regInfo, true, out scene);
regInfo.EstateSettings.Save();
}
/// <summary>
@ -943,7 +943,7 @@ namespace OpenSim
delegate(Scene scene)
{
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.RegionLocX,
scene.RegionInfo.RegionLocY,

View File

@ -63,7 +63,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details.
/// </value>
protected int m_debugPacketLevel = 0;
#region Events
public event GenericMessage OnGenericMessage;
@ -287,7 +287,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public event MuteListEntryRemove OnRemoveMuteListEntry;
public event GodlikeMessage onGodlikeMessage;
public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
#endregion Events
@ -329,12 +328,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// ownerless phantom.
///
/// All manipulation of this set has to occur under an m_entityUpdates.SyncRoot lock
///
///
/// </value>
protected HashSet<uint> m_killRecord;
// protected HashSet<uint> m_attachmentsSent;
// protected HashSet<uint> m_attachmentsSent;
private int m_moneyBalance;
private int m_animationSequenceNumber = 1;
private bool m_SendLogoutPacketWhenClosing = true;
@ -383,22 +382,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public string ActiveGroupName { get { return m_activeGroupName; } }
public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } }
public bool IsGroupMember(UUID groupID) { return m_groupPowers.ContainsKey(groupID); }
/// <summary>
/// First name of the agent/avatar represented by the client
/// </summary>
public string FirstName { get { return m_firstName; } }
/// <summary>
/// Last name of the agent/avatar represented by the client
/// </summary>
public string LastName { get { return m_lastName; } }
/// <summary>
/// Full name of the client (first name and last name)
/// </summary>
public string Name { get { return FirstName + " " + LastName; } }
public uint CircuitCode { get { return m_circuitCode; } }
public int MoneyBalance { get { return m_moneyBalance; } }
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_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>();
m_killRecord = new HashSet<uint>();
// m_attachmentsSent = new HashSet<uint>();
// m_attachmentsSent = new HashSet<uint>();
m_assetService = m_scene.RequestModuleInterface<IAssetService>();
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.
m_log.Error(
string.Format("[LLCLIENTVIEW]: Caught exception while processing {0}", packetObject.Pack), e);
}
}
}
#endregion Packet Handling
@ -865,7 +864,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
foreach (GroupActiveProposals Proposal in Proposals)
{
GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket();
GAPIRP.AgentData.AgentID = AgentId;
GAPIRP.AgentData.GroupID = groupID;
GAPIRP.TransactionData.TransactionID = transactionID;
@ -889,7 +888,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (Proposals.Length == 0)
{
GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket();
GAPIRP.AgentData.AgentID = AgentId;
GAPIRP.AgentData.GroupID = groupID;
GAPIRP.TransactionData.TransactionID = transactionID;
@ -944,7 +943,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (Votes.Length == 0)
{
GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket();
GVHIRP.AgentData.AgentID = AgentId;
GVHIRP.AgentData.GroupID = groupID;
GVHIRP.TransactionData.TransactionID = transactionID;
@ -968,7 +967,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(GVHIRP, ThrottleOutPacketType.Task);
}
}
public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
{
GroupAccountDetailsReplyPacket GADRP = new GroupAccountDetailsReplyPacket();
@ -987,13 +986,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
GADRP.HistoryData[0] = History;
OutPacket(GADRP, ThrottleOutPacketType.Task);
}
public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
{
GroupAccountSummaryReplyPacket GASRP =
(GroupAccountSummaryReplyPacket)PacketPool.Instance.GetPacket(
PacketType.GroupAccountSummaryReply);
GASRP.AgentData = new GroupAccountSummaryReplyPacket.AgentDataBlock();
GASRP.AgentData.AgentID = sender.AgentId;
GASRP.AgentData.GroupID = groupID;
@ -1020,13 +1019,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
GASRP.MoneyData.LightTaxEstimate = 0;
OutPacket(GASRP, ThrottleOutPacketType.Task);
}
public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
{
GroupAccountTransactionsReplyPacket GATRP =
(GroupAccountTransactionsReplyPacket)PacketPool.Instance.GetPacket(
PacketType.GroupAccountTransactionsReply);
GATRP.AgentData = new GroupAccountTransactionsReplyPacket.AgentDataBlock();
GATRP.AgentData.AgentID = sender.AgentId;
GATRP.AgentData.GroupID = groupID;
@ -1510,7 +1509,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendKillObject(ulong regionHandle, uint localID)
{
// m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, localID, regionHandle);
KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject);
// TODO: don't create new blocks if recycling an old packet
kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1];
@ -3469,9 +3468,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence);
OutPacket(objupdate, ThrottleOutPacketType.Task);
// 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)
@ -3519,7 +3518,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#region Primitive Packet/Data Sending Methods
/// <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
/// </summary>
public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
@ -3527,7 +3526,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
double priority = m_prioritizer.GetUpdatePriority(this, entity);
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)
@ -3544,20 +3543,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
EntityUpdate 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
// 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.
if (m_killRecord.Contains(update.Entity.LocalId))
{
// m_log.WarnFormat(
// "[CLIENT]: Preventing full update for prim with local id {0} after client for user {1} told it was deleted",
// update.Entity.LocalId, Name);
// "[CLIENT]: Preventing full update for prim with local id {0} after client for user {1} told it was deleted",
// update.Entity.LocalId, Name);
continue;
}
if (update.Entity is SceneObjectPart)
{
SceneObjectPart part = (SceneObjectPart)update.Entity;
@ -3642,28 +3641,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// string text = sop.Text;
// if (text.IndexOf("\n") >= 0)
// text = text.Remove(text.IndexOf("\n"));
//
//
// if (m_attachmentsSent.Contains(sop.ParentID))
// {
//// m_log.DebugFormat(
//// "[CLIENT]: Sending full info about attached prim {0} text {1}",
//// sop.LocalId, text);
//
//
// objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock(sop, this.m_agentId));
//
//
// m_attachmentsSent.Add(sop.LocalId);
// }
// else
// {
// 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);
//
// m_entityUpdates.Enqueue(double.MaxValue, update, sop.LocalId);
//
// m_entityUpdates.Enqueue(double.MaxValue, update, sop.LocalId);
// }
// }
// else
// {
// {
objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId));
// }
}
@ -3977,7 +3976,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_propertiesPacketTimer.Stop();
return;
}
m_propertiesPacketTimer.Stop();
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)
{
ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage();
ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage();
updateMessage.AABBMax = landData.AABBMax;
updateMessage.AABBMin = landData.AABBMin;
@ -4252,7 +4251,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
updateMessage.PassHours = landData.PassHours;
updateMessage.PassPrice = landData.PassPrice;
updateMessage.PublicCount = 0; //TODO: Unimplemented
updateMessage.RegionPushOverride = (regionFlags & (uint)RegionFlags.RestrictPushObject) > 0;
updateMessage.RegionDenyAnonymous = (regionFlags & (uint)RegionFlags.DenyAnonymous) > 0;
@ -4282,13 +4281,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
updateMessage.UserLocation = landData.UserLocation;
updateMessage.UserLookAt = landData.UserLookAt;
updateMessage.MediaType = landData.MediaType;
updateMessage.MediaDesc = landData.MediaDescription;
updateMessage.MediaWidth = landData.MediaWidth;
updateMessage.MediaHeight = landData.MediaHeight;
updateMessage.MediaLoop = landData.MediaLoop;
updateMessage.ObscureMusic = landData.ObscureMusic;
updateMessage.ObscureMedia = landData.ObscureMedia;
updateMessage.MediaType = landData.MediaType;
updateMessage.MediaDesc = landData.MediaDescription;
updateMessage.MediaWidth = landData.MediaWidth;
updateMessage.MediaHeight = landData.MediaHeight;
updateMessage.MediaLoop = landData.MediaLoop;
updateMessage.ObscureMusic = landData.ObscureMusic;
updateMessage.ObscureMedia = landData.ObscureMedia;
try
{
@ -4297,8 +4296,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
eq.ParcelProperties(updateMessage, this.AgentId);
} else {
m_log.Warn("No EQ Interface when sending parcel data.");
}
m_log.Warn("No EQ Interface when sending parcel data.");
}
}
catch (Exception ex)
{
@ -4671,9 +4670,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
// 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);
update.UpdateFlags = (uint)flags;
#endregion PrimFlags
@ -4806,11 +4805,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale);
AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation);
AddLocalPacketHandler(PacketType.ObjectFlagUpdate, HandleObjectFlagUpdate);
// 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
AddLocalPacketHandler(PacketType.ObjectImage, HandleObjectImage, false);
AddLocalPacketHandler(PacketType.ObjectGrab, HandleObjectGrab, false);
AddLocalPacketHandler(PacketType.ObjectGrabUpdate, HandleObjectGrabUpdate, false);
AddLocalPacketHandler(PacketType.ObjectDeGrab, HandleObjectDeGrab);
@ -5065,12 +5064,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return false;
}
private bool HandleParcelGodMarkAsContent(IClientAPI client, Packet Packet)
{
ParcelGodMarkAsContentPacket ParcelGodMarkAsContent =
(ParcelGodMarkAsContentPacket)Packet;
ParcelGodMark ParcelGodMarkAsContentHandler = OnParcelGodMark;
if (ParcelGodMarkAsContentHandler != null)
{
@ -5081,11 +5080,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandleFreezeUser(IClientAPI client, Packet Packet)
{
FreezeUserPacket FreezeUser = (FreezeUserPacket)Packet;
FreezeUserUpdate FreezeUserHandler = OnParcelFreezeUser;
if (FreezeUserHandler != null)
{
@ -5097,12 +5096,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandleEjectUser(IClientAPI client, Packet Packet)
{
EjectUserPacket EjectUser =
(EjectUserPacket)Packet;
EjectUserUpdate EjectUserHandler = OnParcelEjectUser;
if (EjectUserHandler != null)
{
@ -5114,12 +5113,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandleParcelBuyPass(IClientAPI client, Packet Packet)
{
ParcelBuyPassPacket ParcelBuyPass =
(ParcelBuyPassPacket)Packet;
ParcelBuyPass ParcelBuyPassHandler = OnParcelBuyPass;
if (ParcelBuyPassHandler != null)
{
@ -5130,7 +5129,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandleParcelBuyRequest(IClientAPI sender, Packet Pack)
{
ParcelBuyPacket parcel = (ParcelBuyPacket)Pack;
@ -5352,7 +5351,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack;
//m_log.DebugFormat("[CLIENT]: Received ScriptDialogReply from {0}", rdialog.Data.ObjectID);
#region Packet Session and User Check
if (m_checkPackets)
{
@ -5498,12 +5497,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return true;
}
private bool HandleFindAgent(IClientAPI client, Packet Packet)
{
FindAgentPacket FindAgent =
(FindAgentPacket)Packet;
FindAgentUpdate FindAgentHandler = OnFindAgent;
if (FindAgentHandler != null)
{
@ -5512,12 +5511,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandleTrackAgent(IClientAPI client, Packet Packet)
{
TrackAgentPacket TrackAgent =
(TrackAgentPacket)Packet;
TrackAgentUpdate TrackAgentHandler = OnTrackAgent;
if (TrackAgentHandler != null)
{
@ -5528,7 +5527,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandlerRezObject(IClientAPI sender, Packet Pack)
{
RezObjectPacket rezPacket = (RezObjectPacket)Pack;
@ -7184,19 +7183,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
UUID requestID = new UUID(transfer.TransferInfo.Params, 80);
// 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);
if (!(((Scene)m_scene).Permissions.BypassPermissions()))
{
if (taskID != UUID.Zero) // Prim
{
SceneObjectPart part = ((Scene)m_scene).GetSceneObjectPart(taskID);
if (part == null)
{
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);
return true;
}
@ -7205,11 +7204,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (tii == null)
{
m_log.WarnFormat(
"[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item does not exist",
Name, requestID, itemID, taskID);
"[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item does not exist",
Name, requestID, itemID, taskID);
return true;
}
}
if (tii.Type == (int)AssetType.LSLText)
{
if (!((Scene)m_scene).Permissions.CanEditScript(itemID, taskID, AgentId))
@ -7228,41 +7227,41 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
m_log.WarnFormat(
"[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;
}
if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
{
m_log.WarnFormat(
"[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but modify permissions are not set",
Name, requestID, itemID, taskID);
"[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but modify permissions are not set",
Name, requestID, itemID, taskID);
return true;
}
if (tii.OwnerID != AgentId)
{
m_log.WarnFormat(
"[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the item is owned by {4}",
Name, requestID, itemID, taskID, tii.OwnerID);
"[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the item is owned by {4}",
Name, requestID, itemID, taskID, tii.OwnerID);
return true;
}
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))
{
m_log.WarnFormat(
"[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item permissions are not modify/copy/transfer",
Name, requestID, itemID, taskID);
"[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item permissions are not modify/copy/transfer",
Name, requestID, itemID, taskID);
return true;
}
if (tii.AssetID != requestID)
{
m_log.WarnFormat(
"[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but this does not match item's asset {4}",
Name, requestID, itemID, taskID, tii.AssetID);
"[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but this does not match item's asset {4}",
Name, requestID, itemID, taskID, tii.AssetID);
return true;
}
}
@ -7866,7 +7865,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
newTaskItem, updatetask.UpdateData.LocalID);
}
}
}
}
return true;
}
@ -8861,7 +8860,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// return true;
}
private bool HandleRequestRegionInfo(IClientAPI sender, Packet Pack)
{
RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData;
@ -8882,7 +8881,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return true;
}
private bool HandleEstateCovenantRequest(IClientAPI sender, Packet Pack)
{
@ -8919,7 +8918,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return true;
}
private bool HandleGodUpdateRegionInfoUpdate(IClientAPI client, Packet Packet)
{
GodUpdateRegionInfoPacket GodUpdateRegionInfo =
@ -8939,7 +8938,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandleSimWideDeletes(IClientAPI client, Packet Packet)
{
SimWideDeletesPacket SimWideDeletesRequest =
@ -8952,7 +8951,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandleGodlikeMessage(IClientAPI client, Packet Packet)
{
GodlikeMessagePacket GodlikeMessage =
@ -8969,7 +8968,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandleSaveStatePacket(IClientAPI client, Packet Packet)
{
StateSavePacket SaveStateMessage =
@ -8982,7 +8981,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandleGodKickUser(IClientAPI sender, Packet Pack)
{
GodKickUserPacket gkupack = (GodKickUserPacket)Pack;
@ -9120,7 +9119,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return true;
}
#endregion Economy/Transaction Packets
#region Script Packets
@ -9333,7 +9332,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return true;
}
private bool HandleUpdateMuteListEntry(IClientAPI client, Packet Packet)
{
UpdateMuteListEntryPacket UpdateMuteListEntry =
@ -9349,7 +9348,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandleRemoveMuteListEntry(IClientAPI client, Packet Packet)
{
RemoveMuteListEntryPacket RemoveMuteListEntry =
@ -9365,7 +9364,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandleUserReport(IClientAPI client, Packet Packet)
{
UserReportPacket UserReport =
@ -9390,7 +9389,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandleSendPostcard(IClientAPI client, Packet packet)
{
// SendPostcardPacket SendPostcard =
@ -9672,7 +9671,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return true;
}
private bool HandleGroupVoteHistoryRequest(IClientAPI client, Packet Packet)
{
GroupVoteHistoryRequestPacket GroupVoteHistoryRequest =
@ -9685,7 +9684,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandleGroupActiveProposalsRequest(IClientAPI client, Packet Packet)
{
GroupActiveProposalsRequestPacket GroupActiveProposalsRequest =
@ -9698,7 +9697,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandleGroupAccountDetailsRequest(IClientAPI client, Packet Packet)
{
GroupAccountDetailsRequestPacket GroupAccountDetailsRequest =
@ -9711,7 +9710,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandleGroupAccountSummaryRequest(IClientAPI client, Packet Packet)
{
GroupAccountSummaryRequestPacket GroupAccountSummaryRequest =
@ -9724,7 +9723,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandleGroupTransactionsDetailsRequest(IClientAPI client, Packet Packet)
{
GroupAccountTransactionsRequestPacket GroupAccountTransactionsRequest =
@ -9737,7 +9736,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return false;
}
private bool HandleGroupTitlesRequest(IClientAPI sender, Packet Pack)
{
GroupTitlesRequestPacket groupTitlesRequest =
@ -11185,26 +11184,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (m_debugPacketLevel > 0)
{
bool outputPacket = true;
if (m_debugPacketLevel <= 255
if (m_debugPacketLevel <= 255
&& (packet.Type == PacketType.SimStats || packet.Type == PacketType.SimulatorViewerTimeMessage))
outputPacket = false;
if (m_debugPacketLevel <= 200
&&
(packet.Type == PacketType.ImagePacket
if (m_debugPacketLevel <= 200
&& (packet.Type == PacketType.ImagePacket
|| packet.Type == PacketType.ImageData
|| packet.Type == PacketType.LayerData
|| packet.Type == PacketType.CoarseLocationUpdate))
|| packet.Type == PacketType.CoarseLocationUpdate))
outputPacket = false;
if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect))
outputPacket = false;
outputPacket = false;
if (outputPacket)
m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type);
}
m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting);
}
@ -11279,16 +11277,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (m_debugPacketLevel > 0)
{
bool outputPacket = true;
if (m_debugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate)
outputPacket = false;
if (m_debugPacketLevel <= 200 && packet.Type == PacketType.RequestImage)
outputPacket = false;
if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation))
outputPacket = false;
if (outputPacket)
m_log.DebugFormat("[CLIENT]: Packet IN {0}", packet.Type);
}
@ -11551,12 +11549,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
UUID requestID = UUID.Zero;
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);
}
else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem)
else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem)
{
requestID = new UUID(transferRequest.TransferInfo.Params, 80);
source = (byte)SourceType.SimInventoryItem;
@ -11802,7 +11800,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public PacketMethod method;
public bool Async;
}
public class AsyncPacketProcess
{
public bool result = false;
@ -11871,8 +11869,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
dialog.Data.FirstName = Util.StringToBytes256(ownerFirstName);
dialog.Data.LastName = Util.StringToBytes256(ownerLastName);
dialog.Data.Message = Util.StringToBytes256(message);
ScriptDialogPacket.ButtonsBlock[] buttons = new ScriptDialogPacket.ButtonsBlock[1];
buttons[0] = new ScriptDialogPacket.ButtonsBlock();
buttons[0].ButtonLabel = Util.StringToBytes256("!!llTextBox!!");
@ -11886,7 +11883,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
ScenePresence presence = p as ScenePresence;
// 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
// 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.
// 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.
// 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;
public string Name { get { return "Attachments Module"; } }
public Type ReplaceableInterface { get { return null; } }
public string Name { get { return "Attachments Module"; } }
public Type ReplaceableInterface { get { return null; } }
public void Initialise(IConfigSource source) {}
@ -80,7 +80,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachmentsFromInventory;
client.OnObjectAttach += AttachObject;
client.OnObjectDetach += DetachObject;
client.OnDetachAttachmentIntoInv += ShowDetachInUserInventory;
client.OnDetachAttachmentIntoInv += ShowDetachInUserInventory;
}
public void UnsubscribeFromClientEvents(IClientAPI client)
@ -89,7 +89,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachmentsFromInventory;
client.OnObjectAttach -= AttachObject;
client.OnObjectDetach -= DetachObject;
client.OnDetachAttachmentIntoInv -= ShowDetachInUserInventory;
client.OnDetachAttachmentIntoInv -= ShowDetachInUserInventory;
}
/// <summary>
@ -173,12 +173,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
UUID itemID = UUID.Zero;
if (sp != null)
{
foreach(SceneObjectGroup grp in sp.GetAttachments(AttachmentPt))
foreach (SceneObjectGroup grp in sp.GetAttachments(AttachmentPt))
{
itemID = grp.GetFromItemID();
if (itemID != UUID.Zero)
DetachSingleAttachmentToInv(itemID, remoteClient);
}
}
}
if (group.GetFromItemID() == UUID.Zero)
@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
public UUID RezSingleAttachmentFromInventory(
IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus)
{
{
SceneObjectGroup att = RezSingleAttachmentFromInventoryInternal(remoteClient, itemID, AttachmentPt);
if (updateInventoryStatus)
@ -241,8 +241,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (null == att)
return UUID.Zero;
else
return att.UUID;
}
return att.UUID;
}
protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal(
IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
@ -298,7 +298,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
}
return null;
}
}
public UUID SetAttachmentInventoryStatus(
SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
@ -473,7 +473,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
sog.RootPart.IsAttachment = false;
sog.AbsolutePosition = sog.RootPart.AttachedPos;
UpdateKnownItem(client, sog, sog.GetFromItemID(), sog.OwnerID);
sog.SetAttachmentPoint(attachmentPoint);
sog.SetAttachmentPoint(attachmentPoint);
}
/// <summary>
@ -600,7 +600,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
// In case it is later dropped again, don't let
// it get cleaned up
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
{
deadAvatar.ControllingClient.SendAgentAlertMessage(deadAvatarMessage, true);
if(killingAvatar != null)
if (killingAvatar != null)
killingAvatar.ControllingClient.SendAlertMessage("You fragged " + deadAvatar.Firstname + " " + deadAvatar.Lastname);
}
catch (InvalidOperationException)
@ -143,7 +143,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
}
private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
{
{
try
{
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)
{
client.OnGodKickUser += KickUser;
client.OnRequestGodlikePowers += RequestGodlikePowers;
}
client.OnRequestGodlikePowers += RequestGodlikePowers;
}
public void UnsubscribeFromClientEvents(IClientAPI client)
{
client.OnGodKickUser -= KickUser;
client.OnRequestGodlikePowers -= RequestGodlikePowers;
client.OnRequestGodlikePowers -= RequestGodlikePowers;
}
public void RequestGodlikePowers(

View File

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

View File

@ -179,14 +179,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
m_log.DebugFormat(
"[INVENTORY ARCHIVER]: Successfully loaded {0} assets with {1} failures",
successfulAssetRestores, failedAssetRestores);
m_log.InfoFormat("[INVENTORY ARCHIVER]: Successfully loaded {0} items", successfulItemRestores);
m_log.InfoFormat("[INVENTORY ARCHIVER]: Successfully loaded {0} items", successfulItemRestores);
return loadedNodes;
}
finally
{
m_loadStream.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="rootDestinationFolder">The root folder for the inventory load</param>
/// <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
/// </param>
/// <param name="loadedNodes">
@ -246,17 +246,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
/// The root folder for the inventory load
/// </param>
/// <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>
/// <returns>
/// 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.
/// </returns>
/// </returns>
protected InventoryFolderBase ResolveDestinationFolder(
InventoryFolderBase rootDestFolder,
ref string archivePath,
InventoryFolderBase rootDestFolder,
ref string archivePath,
Dictionary <string, InventoryFolderBase> resolvedFolders)
{
{
// string originalArchivePath = archivePath;
while (archivePath.Length > 0)
@ -370,7 +370,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (0 == i)
loadedNodes.Add(destFolder);
}
}
}
/// <summary>

View File

@ -119,7 +119,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids)
{
Exception reportedException = null;
bool succeeded = true;
bool succeeded = true;
try
{
@ -136,7 +136,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
finally
{
m_saveStream.Close();
}
}
m_module.TriggerInventoryArchiveSaved(
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
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);
throw e;
}
@ -283,7 +283,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
"[INVENTORY ARCHIVER]: Found folder {0} {1} at {2}",
inventoryFolder.Name,
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
SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !saveFolderContentsOnly);
@ -301,7 +301,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
//SaveUsers();
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)
{

View File

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

View File

@ -91,12 +91,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
scene.AddCommand(
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 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"
//+ "<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
+ "<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
@ -241,7 +241,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (CheckPresence(userInfo.PrincipalID))
{
InventoryArchiveReadRequest request;
bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
try
{
@ -286,10 +286,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (CheckPresence(userInfo.PrincipalID))
{
InventoryArchiveReadRequest request;
bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
try
{
{
request = new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadPath, merge);
}
catch (EntryPointNotFoundException e)
@ -325,20 +325,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
protected void HandleLoadInvConsoleCommand(string module, string[] cmdparams)
{
try
{
m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME.");
Dictionary<string, object> options = new Dictionary<string, object>();
{
m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME.");
Dictionary<string, object> options = new Dictionary<string, object>();
OptionSet optionSet = new OptionSet().Add("m|merge", delegate (string v) { options["merge"] = v != null; });
List<string> mainParams = optionSet.Parse(cmdparams);
if (mainParams.Count < 6)
{
m_log.Error(
"[INVENTORY ARCHIVER]: usage is load iar [--merge] <first name> <last name> <inventory path> <user password> [<load file path>]");
return;
}
}
string firstName = mainParams[2];
string lastName = mainParams[3];
@ -353,7 +353,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (DearchiveInventory(firstName, lastName, invPath, pass, loadPath, options))
m_log.InfoFormat(
"[INVENTORY ARCHIVER]: Loaded archive {0} for {1} {2}",
loadPath, firstName, lastName);
loadPath, firstName, lastName);
}
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}",
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)
{
@ -398,7 +398,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
}
lock (m_pendingConsoleSaves)
m_pendingConsoleSaves.Add(id);
m_pendingConsoleSaves.Add(id);
}
private void SaveInvConsoleCommandCompleted(

View File

@ -58,18 +58,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
/// <summary>
/// Stream of data representing a common IAR that can be reused in load tests.
/// </summary>
protected MemoryStream m_iarStream;
protected MemoryStream m_iarStream;
protected UserAccount m_ua1
= new UserAccount {
PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"),
FirstName = "Mr",
LastName = "Tiddles" };
LastName = "Tiddles" };
protected UserAccount m_ua2
= new UserAccount {
PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"),
FirstName = "Lord",
LastName = "Lucan" };
LastName = "Lucan" };
string m_item1Name = "b.lsl";
private void SaveCompleted(
@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
}
protected void ConstructDefaultIarForTestLoad()
{
{
string archiveItemName = InventoryArchiveWriteRequest.CreateArchiveItemName(m_item1Name, UUID.Random());
MemoryStream archiveWriteStream = new MemoryStream();
@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
string item1FileName
= string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, archiveItemName);
tar.WriteFile(item1FileName, UserInventoryItemSerializer.Serialize(item1));
tar.Close();
tar.Close();
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");
// TODO: Test presence of more files and contents of files.
}
}
/// <summary>
/// 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]
public void TestLoadIarPathStartsWithSlash()
{
TestHelper.InMethod();
TestHelper.InMethod();
// log4net.Config.XmlConfigurator.Configure();
SerialiserModule serialiserModule = new SerialiserModule();
InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
Scene scene = SceneSetupHelpers.SetupScene("inventory");
InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
Scene scene = SceneSetupHelpers.SetupScene("inventory");
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);
InventoryItemBase foundItem1
= InventoryArchiveUtils.FindItemByPath(
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>
@ -376,7 +376,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
[Test]
public void TestLoadIarV0_1ExistingUsers()
{
TestHelper.InMethod();
TestHelper.InMethod();
//log4net.Config.XmlConfigurator.Configure();
SerialiserModule serialiserModule = new SerialiserModule();
@ -386,9 +386,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
Scene scene = SceneSetupHelpers.SetupScene("inventory");
SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "meowfood");
UserProfileTestUtils.CreateUserWithInventory(scene, m_ua2, "hampshire");
UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "meowfood");
UserProfileTestUtils.CreateUserWithInventory(scene, m_ua2, "hampshire");
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 userLastName = "Stirrup";
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
SceneObjectGroup object1;
@ -524,7 +524,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
[Test]
public void TestLoadIarV0_1AbsentUsers()
{
TestHelper.InMethod();
TestHelper.InMethod();
//log4net.Config.XmlConfigurator.Configure();
string userFirstName = "Charlie";
@ -562,7 +562,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
Scene scene = SceneSetupHelpers.SetupScene("inventory");
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);
@ -680,8 +680,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
string folder2aArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2aName, UUID.Random());
string folder2bArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2bName, UUID.Random());
string iarPath1 = string.Join("", new string[] { folder1ArchiveName, folder2aArchiveName });
string iarPath2 = string.Join("", new string[] { folder1ArchiveName, folder2bArchiveName });
string iarPath1 = string.Join("", new string[] { folder1ArchiveName, folder2aArchiveName });
string iarPath2 = string.Join("", new string[] { folder1ArchiveName, folder2bArchiveName });
{
// Test replication of path1
@ -694,7 +694,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
= InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, folder1Name);
Assert.That(folder1Candidates.Count, Is.EqualTo(1));
InventoryFolderBase folder1 = folder1Candidates[0];
InventoryFolderBase folder1 = folder1Candidates[0];
List<InventoryFolderBase> folder2aCandidates
= InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName);
Assert.That(folder2aCandidates.Count, Is.EqualTo(1));
@ -715,11 +715,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
List<InventoryFolderBase> folder2aCandidates
= InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName);
Assert.That(folder2aCandidates.Count, Is.EqualTo(1));
Assert.That(folder2aCandidates.Count, Is.EqualTo(1));
List<InventoryFolderBase> folder2bCandidates
= 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
= UserInventoryTestUtils.CreateInventoryFolder(
scene.InventoryService, ua1.PrincipalID, folder1ExistingName);
scene.InventoryService, ua1.PrincipalID, folder1ExistingName);
string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random());
string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random());
@ -772,7 +772,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
List<InventoryFolderBase> folder2PostCandidates
= InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1Post, "b");
Assert.That(folder2PostCandidates.Count, Is.EqualTo(1));
}
}
/// <summary>
/// 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
= UserInventoryTestUtils.CreateInventoryFolder(
scene.InventoryService, ua1.PrincipalID, folder1ExistingName);
scene.InventoryService, ua1.PrincipalID, folder1ExistingName);
string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random());
string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random());
@ -812,6 +812,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
List<InventoryFolderBase> folder2PostCandidates
= InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1PostCandidates[0], "b");
Assert.That(folder2PostCandidates.Count, Is.EqualTo(1));
}
}
}
}

View File

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

View File

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

View File

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

View File

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

View File

@ -185,7 +185,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
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;
}

View File

@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
{
// m_log.DebugFormat(
// "[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);
}

View File

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

View File

@ -33,7 +33,7 @@ using OpenSim.Framework.Serialization;
using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.CoreModules.World.Archiver
{
{
/// <summary>
/// Helper methods for archive manipulation
/// </summary>
@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
public static string CreateObjectFilename(SceneObjectGroup sog)
{
return ArchiveConstants.CreateOarObjectFilename(sog.Name, sog.UUID, sog.AbsolutePosition);
}
}
/// <summary>
/// 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)
{
return ArchiveConstants.CreateOarObjectPath(sog.Name, sog.UUID, sog.AbsolutePosition);
}
}
/// <summary>
/// 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, 1000000);
}
}
}
}

View File

@ -72,12 +72,12 @@ namespace OpenSim.Region.CoreModules.World.Land
#pragma warning restore 0429
/// <value>
/// Local land ids at specified region co-ordinates (region size / 4)
/// Local land ids at specified region co-ordinates (region size / 4)
/// </value>
private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax];
/// <value>
/// Land objects keyed by local id
/// Land objects keyed by local id
/// </value>
private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>();
@ -92,8 +92,8 @@ namespace OpenSim.Region.CoreModules.World.Land
#region INonSharedRegionModule Members
public Type ReplaceableInterface
{
public Type ReplaceableInterface
{
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));
forcedPosition = null;
}
//if we are far away, teleport
//if we are far away, teleport
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));
@ -321,8 +321,6 @@ namespace OpenSim.Region.CoreModules.World.Land
}
}
private void ForceAvatarToPosition(ScenePresence avatar, Vector3? position)
{
if (m_scene.Permissions.IsGod(avatar.UUID)) return;
@ -336,7 +334,6 @@ namespace OpenSim.Region.CoreModules.World.Land
{
avatar.ControllingClient.SendAlertMessage(
"You are not allowed on this parcel because the land owner has restricted access.");
}
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 &&
clientAvatar.sentMessageAboutRestrictedParcelFlyingDown)
{
EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID,
EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID,
m_scene.RegionInfo.RegionID);
//They are going under the safety line!
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)
return null;
try
{
x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0));
@ -667,7 +664,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{
return null;
}
lock (m_landList)
{
// 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
throw new Exception("Error: Parcel not found at point " + x + ", " + y);
}
lock (m_landIDList)
{
try
@ -741,7 +738,6 @@ namespace OpenSim.Region.CoreModules.World.Land
public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj)
{
lock (m_landList)
{
foreach (LandObject p in m_landList.Values)
@ -936,7 +932,7 @@ namespace OpenSim.Region.CoreModules.World.Land
return;
}
}
lock (m_landList)
{
foreach (ILandObject slaveLandObject in selectedLandObjects)
@ -1078,7 +1074,6 @@ namespace OpenSim.Region.CoreModules.World.Land
temp.Add(currentParcel);
}
}
}
}
@ -1121,7 +1116,7 @@ namespace OpenSim.Region.CoreModules.World.Land
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)
{
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);
}));
UUID parcelCapID = UUID.Random();
caps.RegisterHandler("ParcelPropertiesUpdate",
new RestStreamHandler("POST", "/CAPS/" + parcelCapID,
delegate(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
return ProcessPropertiesUpdate(request, path, param, agentID, caps);
}));
UUID parcelCapID = UUID.Random();
caps.RegisterHandler("ParcelPropertiesUpdate",
new RestStreamHandler("POST", "/CAPS/" + parcelCapID,
delegate(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
return ProcessPropertiesUpdate(request, path, param, agentID, caps);
}));
}
private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps)
{
IClientAPI client;
if ( ! m_scene.TryGetClient(agentID, out client) ) {
m_log.WarnFormat("[LAND] unable to retrieve IClientAPI for {0}", agentID.ToString() );
return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty());
}
ParcelPropertiesUpdateMessage properties = new ParcelPropertiesUpdateMessage();
OpenMetaverse.StructuredData.OSDMap args = (OpenMetaverse.StructuredData.OSDMap) OSDParser.DeserializeLLSDXml(request);
private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps)
{
IClientAPI client;
if (! m_scene.TryGetClient(agentID, out client)) {
m_log.WarnFormat("[LAND] unable to retrieve IClientAPI for {0}", agentID.ToString());
return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty());
}
properties.Deserialize(args);
LandUpdateArgs land_update = new LandUpdateArgs();
int parcelID = properties.LocalID;
land_update.AuthBuyerID = properties.AuthBuyerID;
ParcelPropertiesUpdateMessage properties = new ParcelPropertiesUpdateMessage();
OpenMetaverse.StructuredData.OSDMap args = (OpenMetaverse.StructuredData.OSDMap) OSDParser.DeserializeLLSDXml(request);
properties.Deserialize(args);
LandUpdateArgs land_update = new LandUpdateArgs();
int parcelID = properties.LocalID;
land_update.AuthBuyerID = properties.AuthBuyerID;
land_update.Category = properties.Category;
land_update.Desc = properties.Desc;
land_update.GroupID = properties.GroupID;
@ -1399,15 +1394,15 @@ namespace OpenSim.Region.CoreModules.World.Land
land_update.SnapshotID = properties.SnapshotID;
land_update.UserLocation = properties.UserLocation;
land_update.UserLookAt = properties.UserLookAt;
land_update.MediaDescription = properties.MediaDesc;
land_update.MediaType = properties.MediaType;
land_update.MediaWidth = properties.MediaWidth;
land_update.MediaHeight = properties.MediaHeight;
land_update.MediaLoop = properties.MediaLoop;
land_update.ObscureMusic = properties.ObscureMusic;
land_update.ObscureMedia = properties.ObscureMedia;
ILandObject land;
land_update.MediaDescription = properties.MediaDesc;
land_update.MediaType = properties.MediaType;
land_update.MediaWidth = properties.MediaWidth;
land_update.MediaHeight = properties.MediaHeight;
land_update.MediaLoop = properties.MediaLoop;
land_update.ObscureMusic = properties.ObscureMusic;
land_update.ObscureMedia = properties.ObscureMedia;
ILandObject land;
lock (m_landList)
{
m_landList.TryGetValue(parcelID, out land);
@ -1415,15 +1410,15 @@ namespace OpenSim.Region.CoreModules.World.Land
if (land != null)
{
land.UpdateLandProperties(land_update, client);
land.UpdateLandProperties(land_update, client);
m_scene.EventManager.TriggerOnParcelPropertiesUpdateRequest(land_update, parcelID, client);
}
}
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());
}
}
// 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.
// 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)
return;
ExtendedLandData data =
(ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(),
delegate(string id)
ExtendedLandData data =
(ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(),
delegate(string id)
{
UUID parcel = UUID.Zero;
UUID.TryParse(id, out parcel);
// assume we've got the parcelID we just computed in RemoteParcelRequest
ExtendedLandData extLandData = new ExtendedLandData();
Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle,
Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle,
out extLandData.X, out extLandData.Y);
m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}",
extLandData.RegionHandle, extLandData.X, extLandData.Y);
// for this region or for somewhere else?
if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle)
{

View File

@ -229,13 +229,13 @@ namespace OpenSim.Region.CoreModules.World.Land
newData.SnapshotID = args.SnapshotID;
newData.UserLocation = args.UserLocation;
newData.UserLookAt = args.UserLookAt;
newData.MediaType = args.MediaType;
newData.MediaDescription = args.MediaDescription;
newData.MediaWidth = args.MediaWidth;
newData.MediaHeight = args.MediaHeight;
newData.MediaLoop = args.MediaLoop;
newData.ObscureMusic = args.ObscureMusic;
newData.ObscureMedia = args.ObscureMedia;
newData.MediaType = args.MediaType;
newData.MediaDescription = args.MediaDescription;
newData.MediaWidth = args.MediaWidth;
newData.MediaHeight = args.MediaHeight;
newData.MediaLoop = args.MediaLoop;
newData.ObscureMusic = args.ObscureMusic;
newData.ObscureMedia = args.ObscureMedia;
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")]
public class MoapModule : INonSharedRegionModule, IMoapModule
{
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string Name { get { return "MoapModule"; } }
public Type ReplaceableInterface { get { return null; } }
public string Name { get { return "MoapModule"; } }
public Type ReplaceableInterface { get { return null; } }
/// <summary>
/// Is this module enabled?
@ -78,17 +78,17 @@ namespace OpenSim.Region.CoreModules.Media.Moap
/// <summary>
/// Track the ObjectMedia capabilities given to users keyed by agent. Lock m_omCapUsers to manipulate.
/// </summary>
protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>();
protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>();
/// <summary>
/// Track the ObjectMediaUpdate capabilities given to users keyed by path
/// </summary>
/// </summary>
protected Dictionary<string, UUID> m_omuCapUsers = new Dictionary<string, UUID>();
/// <summary>
/// Track the ObjectMediaUpdate capabilities given to users keyed by agent. Lock m_omuCapUsers to manipulate
/// </summary>
protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>();
/// </summary>
protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>();
public void Initialise(IConfigSource configSource)
{
@ -129,7 +129,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps;
m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps;
m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy;
}
}
public void OnRegisterCaps(UUID agentID, Caps caps)
{
@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
caps.RegisterHandler(
"ObjectMediaNavigate", new RestStreamHandler("POST", omuCapUrl, HandleObjectMediaNavigateMessage));
}
}
}
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)
{
{
if (original.Shape.Media != null)
{
PrimitiveBaseShape.MediaList dupeMedia = new PrimitiveBaseShape.MediaList();
@ -195,7 +195,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
}
copy.Shape.Media = dupeMedia;
}
}
}
public MediaEntry GetMediaEntry(SceneObjectPart part, int face)
@ -211,9 +211,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap
me = null;
}
else
{
{
lock (media)
me = media[face];
me = media[face];
// TODO: Really need a proper copy constructor down in libopenmetaverse
if (me != null)
@ -227,17 +227,17 @@ namespace OpenSim.Region.CoreModules.Media.Moap
public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me)
{
CheckFaceParam(part, face);
CheckFaceParam(part, face);
if (null == part.Shape.Media)
part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]);
lock (part.Shape.Media)
lock (part.Shape.Media)
part.Shape.Media[face] = me;
UpdateMediaUrl(part, UUID.Zero);
UpdateMediaUrl(part, UUID.Zero);
part.ScheduleFullUpdate();
part.TriggerScriptChangedEvent(Changed.MEDIA);
part.TriggerScriptChangedEvent(Changed.MEDIA);
}
public void ClearMediaEntry(SceneObjectPart part, int face)
@ -256,7 +256,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
/// <returns></returns>
protected string HandleObjectMediaMessage(
string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
{
// m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request);
OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request);
@ -266,12 +266,12 @@ namespace OpenSim.Region.CoreModules.Media.Moap
if (omm.Request is ObjectMediaRequest)
return HandleObjectMediaRequest(omm.Request as ObjectMediaRequest);
else if (omm.Request is ObjectMediaUpdate)
return HandleObjectMediaUpdate(path, omm.Request as ObjectMediaUpdate);
return HandleObjectMediaUpdate(path, omm.Request as ObjectMediaUpdate);
throw new Exception(
string.Format(
"[MOAP]: ObjectMediaMessage has unrecognized ObjectMediaBlock of {0}",
omm.Request.GetType()));
omm.Request.GetType()));
}
/// <summary>
@ -279,7 +279,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
/// </summary>
/// <param name="omr"></param>
/// <returns></returns>
protected string HandleObjectMediaRequest(ObjectMediaRequest omr)
protected string HandleObjectMediaRequest(ObjectMediaRequest omr)
{
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="omu">/param>
/// <returns></returns>
protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu)
protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu)
{
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}",
primId, m_scene.RegionInfo.RegionName);
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++)
// {
@ -374,14 +374,14 @@ namespace OpenSim.Region.CoreModules.Media.Moap
part.Shape.Textures = te;
// m_log.DebugFormat(
// "[MOAP]: Media flags for face {0} is {1}",
// i, part.Shape.Textures.FaceTextures[i].MediaFlags);
// i, part.Shape.Textures.FaceTextures[i].MediaFlags);
}
}
}
else
{
{
// 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
// overwritten. Unfortunately, PrimitiveBaseShape does not allow us to change texture entry
@ -391,18 +391,18 @@ namespace OpenSim.Region.CoreModules.Media.Moap
lock (media)
{
for (int i = 0; i < media.Count; i++)
{
{
if (m_scene.Permissions.CanControlPrimMedia(agentId, part.UUID, i))
{
{
media[i] = omu.FaceMedia[i];
// 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.
if (null == media[i])
continue;
continue;
Primitive.TextureEntryFace face = te.CreateFace((uint)i);
face.MediaFlags = true;
face.MediaFlags = true;
// m_log.DebugFormat(
// "[MOAP]: Media flags for face {0} is {1}",
@ -414,11 +414,11 @@ namespace OpenSim.Region.CoreModules.Media.Moap
part.Shape.Textures = te;
// 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]);
// 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]);
}
UpdateMediaUrl(part, agentId);
UpdateMediaUrl(part, agentId);
// Arguably, we could avoid sending a full update to the avatar that just changed the texture.
part.ScheduleFullUpdate();
@ -439,16 +439,16 @@ namespace OpenSim.Region.CoreModules.Media.Moap
/// <returns></returns>
protected string HandleObjectMediaNavigateMessage(
string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
{
// m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request);
OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request);
ObjectMediaNavigateMessage omn = new ObjectMediaNavigateMessage();
omn.Deserialize(osd);
omn.Deserialize(osd);
UUID primId = omn.PrimID;
SceneObjectPart part = m_scene.GetSceneObjectPart(primId);
SceneObjectPart part = m_scene.GetSceneObjectPart(primId);
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}",
primId, m_scene.RegionInfo.RegionName);
return string.Empty;
}
}
UUID agentId = default(UUID);
lock (m_omuCapUsers)
agentId = m_omuCapUsers[path];
agentId = m_omuCapUsers[path];
if (!m_scene.Permissions.CanInteractWithPrimMedia(agentId, part.UUID, omn.Face))
return string.Empty;
@ -484,7 +484,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
return string.Empty;
if (me.EnableWhiteList)
{
{
if (!CheckUrlAgainstWhitelist(omn.URL, me.WhiteList))
{
// m_log.DebugFormat(
@ -493,18 +493,18 @@ namespace OpenSim.Region.CoreModules.Media.Moap
return string.Empty;
}
}
}
me.CurrentURL = omn.URL;
UpdateMediaUrl(part, agentId);
part.ScheduleFullUpdate();
part.ScheduleFullUpdate();
part.TriggerScriptChangedEvent(Changed.MEDIA);
return OSDParser.SerializeLLSDXmlString(new OSD());
}
}
/// <summary>
/// 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;
if (face > maxFaces)
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>
@ -542,9 +542,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap
string rawVersion = part.MediaUrl.Substring(5, 10);
int version = int.Parse(rawVersion);
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>
@ -554,7 +554,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
/// <param name="whitelist"></param>
/// <returns>true if the url matches an entry on the whitelist, false otherwise</returns>
protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist)
{
{
Uri url = new Uri(rawUrl);
foreach (string origWlUrl in whitelist)
@ -575,7 +575,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
if (url.Host.Contains(wlUrl))
{
// m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl);
return true;
return true;
}
}
else
@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
return true;
}
}
}
}
return false;
}

View File

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

View File

@ -397,13 +397,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
m_groupsModule = m_scene.RequestModuleInterface<IGroupsModule>();
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>();
// This log line will be commented out when no longer required for debugging
// 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()
@ -1906,7 +1906,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
}
private bool CanControlPrimMedia(UUID agentID, UUID primID, int face)
{
{
// m_log.DebugFormat(
// "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}",
// agentID, primID, face);
@ -1918,7 +1918,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
if (null == part)
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 (null == me)
@ -1929,7 +1929,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
// agentID, primID, face, me.ControlPermissions);
return GenericPrimMediaPermission(part, agentID, me.ControlPermissions);
}
}
private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face)
{
@ -1952,15 +1952,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions
// m_log.DebugFormat(
// "[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);
}
}
private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms)
{
// if (IsAdministrator(agentID))
// return true;
// return true;
if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone)
return true;
@ -1969,15 +1969,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions
{
if (agentID == part.OwnerID)
return true;
}
}
if ((perms & MediaPermission.Group) == MediaPermission.Group)
{
if (IsGroupMember(part.GroupID, agentID, 0))
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);
client.SendLayerData(patchX, patchY, m_scene.Heightmap.GetFloatsSerialised());
}
}
private void StoreUndoState()
{

View File

@ -425,7 +425,7 @@ namespace OpenSim.Region.CoreModules
{
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
// 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;
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;
lock (mapdot.Children)
partList = new List<SceneObjectPart>(mapdot.Children.Values);

View File

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

View File

@ -55,7 +55,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="rot"></param>
/// <param name="attachPos"></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(
IClientAPI remoteClient, SceneObjectGroup grp, uint AttachmentPt, bool silent);

View File

@ -65,7 +65,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// Get a group
/// </summary>
/// <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);
void ActivateGroup(IClientAPI remoteClient, UUID groupID);
@ -74,14 +74,14 @@ namespace OpenSim.Region.Framework.Interfaces
List<GroupRolesData> GroupRoleDataRequest(IClientAPI remoteClient, UUID groupID);
List<GroupRoleMembersData> GroupRoleMembersRequest(IClientAPI remoteClient, UUID groupID);
GroupProfileData GroupProfileRequest(IClientAPI remoteClient, UUID groupID);
GroupMembershipData[] GetMembershipData(UUID UserID);
GroupMembershipData[] GetMembershipData(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 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);
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>
public delegate void InventoryArchiveSaved(
Guid id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, Exception reportedException);
public interface IInventoryArchiverModule
{
/// <summary>
/// Fired when an archive inventory save has been completed.
/// </summary>
event InventoryArchiveSaved OnInventoryArchiveSaved;
/// <summary>
/// Dearchive a user's inventory folder from the given stream
/// </summary>
@ -60,7 +60,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <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>
bool DearchiveInventory(string firstName, string lastName, string invPath, string pass, Stream loadStream);
/// <summary>
/// Dearchive a user's inventory folder from the given stream
/// </summary>
@ -72,8 +72,8 @@ namespace OpenSim.Region.Framework.Interfaces
/// the loaded IAR with existing folders where possible.</param>
/// <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,
Dictionary<string, object> options);
string firstName, string lastName, string invPath, string pass, Stream loadStream,
Dictionary<string, object> options);
/// <summary>
/// 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>
/// <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);
/// <summary>
/// Archive a user's inventory folder to the given stream
/// </summary>
@ -97,7 +97,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="options">Archiving options. Currently, there are none.</param>
/// <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,
Dictionary<string, object> options);
Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream,
Dictionary<string, object> options);
}
}

View File

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

View File

@ -31,7 +31,7 @@ namespace OpenSim.Region.Framework.Interfaces
{
/// <summary>
/// Generate a map tile for the scene. a terrain texture for this scene
/// </summary>
/// </summary>
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
/// 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 event Attach OnAttach;
public event Attach OnAttach;
/// <summary>
/// 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.
/// </summary>
/// <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.
/// </param>
/// <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 RegionUp(GridRegion region);
public event RegionUp OnRegionUp;
public event RegionUp OnRegionUp;
public class MoneyTransferArgs : EventArgs
{
@ -2063,7 +2063,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
}
}
public void TriggerOnSceneObjectPreSave(SceneObjectGroup persistingSo, SceneObjectGroup originalSo)
{
@ -2105,7 +2105,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
}
}
public void TriggerOnParcelPropertiesUpdateRequest(LandUpdateArgs args,
int local_id, IClientAPI remote_client)
@ -2127,6 +2127,6 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
}
}
}
}

View File

@ -1,3 +1,30 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using log4net;
@ -35,7 +62,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary>
/// 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
/// 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.
@ -123,9 +150,9 @@ namespace OpenSim.Region.Framework.Scenes
if (entity is SceneObjectPart)
{
// 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 = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition;
entityPos = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition;
}
else
{
@ -150,11 +177,11 @@ namespace OpenSim.Region.Framework.Scenes
// Use group position for child prims
Vector3 entityPos = entity.AbsolutePosition;
if (entity is SceneObjectPart)
{
{
// Can't use Scene.GetGroupByPrim() here, since the entity may have been delete from the scene
// before its scheduled update was triggered
//entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition;
entityPos = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition;
entityPos = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition;
}
else
{

View File

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

View File

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

View File

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

View File

@ -1952,7 +1952,7 @@ namespace OpenSim.Region.Framework.Scenes
sceneObject.ScheduleGroupForFullUpdate();
return sceneObject;
}
}
/// <summary>
/// Add an object into the scene that has come from storage
@ -2045,7 +2045,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <returns></returns>
public bool AddNewSceneObject(
SceneObjectGroup sceneObject, bool attachToBackup, Vector3 pos, Quaternion rot, Vector3 vel)
{
{
return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, pos, rot, vel);
}
@ -2430,7 +2430,7 @@ namespace OpenSim.Region.Framework.Scenes
ScenePresence sp = GetScenePresence(userID);
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);
}
@ -2473,7 +2473,7 @@ namespace OpenSim.Region.Framework.Scenes
sceneObject.RootPart.AddFlag(PrimFlags.Phantom);
// 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);
// Handle attachment special case
@ -2717,7 +2717,7 @@ namespace OpenSim.Region.Framework.Scenes
}
public virtual void SubscribeToClientPrimEvents(IClientAPI client)
{
{
client.OnUpdatePrimGroupPosition += m_sceneGraph.UpdatePrimPosition;
client.OnUpdatePrimSinglePosition += m_sceneGraph.UpdatePrimSinglePosition;
client.OnUpdatePrimGroupRotation += m_sceneGraph.UpdatePrimRotation;
@ -2753,7 +2753,7 @@ namespace OpenSim.Region.Framework.Scenes
client.OnUndo += m_sceneGraph.HandleUndo;
client.OnRedo += m_sceneGraph.HandleRedo;
client.OnObjectDescription += m_sceneGraph.PrimDescription;
client.OnObjectDrop += m_sceneGraph.DropObject;
client.OnObjectDrop += m_sceneGraph.DropObject;
client.OnObjectIncludeInSearch += m_sceneGraph.MakeObjectSearchable;
client.OnObjectOwner += ObjectOwner;
}
@ -3705,7 +3705,7 @@ namespace OpenSim.Region.Framework.Scenes
public virtual void AgentCrossing(UUID agentID, Vector3 position, bool isFlying)
{
ScenePresence presence = GetScenePresence(agentID);
if(presence != null)
if (presence != null)
{
try
{

View File

@ -521,7 +521,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="shorthelp"></param>
/// <param name="longhelp"></param>
/// <param name="descriptivehelp"></param>
/// <param name="callback"></param>
/// <param name="callback"></param>
public void AddCommand(
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="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>
/// <returns></returns>
/// <returns></returns>
public bool AddNewSceneObject(
SceneObjectGroup sceneObject, bool attachToBackup, Vector3 pos, Quaternion rot, Vector3 vel)
{
@ -322,7 +322,7 @@ namespace OpenSim.Region.Framework.Scenes
}
return true;
}
}
/// <summary>
/// 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);
if (group != null)
{
{
if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0))
{
if (m_parentScene.AttachmentsModule != null)

View File

@ -677,7 +677,7 @@ namespace OpenSim.Region.Framework.Scenes
minY = 256f;
minZ = 8192f;
lock(m_parts)
lock (m_parts)
{
foreach (SceneObjectPart part in m_parts.Values)
{
@ -1005,7 +1005,7 @@ namespace OpenSim.Region.Framework.Scenes
AbsolutePosition = detachedpos;
m_rootPart.AttachedAvatar = UUID.Zero;
//Anakin Lohner bug #3839
//Anakin Lohner bug #3839
lock (m_parts)
{
foreach (SceneObjectPart p in m_parts.Values)
@ -1226,7 +1226,7 @@ namespace OpenSim.Region.Framework.Scenes
}
/// <summary>
/// Delete this group from its scene.
/// Delete this group from its scene.
/// </summary>
///
/// 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)
{
// 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;
}
@ -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
// any exception propogate upwards.
// any exception propogate upwards.
try
{
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;
}
// Need to duplicate the physics actor as well
// Need to duplicate the physics actor as well
if (part.PhysActor != null && userExposed)
{
PrimitiveBaseShape pbs = part.Shape;
@ -1562,7 +1562,7 @@ namespace OpenSim.Region.Framework.Scenes
part.PhysActor.LocalID = part.LocalId;
part.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true);
}
}
}
if (userExposed)
@ -1838,7 +1838,7 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectPart newPart = null;
lock (m_parts)
{
{
newPart = part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_parts.Count, userExposed);
newPart.SetParent(this);
m_parts.Add(newPart.UUID, newPart);
@ -2337,7 +2337,7 @@ namespace OpenSim.Region.Framework.Scenes
if (p.LinkNum > linkPart.LinkNum)
p.LinkNum--;
}
}
}
}
linkPart.ParentID = 0;

View File

@ -1010,12 +1010,12 @@ namespace OpenSim.Region.Framework.Scenes
return m_mediaUrl;
}
set
{
set
{
m_mediaUrl = value;
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_createSelected = value;
}
}
}
#endregion
@ -1189,7 +1189,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary>
/// Property flags. See OpenMetaverse.PrimFlags
/// </summary>
/// </summary>
/// Example properties are PrimFlags.Phantom and PrimFlags.DieAtEdge
public PrimFlags Flags
{
@ -1355,7 +1355,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary>
/// Tell the scene presence that it should send updates for this part to its client
/// </summary>
/// </summary>
public void AddFullUpdateToAvatar(ScenePresence presence)
{
presence.SceneViewer.QueuePartForUpdate(this);
@ -1414,7 +1414,7 @@ namespace OpenSim.Region.Framework.Scenes
m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp)
{
if(!sp.IsChildAgent)
if (!sp.IsChildAgent)
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);
return dupe;
return dupe;
}
protected void AssetReceived(string id, Object sender, AssetBase asset)
@ -1969,10 +1969,10 @@ namespace OpenSim.Region.Framework.Scenes
}
public uint GetEffectiveObjectFlags()
{
{
// Commenting this section of code out since it doesn't actually do anything, as enums are handled by
// value rather than reference
// PrimFlags f = _flags;
// PrimFlags f = _flags;
// if (m_parentGroup == null || m_parentGroup.RootPart == this)
// f &= ~(PrimFlags.Touch | PrimFlags.Money);
@ -4733,7 +4733,7 @@ namespace OpenSim.Region.Framework.Scenes
if (ParentGroup == null || ParentGroup.IsDeleted)
return;
if (IsAttachment && ParentGroup.RootPart != this)
if (IsAttachment && ParentGroup.RootPart != this)
return;
// Causes this thread to dig into the Client Thread Data.

View File

@ -1094,7 +1094,7 @@ namespace OpenSim.Region.Framework.Scenes
item.OwnerChanged = false;
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
// to use. Or we could add a m_isSitting variable.
//Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
SitGround = true;
SitGround = true;
}
// 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>();
lock(m_pendingObjects)
lock (m_pendingObjects)
{
EntityBase[] entities = m_presence.Scene.Entities.GetEntities();
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)
{

View File

@ -71,7 +71,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Assert.That(dupeSo.Children.Count, Is.EqualTo(2));
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(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(dupePart2.PhysActor, Is.Not.Null);
*/
}
}
}
}

View File

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

View File

@ -59,8 +59,8 @@ namespace OpenSim.Region.Framework.Tests
string userFirstName = "Jock";
string userLastName = "Stirrup";
string userPassword = "troll";
UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020");
return UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, userPassword);
UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020");
return UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, userPassword);
}
protected SceneObjectGroup CreateSO1(Scene scene, UUID ownerId)
@ -70,7 +70,7 @@ namespace OpenSim.Region.Framework.Tests
SceneObjectPart part1
= new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
{ Name = part1Name, UUID = part1Id };
return new SceneObjectGroup(part1);
return new SceneObjectGroup(part1);
}
protected TaskInventoryItem CreateSOItem1(Scene scene, SceneObjectPart part)
@ -79,7 +79,7 @@ namespace OpenSim.Region.Framework.Tests
nc.BodyText = "Hello World!";
nc.Encode();
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
= AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero);
scene.AssetService.Store(ncAsset);
@ -114,9 +114,9 @@ namespace OpenSim.Region.Framework.Tests
scene.MoveTaskInventoryItem(user1.PrincipalID, folder.ID, sop1, sopItem1.ItemID);
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");
}
}
/// <summary>
/// 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);
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");
}
}

View File

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

View File

@ -91,11 +91,11 @@ using OpenSim.Services.Interfaces;
* + RoleID
*
* GroupID -> GroupNotice -> NoticeID
* + TimeStamp [uint]
* + FromName [string]
* + Subject [string]
* + Message [string]
* + BinaryBucket [byte[]]
* + TimeStamp [uint]
* + FromName [string]
* + Subject [string]
* + Message [string]
* + BinaryBucket [byte[]]
*
* */
@ -309,7 +309,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
GroupInfoMap["OwnerRoleID"] = OSD.FromUUID(OwnerRoleID);
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, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers);
@ -334,7 +334,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
string GroupName;
OSDMap GroupInfoMap;
if( SimianGetFirstGenericEntry(groupID, "GroupInfo", out GroupName, out GroupInfoMap) )
if (SimianGetFirstGenericEntry(groupID, "GroupInfo", out GroupName, out GroupInfoMap))
{
GroupInfoMap["Charter"] = OSD.FromString(charter);
GroupInfoMap["ShowInList"] = OSD.FromBoolean(showInList);
@ -379,7 +379,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
string GroupRoleMemberType = "GroupRole" + groupID.ToString();
if (SimianGetGenericEntries(GroupRoleMemberType, roleID.ToString(), out GroupRoleMembers))
{
foreach(UUID UserID in GroupRoleMembers.Keys)
foreach (UUID UserID in GroupRoleMembers.Keys)
{
EnsureRoleNotSelectedByMember(groupID, roleID, UserID);
@ -724,7 +724,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
}
OSDMap UserGroupMemberInfo;
if( SimianGetGenericEntry(agentID, "GroupMember", groupID.ToString(), out UserGroupMemberInfo) )
if (SimianGetGenericEntry(agentID, "GroupMember", groupID.ToString(), out UserGroupMemberInfo))
{
data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean();
data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger();
@ -736,7 +736,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
//
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.GroupPowers = GroupRoleInfo["Powers"].AsULong();
@ -748,7 +748,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
//
OSDMap GroupInfo;
string GroupName;
if( SimianGetFirstGenericEntry(groupID, "Group", out GroupName, out GroupInfo) )
if (SimianGetFirstGenericEntry(groupID, "Group", out GroupName, out GroupInfo))
{
data.GroupID = groupID;
data.AllowPublish = GroupInfo["AllowPublish"].AsBoolean();
@ -928,12 +928,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
Dictionary<string, OSDMap> 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;
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();
@ -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());
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");
}
@ -1352,17 +1352,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
}
// Check if this is an update or a request
if ( requestArgs["RequestMethod"] == "RemoveGeneric"
|| requestArgs["RequestMethod"] == "AddGeneric"
)
if (requestArgs["RequestMethod"] == "RemoveGeneric"
|| requestArgs["RequestMethod"] == "AddGeneric")
{
// Any and all updates cause the cache to clear
m_memoryCache.Clear();
// Send update to server, return the response without caching it
return WebUtil.PostToService(m_groupsServerURI, requestArgs);
}
// 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;
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);
// and cache the response

View File

@ -960,7 +960,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
}
if( resp == null )
if (resp == null)
{
string UserService;
UUID SessionID;
@ -1065,7 +1065,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
/// <summary>
/// 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
/// </summary>
/// <param name="client"></param>

View File

@ -161,7 +161,7 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
//finalize
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;
}
foreach(string button in buttons)
foreach (string button in buttons)
{
if (button == String.Empty)
{
@ -448,7 +448,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
dm.SendDialogToUser(
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,
Gift = 2,
Purchase = 3
}
}
}

View File

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

View File

@ -118,7 +118,7 @@ public class RegionCombinerLargeLandChannel : ILandChannel
return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY);
}
}
ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene);
obj.LandData.Name = "NO LAND";
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)
{
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)
{
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)
{
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));
break;
}
}
}
return res;
}
@ -7993,7 +7993,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (face < 0 || face > m_host.GetNumberOfSides() - 1)
return ScriptBaseClass.LSL_STATUS_OK;
return SetPrimMediaParams(face, rules);
return SetPrimMediaParams(face, 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++);
break;
}
}
}
module.SetMediaEntry(m_host, face, me);
@ -8102,7 +8102,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
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);

View File

@ -1190,7 +1190,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
World.LandChannel.Join(startx,starty,endx,endy,m_host.OwnerID);
}
public void osParcelSubdivide(LSL_Vector pos1, LSL_Vector pos2)
{
CheckThreatLevel(ThreatLevel.High, "osParcelSubdivide");
@ -1213,7 +1213,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// can modify it
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");
return;
@ -1230,7 +1230,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
UUID uuid;
// 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++);
string arg = rules.GetLSLStringItem(idx++);

View File

@ -416,7 +416,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
List<SensedEntity> sensedEntities = new List<SensedEntity>();
// If nobody about quit fast
if(m_CmdManager.m_ScriptEngine.World.GetRootAgentCount() == 0)
if (m_CmdManager.m_ScriptEngine.World.GetRootAgentCount() == 0)
return sensedEntities;
SceneObjectPart SensePoint = ts.host;
@ -485,7 +485,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
{
ScenePresence sp;
// 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;
senseEntity(sp);
}

View File

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

View File

@ -62,7 +62,7 @@ namespace OpenSim.Server.Base
/// </summary>
/// <param name="dllName"></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
{
string[] parts = dllName.Split(new char[] {':'});

View File

@ -86,7 +86,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
paramList.Add(hash);
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);
XmlRpcResponse response = null;
try

View File

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

View File

@ -276,11 +276,11 @@ namespace OpenSim.Services.InventoryService
List<InventoryFolderBase> folders = RequestSubFolders(root.ID);
foreach (InventoryFolderBase folder in folders)
{
{
if (folder.Type == (short)type)
{
// 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;
}

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

View File

@ -99,7 +99,7 @@ namespace OpenSim.Data.Null
}
public void RemoveObject(UUID obj, UUID regionUUID)
{
{
// All parts belonging to the object with the uuid are removed.
List<SceneObjectPart> parts = new List<SceneObjectPart>(m_sceneObjectParts.Values);
foreach (SceneObjectPart part in parts)
@ -108,7 +108,7 @@ namespace OpenSim.Data.Null
{
m_log.DebugFormat(
"[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);
}
}
@ -129,7 +129,7 @@ namespace OpenSim.Data.Null
if (prim.IsRoot)
{
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);
}
}

View File

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

View File

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

View File

@ -58,7 +58,7 @@ namespace OpenSim.Tests.Common.Setup
public class SceneSetupHelpers
{
// 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_authenticationService = null;
private static ISharedRegionModule m_inventoryService = null;
@ -69,19 +69,19 @@ namespace OpenSim.Tests.Common.Setup
/// <summary>
/// Set up a test scene
/// </summary>
///
///
/// Automatically starts service threads, as would the normal runtime.
///
///
/// <returns></returns>
public static TestScene SetupScene()
{
return SetupScene("");
}
/// <summary>
/// Set up a test scene
/// </summary>
///
///
/// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param>
/// <returns></returns>
public static TestScene SetupScene(String realServices)
@ -94,7 +94,7 @@ namespace OpenSim.Tests.Common.Setup
///// <summary>
///// Set up a test scene
///// </summary>
/////
/////
///// <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>
///// <returns></returns>
@ -168,13 +168,13 @@ namespace OpenSim.Tests.Common.Setup
capsModule.Initialise(new IniConfigSource());
testScene.AddRegionModule(capsModule.Name, capsModule);
capsModule.AddRegion(testScene);
IRegionModule godsModule = new GodsModule();
godsModule.Initialise(testScene, new IniConfigSource());
testScene.AddModule(godsModule.Name, godsModule);
realServices = realServices.ToLower();
// IConfigSource config = new IniConfigSource();
// If we have a brand new scene, need to initialize shared region modules
if ((m_assetService == null && m_inventoryService == null) || newScene)
{
@ -185,13 +185,13 @@ namespace OpenSim.Tests.Common.Setup
// For now, always started a 'real' authentication service
StartAuthenticationService(testScene, true);
if (realServices.Contains("inventory"))
StartInventoryService(testScene, true);
else
StartInventoryService(testScene, false);
StartGridService(testScene, true);
StartGridService(testScene, true);
StartUserAccountService(testScene);
StartPresenceService(testScene);
}
@ -208,7 +208,7 @@ namespace OpenSim.Tests.Common.Setup
m_presenceService.RegionLoaded(testScene);
}
m_inventoryService.PostInitialise();
m_assetService.PostInitialise();
m_userAccountService.PostInitialise();
@ -251,7 +251,7 @@ namespace OpenSim.Tests.Common.Setup
else
config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockAssetService");
config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
assetService.Initialise(config);
assetService.Initialise(config);
assetService.AddRegion(testScene);
assetService.RegionLoaded(testScene);
testScene.AddRegionModule(assetService.Name, assetService);
@ -278,7 +278,7 @@ namespace OpenSim.Tests.Common.Setup
testScene.AddRegionModule(service.Name, service);
//m_authenticationService = service;
}
private static void StartInventoryService(Scene testScene, bool real)
{
ISharedRegionModule inventoryService = new LocalInventoryServicesConnector();
@ -286,7 +286,7 @@ namespace OpenSim.Tests.Common.Setup
config.AddConfig("Modules");
config.AddConfig("InventoryService");
config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector");
if (real)
{
config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Services.InventoryService.dll:InventoryService");
@ -295,7 +295,7 @@ namespace OpenSim.Tests.Common.Setup
{
config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockInventoryService");
}
config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
inventoryService.Initialise(config);
inventoryService.AddRegion(testScene);
@ -339,14 +339,14 @@ namespace OpenSim.Tests.Common.Setup
config.Configs["UserAccountService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
config.Configs["UserAccountService"].Set(
"LocalServiceModule", "OpenSim.Services.UserAccountService.dll:UserAccountService");
if (m_userAccountService == null)
{
ISharedRegionModule userAccountService = new LocalUserAccountServicesConnector();
userAccountService.Initialise(config);
m_userAccountService = userAccountService;
}
m_userAccountService.AddRegion(testScene);
m_userAccountService.RegionLoaded(testScene);
testScene.AddRegionModule(m_userAccountService.Name, m_userAccountService);
@ -560,5 +560,4 @@ namespace OpenSim.Tests.Common.Setup
sogd.InventoryDeQueueAndDelete();
}
}
}

View File

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

View File

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