Merge branch '0.6.9-post-fixes' into careminster
commit
0526a91206
|
@ -20,6 +20,7 @@
|
|||
<delete dir="${distbindir}/.nant"/>
|
||||
<delete>
|
||||
<fileset basedir="${distbindir}">
|
||||
<include name="BUILDING.txt"/>
|
||||
<include name="Makefile"/>
|
||||
<include name="nant-color"/>
|
||||
<include name="OpenSim.*"/>
|
||||
|
@ -141,6 +142,8 @@
|
|||
</exec>
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.mysql.tests)==0}" />
|
||||
|
||||
<delete dir="%temp%"/>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="test-cov" depends="build">
|
||||
|
|
|
@ -164,6 +164,7 @@ This software uses components from the following developers:
|
|||
* log4net (http://logging.apache.org/log4net/)
|
||||
* GlynnTucker.Cache (http://gtcache.sourceforge.net/)
|
||||
* NDesk.Options 0.2.1 (http://www.ndesk.org/Options)
|
||||
* Json.NET 3.5 Release 6. The binary used is actually Newtonsoft.Json.Net20.dll for Mono 2.4 compatability (http://james.newtonking.com/projects/json-net.aspx)
|
||||
|
||||
Some plugins are based on Cable Beach
|
||||
Cable Beach is Copyright (c) 2008 Intel Corporation
|
||||
|
|
|
@ -635,9 +635,9 @@ namespace OpenSim.Data.MSSQL
|
|||
/// <param name="connection">connection to the database</param>
|
||||
private void DeleteItemsInFolder(UUID folderID, SqlConnection connection)
|
||||
{
|
||||
using (SqlCommand command = new SqlCommand("DELETE FROM inventoryitems WHERE folderID=@folderID", connection))
|
||||
using (SqlCommand command = new SqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=@parentFolderID", connection))
|
||||
{
|
||||
command.Parameters.Add(database.CreateParameter("folderID", folderID));
|
||||
command.Parameters.Add(database.CreateParameter("parentFolderID", folderID));
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -582,8 +582,21 @@ namespace OpenSim.Data.MSSQL
|
|||
/// <param name="appearance">the appearence</param>
|
||||
override public void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
|
||||
{
|
||||
string sql = @"DELETE FROM avatarappearance WHERE owner=@owner;
|
||||
INSERT INTO avatarappearance
|
||||
string sql = @"DELETE FROM avatarappearance WHERE owner=@owner";
|
||||
using (AutoClosingSqlCommand cmd = database.Query(sql))
|
||||
{
|
||||
cmd.Parameters.Add(database.CreateParameter("@owner", appearance.Owner));
|
||||
try
|
||||
{
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[USER DB] Error deleting old user appearance, error: {0}", e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
sql=@"INSERT INTO avatarappearance
|
||||
(owner, serial, visual_params, texture, avatar_height,
|
||||
body_item, body_asset, skin_item, skin_asset, hair_item,
|
||||
hair_asset, eyes_item, eyes_asset, shirt_item, shirt_asset,
|
||||
|
|
|
@ -25,13 +25,17 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
public class MainServer
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private static BaseHttpServer instance = null;
|
||||
private static Dictionary<uint, BaseHttpServer> m_Servers =
|
||||
new Dictionary<uint, BaseHttpServer>();
|
||||
|
@ -53,6 +57,8 @@ namespace OpenSim.Framework
|
|||
return m_Servers[port];
|
||||
|
||||
m_Servers[port] = new BaseHttpServer(port);
|
||||
|
||||
m_log.InfoFormat("[MAIN HTTP SERVER]: Starting main http server on port {0}", port);
|
||||
m_Servers[port].Start();
|
||||
|
||||
return m_Servers[port];
|
||||
|
|
|
@ -0,0 +1,282 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
public static class SLUtil
|
||||
{
|
||||
#region SL / file extension / content-type conversions
|
||||
|
||||
public static string SLAssetTypeToContentType(int assetType)
|
||||
{
|
||||
switch ((AssetType)assetType)
|
||||
{
|
||||
case AssetType.Texture:
|
||||
return "image/x-j2c";
|
||||
case AssetType.Sound:
|
||||
return "application/ogg";
|
||||
case AssetType.CallingCard:
|
||||
return "application/vnd.ll.callingcard";
|
||||
case AssetType.Landmark:
|
||||
return "application/vnd.ll.landmark";
|
||||
case AssetType.Clothing:
|
||||
return "application/vnd.ll.clothing";
|
||||
case AssetType.Object:
|
||||
return "application/vnd.ll.primitive";
|
||||
case AssetType.Notecard:
|
||||
return "application/vnd.ll.notecard";
|
||||
case AssetType.Folder:
|
||||
return "application/vnd.ll.folder";
|
||||
case AssetType.RootFolder:
|
||||
return "application/vnd.ll.rootfolder";
|
||||
case AssetType.LSLText:
|
||||
return "application/vnd.ll.lsltext";
|
||||
case AssetType.LSLBytecode:
|
||||
return "application/vnd.ll.lslbyte";
|
||||
case AssetType.TextureTGA:
|
||||
case AssetType.ImageTGA:
|
||||
return "image/tga";
|
||||
case AssetType.Bodypart:
|
||||
return "application/vnd.ll.bodypart";
|
||||
case AssetType.TrashFolder:
|
||||
return "application/vnd.ll.trashfolder";
|
||||
case AssetType.SnapshotFolder:
|
||||
return "application/vnd.ll.snapshotfolder";
|
||||
case AssetType.LostAndFoundFolder:
|
||||
return "application/vnd.ll.lostandfoundfolder";
|
||||
case AssetType.SoundWAV:
|
||||
return "audio/x-wav";
|
||||
case AssetType.ImageJPEG:
|
||||
return "image/jpeg";
|
||||
case AssetType.Animation:
|
||||
return "application/vnd.ll.animation";
|
||||
case AssetType.Gesture:
|
||||
return "application/vnd.ll.gesture";
|
||||
case AssetType.Simstate:
|
||||
return "application/x-metaverse-simstate";
|
||||
case AssetType.Unknown:
|
||||
default:
|
||||
return "application/octet-stream";
|
||||
}
|
||||
}
|
||||
|
||||
public static sbyte ContentTypeToSLAssetType(string contentType)
|
||||
{
|
||||
switch (contentType)
|
||||
{
|
||||
case "image/x-j2c":
|
||||
case "image/jp2":
|
||||
return (sbyte)AssetType.Texture;
|
||||
case "application/ogg":
|
||||
return (sbyte)AssetType.Sound;
|
||||
case "application/vnd.ll.callingcard":
|
||||
case "application/x-metaverse-callingcard":
|
||||
return (sbyte)AssetType.CallingCard;
|
||||
case "application/vnd.ll.landmark":
|
||||
case "application/x-metaverse-landmark":
|
||||
return (sbyte)AssetType.Landmark;
|
||||
case "application/vnd.ll.clothing":
|
||||
case "application/x-metaverse-clothing":
|
||||
return (sbyte)AssetType.Clothing;
|
||||
case "application/vnd.ll.primitive":
|
||||
case "application/x-metaverse-primitive":
|
||||
return (sbyte)AssetType.Object;
|
||||
case "application/vnd.ll.notecard":
|
||||
case "application/x-metaverse-notecard":
|
||||
return (sbyte)AssetType.Notecard;
|
||||
case "application/vnd.ll.folder":
|
||||
return (sbyte)AssetType.Folder;
|
||||
case "application/vnd.ll.rootfolder":
|
||||
return (sbyte)AssetType.RootFolder;
|
||||
case "application/vnd.ll.lsltext":
|
||||
case "application/x-metaverse-lsl":
|
||||
return (sbyte)AssetType.LSLText;
|
||||
case "application/vnd.ll.lslbyte":
|
||||
case "application/x-metaverse-lso":
|
||||
return (sbyte)AssetType.LSLBytecode;
|
||||
case "image/tga":
|
||||
// Note that AssetType.TextureTGA will be converted to AssetType.ImageTGA
|
||||
return (sbyte)AssetType.ImageTGA;
|
||||
case "application/vnd.ll.bodypart":
|
||||
case "application/x-metaverse-bodypart":
|
||||
return (sbyte)AssetType.Bodypart;
|
||||
case "application/vnd.ll.trashfolder":
|
||||
return (sbyte)AssetType.TrashFolder;
|
||||
case "application/vnd.ll.snapshotfolder":
|
||||
return (sbyte)AssetType.SnapshotFolder;
|
||||
case "application/vnd.ll.lostandfoundfolder":
|
||||
return (sbyte)AssetType.LostAndFoundFolder;
|
||||
case "audio/x-wav":
|
||||
return (sbyte)AssetType.SoundWAV;
|
||||
case "image/jpeg":
|
||||
return (sbyte)AssetType.ImageJPEG;
|
||||
case "application/vnd.ll.animation":
|
||||
case "application/x-metaverse-animation":
|
||||
return (sbyte)AssetType.Animation;
|
||||
case "application/vnd.ll.gesture":
|
||||
case "application/x-metaverse-gesture":
|
||||
return (sbyte)AssetType.Gesture;
|
||||
case "application/x-metaverse-simstate":
|
||||
return (sbyte)AssetType.Simstate;
|
||||
case "application/octet-stream":
|
||||
default:
|
||||
return (sbyte)AssetType.Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
public static sbyte ContentTypeToSLInvType(string contentType)
|
||||
{
|
||||
switch (contentType)
|
||||
{
|
||||
case "image/x-j2c":
|
||||
case "image/jp2":
|
||||
case "image/tga":
|
||||
case "image/jpeg":
|
||||
return (sbyte)InventoryType.Texture;
|
||||
case "application/ogg":
|
||||
case "audio/x-wav":
|
||||
return (sbyte)InventoryType.Sound;
|
||||
case "application/vnd.ll.callingcard":
|
||||
case "application/x-metaverse-callingcard":
|
||||
return (sbyte)InventoryType.CallingCard;
|
||||
case "application/vnd.ll.landmark":
|
||||
case "application/x-metaverse-landmark":
|
||||
return (sbyte)InventoryType.Landmark;
|
||||
case "application/vnd.ll.clothing":
|
||||
case "application/x-metaverse-clothing":
|
||||
case "application/vnd.ll.bodypart":
|
||||
case "application/x-metaverse-bodypart":
|
||||
return (sbyte)InventoryType.Wearable;
|
||||
case "application/vnd.ll.primitive":
|
||||
case "application/x-metaverse-primitive":
|
||||
return (sbyte)InventoryType.Object;
|
||||
case "application/vnd.ll.notecard":
|
||||
case "application/x-metaverse-notecard":
|
||||
return (sbyte)InventoryType.Notecard;
|
||||
case "application/vnd.ll.folder":
|
||||
return (sbyte)InventoryType.Folder;
|
||||
case "application/vnd.ll.rootfolder":
|
||||
return (sbyte)InventoryType.RootCategory;
|
||||
case "application/vnd.ll.lsltext":
|
||||
case "application/x-metaverse-lsl":
|
||||
case "application/vnd.ll.lslbyte":
|
||||
case "application/x-metaverse-lso":
|
||||
return (sbyte)InventoryType.LSL;
|
||||
case "application/vnd.ll.trashfolder":
|
||||
case "application/vnd.ll.snapshotfolder":
|
||||
case "application/vnd.ll.lostandfoundfolder":
|
||||
return (sbyte)InventoryType.Folder;
|
||||
case "application/vnd.ll.animation":
|
||||
case "application/x-metaverse-animation":
|
||||
return (sbyte)InventoryType.Animation;
|
||||
case "application/vnd.ll.gesture":
|
||||
case "application/x-metaverse-gesture":
|
||||
return (sbyte)InventoryType.Gesture;
|
||||
case "application/x-metaverse-simstate":
|
||||
return (sbyte)InventoryType.Snapshot;
|
||||
case "application/octet-stream":
|
||||
default:
|
||||
return (sbyte)InventoryType.Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion SL / file extension / content-type conversions
|
||||
|
||||
/// <summary>
|
||||
/// Parse a notecard in Linden format to a string of ordinary text.
|
||||
/// </summary>
|
||||
/// <param name="rawInput"></param>
|
||||
/// <returns></returns>
|
||||
public static string ParseNotecardToString(string rawInput)
|
||||
{
|
||||
return string.Join("\n", ParseNotecardToList(rawInput).ToArray());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parse a notecard in Linden format to a list of ordinary lines.
|
||||
/// </summary>
|
||||
/// <param name="rawInput"></param>
|
||||
/// <returns></returns>
|
||||
public static List<string> ParseNotecardToList(string rawInput)
|
||||
{
|
||||
string[] input = rawInput.Replace("\r", "").Split('\n');
|
||||
int idx = 0;
|
||||
int level = 0;
|
||||
List<string> output = new List<string>();
|
||||
string[] words;
|
||||
|
||||
while (idx < input.Length)
|
||||
{
|
||||
if (input[idx] == "{")
|
||||
{
|
||||
level++;
|
||||
idx++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (input[idx]== "}")
|
||||
{
|
||||
level--;
|
||||
idx++;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (level)
|
||||
{
|
||||
case 0:
|
||||
words = input[idx].Split(' '); // Linden text ver
|
||||
// Notecards are created *really* empty. Treat that as "no text" (just like after saving an empty notecard)
|
||||
if (words.Length < 3)
|
||||
return output;
|
||||
|
||||
int version = int.Parse(words[3]);
|
||||
if (version != 2)
|
||||
return output;
|
||||
break;
|
||||
case 1:
|
||||
words = input[idx].Split(' ');
|
||||
if (words[0] == "LLEmbeddedItems")
|
||||
break;
|
||||
if (words[0] == "Text")
|
||||
{
|
||||
int len = int.Parse(words[2]);
|
||||
idx++;
|
||||
|
||||
int count = -1;
|
||||
|
||||
while (count < len)
|
||||
{
|
||||
// int l = input[idx].Length;
|
||||
string ln = input[idx];
|
||||
|
||||
int need = len-count-1;
|
||||
if (ln.Length > need)
|
||||
ln = ln.Substring(0, need);
|
||||
|
||||
output.Add(ln);
|
||||
count += ln.Length + 1;
|
||||
idx++;
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
words = input[idx].Split(' '); // count
|
||||
if (words[0] == "count")
|
||||
{
|
||||
int c = int.Parse(words[1]);
|
||||
if (c > 0)
|
||||
return output;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -208,7 +208,9 @@ namespace OpenSim.Framework.Serialization
|
|||
m_bw.Write(header);
|
||||
|
||||
// Write out data
|
||||
m_bw.Write(data);
|
||||
// An IOException occurs if we try to write out an empty array in Mono 2.6
|
||||
if (data.Length > 0)
|
||||
m_bw.Write(data);
|
||||
|
||||
if (data.Length % 512 != 0)
|
||||
{
|
||||
|
|
|
@ -311,7 +311,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[BASE HTTP SERVER]: OnRequest() failed with {0} {1}", e.Message, e.StackTrace);
|
||||
m_log.Error(string.Format("[BASE HTTP SERVER]: OnRequest() failed with "), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1572,7 +1572,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
|
||||
public void Start()
|
||||
{
|
||||
m_log.Info("[BASE HTTP SERVER]: Starting up HTTP Server");
|
||||
StartHTTP();
|
||||
}
|
||||
|
||||
|
@ -1580,7 +1579,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
{
|
||||
try
|
||||
{
|
||||
m_log.Debug("[BASE HTTP SERVER]: Spawned main thread OK");
|
||||
//m_httpListener = new HttpListener();
|
||||
NotSocketErrors = 0;
|
||||
if (!m_ssl)
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace OpenSim
|
|||
public class VersionInfo
|
||||
{
|
||||
private const string VERSION_NUMBER = "0.6.9CM";
|
||||
private const Flavour VERSION_FLAVOUR = Flavour.Dev;
|
||||
private const Flavour VERSION_FLAVOUR = Flavour.Post_Fixes;
|
||||
|
||||
public enum Flavour
|
||||
{
|
||||
|
|
|
@ -164,12 +164,12 @@ namespace OpenSim
|
|||
m_config.Source = new IniConfigSource();
|
||||
m_config.Source.Merge(DefaultConfig());
|
||||
|
||||
m_log.Info("[CONFIG] Reading configuration settings");
|
||||
m_log.Info("[CONFIG]: Reading configuration settings");
|
||||
|
||||
if (sources.Count == 0)
|
||||
{
|
||||
m_log.FatalFormat("[CONFIG] Could not load any configuration");
|
||||
m_log.FatalFormat("[CONFIG] Did you copy the OpenSim.ini.example file to OpenSim.ini?");
|
||||
m_log.FatalFormat("[CONFIG]: Could not load any configuration");
|
||||
m_log.FatalFormat("[CONFIG]: Did you copy the OpenSim.ini.example file to OpenSim.ini?");
|
||||
Environment.Exit(1);
|
||||
}
|
||||
|
||||
|
@ -182,8 +182,8 @@ namespace OpenSim
|
|||
|
||||
if (!iniFileExists)
|
||||
{
|
||||
m_log.FatalFormat("[CONFIG] Could not load any configuration");
|
||||
m_log.FatalFormat("[CONFIG] Configuration exists, but there was an error loading it!");
|
||||
m_log.FatalFormat("[CONFIG]: Could not load any configuration");
|
||||
m_log.FatalFormat("[CONFIG]: Configuration exists, but there was an error loading it!");
|
||||
Environment.Exit(1);
|
||||
}
|
||||
|
||||
|
@ -257,20 +257,17 @@ namespace OpenSim
|
|||
|
||||
if (!IsUri(iniPath))
|
||||
{
|
||||
m_log.InfoFormat("[CONFIG] Reading configuration file {0}",
|
||||
Path.GetFullPath(iniPath));
|
||||
m_log.InfoFormat("[CONFIG]: Reading configuration file {0}", Path.GetFullPath(iniPath));
|
||||
|
||||
m_config.Source.Merge(new IniConfigSource(iniPath));
|
||||
success = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.InfoFormat("[CONFIG] {0} is a http:// URI, fetching ...",
|
||||
iniPath);
|
||||
m_log.InfoFormat("[CONFIG]: {0} is a http:// URI, fetching ...", iniPath);
|
||||
|
||||
// The ini file path is a http URI
|
||||
// Try to read it
|
||||
//
|
||||
try
|
||||
{
|
||||
XmlReader r = XmlReader.Create(iniPath);
|
||||
|
@ -281,7 +278,7 @@ namespace OpenSim
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.FatalFormat("[CONFIG] Exception reading config from URI {0}\n" + e.ToString(), iniPath);
|
||||
m_log.FatalFormat("[CONFIG]: Exception reading config from URI {0}\n" + e.ToString(), iniPath);
|
||||
Environment.Exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -348,6 +348,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
protected PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_avatarTerseUpdates;
|
||||
private PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_primTerseUpdates;
|
||||
private PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock> m_primFullUpdates;
|
||||
|
||||
/// <value>
|
||||
/// List used in construction of data blocks for an object update packet. This is to stop us having to
|
||||
/// continually recreate it.
|
||||
/// </value>
|
||||
protected List<ObjectUpdatePacket.ObjectDataBlock> m_fullUpdateDataBlocksBuilder;
|
||||
|
||||
/// <value>
|
||||
/// Maintain a record of all the objects killed. This allows us to stop an update being sent from the
|
||||
/// thread servicing the m_primFullUpdates queue after a kill. If this happens the object persists as an
|
||||
/// ownerless phantom.
|
||||
///
|
||||
/// All manipulation of this set has to occur under a m_primFullUpdate.SyncRoot lock
|
||||
///
|
||||
/// </value>
|
||||
protected HashSet<uint> m_killRecord;
|
||||
|
||||
private int m_moneyBalance;
|
||||
private int m_animationSequenceNumber = 1;
|
||||
private bool m_SendLogoutPacketWhenClosing = true;
|
||||
|
@ -437,6 +454,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
m_avatarTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
|
||||
m_primTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
|
||||
m_primFullUpdates = new PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock>(m_scene.Entities.Count);
|
||||
m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>();
|
||||
m_killRecord = new HashSet<uint>();
|
||||
|
||||
m_assetService = m_scene.RequestModuleInterface<IAssetService>();
|
||||
m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>();
|
||||
|
@ -1473,7 +1492,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
kill.ObjectData[0].ID = localID;
|
||||
kill.Header.Reliable = true;
|
||||
kill.Header.Zerocoded = true;
|
||||
OutPacket(kill, ThrottleOutPacketType.State);
|
||||
|
||||
lock (m_primFullUpdates.SyncRoot)
|
||||
{
|
||||
m_killRecord.Add(localID);
|
||||
OutPacket(kill, ThrottleOutPacketType.State);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -3513,21 +3537,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
if (count == 0)
|
||||
return;
|
||||
|
||||
outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[count];
|
||||
m_fullUpdateDataBlocksBuilder.Clear();
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
outPacket.ObjectData[i] = m_primFullUpdates.Dequeue();
|
||||
ObjectUpdatePacket.ObjectDataBlock block = m_primFullUpdates.Dequeue();
|
||||
|
||||
if (!m_killRecord.Contains(block.ID))
|
||||
{
|
||||
m_fullUpdateDataBlocksBuilder.Add(block);
|
||||
|
||||
// string text = Util.FieldToString(outPacket.ObjectData[i].Text);
|
||||
// if (text.IndexOf("\n") >= 0)
|
||||
// text = text.Remove(text.IndexOf("\n"));
|
||||
// m_log.DebugFormat(
|
||||
// "[CLIENT]: Sending full info about prim {0} text {1} to client {2}",
|
||||
// outPacket.ObjectData[i].ID, text, Name);
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// m_log.WarnFormat(
|
||||
// "[CLIENT]: Preventing full update for {0} after kill to {1}", block.ID, Name);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
OutPacket(outPacket, ThrottleOutPacketType.State);
|
||||
outPacket.ObjectData = m_fullUpdateDataBlocksBuilder.ToArray();
|
||||
|
||||
OutPacket(outPacket, ThrottleOutPacketType.State);
|
||||
}
|
||||
}
|
||||
|
||||
public void SendPrimTerseUpdate(SendPrimitiveTerseData data)
|
||||
|
|
|
@ -513,6 +513,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
byte flags = buffer.Data[0];
|
||||
bool isResend = (flags & Helpers.MSG_RESENT) != 0;
|
||||
bool isReliable = (flags & Helpers.MSG_RELIABLE) != 0;
|
||||
bool isZerocoded = (flags & Helpers.MSG_ZEROCODED) != 0;
|
||||
LLUDPClient udpClient = outgoingPacket.Client;
|
||||
|
||||
if (!udpClient.IsConnected)
|
||||
|
@ -522,23 +523,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
int dataLength = buffer.DataLength;
|
||||
|
||||
// Keep appending ACKs until there is no room left in the buffer or there are
|
||||
// no more ACKs to append
|
||||
uint ackCount = 0;
|
||||
uint ack;
|
||||
while (dataLength + 5 < buffer.Data.Length && udpClient.PendingAcks.Dequeue(out ack))
|
||||
// NOTE: I'm seeing problems with some viewers when ACKs are appended to zerocoded packets so I've disabled that here
|
||||
if (!isZerocoded)
|
||||
{
|
||||
Utils.UIntToBytesBig(ack, buffer.Data, dataLength);
|
||||
dataLength += 4;
|
||||
++ackCount;
|
||||
}
|
||||
// Keep appending ACKs until there is no room left in the buffer or there are
|
||||
// no more ACKs to append
|
||||
uint ackCount = 0;
|
||||
uint ack;
|
||||
while (dataLength + 5 < buffer.Data.Length && udpClient.PendingAcks.Dequeue(out ack))
|
||||
{
|
||||
Utils.UIntToBytesBig(ack, buffer.Data, dataLength);
|
||||
dataLength += 4;
|
||||
++ackCount;
|
||||
}
|
||||
|
||||
if (ackCount > 0)
|
||||
{
|
||||
// Set the last byte of the packet equal to the number of appended ACKs
|
||||
buffer.Data[dataLength++] = (byte)ackCount;
|
||||
// Set the appended ACKs flag on this packet
|
||||
buffer.Data[0] = (byte)(buffer.Data[0] | Helpers.MSG_APPENDED_ACKS);
|
||||
if (ackCount > 0)
|
||||
{
|
||||
// Set the last byte of the packet equal to the number of appended ACKs
|
||||
buffer.Data[dataLength++] = (byte)ackCount;
|
||||
// Set the appended ACKs flag on this packet
|
||||
buffer.Data[0] = (byte)(buffer.Data[0] | Helpers.MSG_APPENDED_ACKS);
|
||||
}
|
||||
}
|
||||
|
||||
buffer.DataLength = dataLength;
|
||||
|
|
|
@ -105,10 +105,10 @@ namespace OpenSim.Region.ClientStack
|
|||
|
||||
if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort))
|
||||
{
|
||||
m_log.Error("[HTTP]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports");
|
||||
m_log.Error("[REGION SERVER]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports");
|
||||
}
|
||||
|
||||
m_log.Info("[REGION]: Starting HTTP server");
|
||||
m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0}", m_httpServerPort);
|
||||
m_httpServer.Start();
|
||||
|
||||
base.StartupSpecific();
|
||||
|
@ -134,4 +134,4 @@ namespace OpenSim.Region.ClientStack
|
|||
return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -286,6 +286,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
|
|||
fromName = avatar.Name;
|
||||
sourceType = ChatSourceType.Agent;
|
||||
}
|
||||
else if (c.SenderUUID != UUID.Zero)
|
||||
{
|
||||
fromID = c.SenderUUID;
|
||||
}
|
||||
|
||||
// m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType);
|
||||
if (c.Scene != null)
|
||||
|
|
|
@ -146,10 +146,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
|
|||
}
|
||||
|
||||
private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
|
||||
{
|
||||
ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
|
||||
{
|
||||
try
|
||||
{
|
||||
ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
|
||||
|
||||
if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0)
|
||||
{
|
||||
avatar.Invulnerable = false;
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
|||
{
|
||||
ScenePresence sp = m_scene.GetScenePresence(agentID);
|
||||
|
||||
if (sp != null)
|
||||
if (sp != null && !sp.IsChildAgent)
|
||||
sp.ControllingClient.SendAgentAlertMessage(message, modal);
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
|||
{
|
||||
ScenePresence presence = presenceList[i];
|
||||
|
||||
if (presence.Firstname == firstName && presence.Lastname == lastName)
|
||||
if (!presence.IsChildAgent && presence.Firstname == firstName && presence.Lastname == lastName)
|
||||
{
|
||||
presence.ControllingClient.SendAgentAlertMessage(message, modal);
|
||||
break;
|
||||
|
@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
|||
}
|
||||
|
||||
ScenePresence sp = m_scene.GetScenePresence(avatarID);
|
||||
if (sp != null)
|
||||
if (sp != null && !sp.IsChildAgent)
|
||||
sp.ControllingClient.SendDialog(objectName, objectID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels);
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
|||
{
|
||||
ScenePresence sp = m_scene.GetScenePresence(avatarID);
|
||||
|
||||
if (sp != null)
|
||||
if (sp != null && !sp.IsChildAgent)
|
||||
sp.ControllingClient.SendLoadURL(objectName, objectID, ownerID, groupOwned, message, url);
|
||||
}
|
||||
|
||||
|
@ -206,4 +206,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
|||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -131,8 +131,8 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
|||
{
|
||||
// Start http server
|
||||
// Attach xmlrpc handlers
|
||||
m_log.Info("[REMOTE_DATA]: " +
|
||||
"Starting XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands.");
|
||||
m_log.Info("[XML RPC MODULE]: " +
|
||||
"Starting up XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands.");
|
||||
BaseHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort);
|
||||
httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData);
|
||||
httpServer.Start();
|
||||
|
@ -192,7 +192,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
|||
// This should no longer happen, but the check is reasonable anyway
|
||||
if (null == m_openChannels)
|
||||
{
|
||||
m_log.Warn("[RemoteDataReply] Attempt to open channel before initialization is complete");
|
||||
m_log.Warn("[XML RPC MODULE]: Attempt to open channel before initialization is complete");
|
||||
return newChannel;
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
|||
}
|
||||
else
|
||||
{
|
||||
m_log.Warn("[RemoteDataReply]: Channel or message_id not found");
|
||||
m_log.Warn("[XML RPC MODULE]: Channel or message_id not found");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -340,7 +340,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
|||
}
|
||||
else
|
||||
{
|
||||
m_log.Error("UNABLE TO REMOVE COMPLETED REQUEST");
|
||||
m_log.Error("[XML RPC MODULE]: UNABLE TO REMOVE COMPLETED REQUEST");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -728,4 +728,4 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
|||
return ReqID;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -260,7 +260,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
|
|||
{
|
||||
if (s.RegionInfo.RegionHandle == regionHandle)
|
||||
{
|
||||
//m_log.Debug("[LOCAL COMMS]: Found region to SendCreateObject");
|
||||
m_log.Debug("[LOCAL COMMS]: Found region to SendCreateObject");
|
||||
if (isLocalCall)
|
||||
{
|
||||
// We need to make a local copy of the object
|
||||
|
|
|
@ -314,10 +314,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
|||
{
|
||||
// m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID);
|
||||
|
||||
UUID requestedItemId = item.ID;
|
||||
|
||||
item = m_InventoryService.GetItem(item);
|
||||
|
||||
if (null == item)
|
||||
m_log.ErrorFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Could not find item with id {0}", item.ID);
|
||||
m_log.ErrorFormat(
|
||||
"[LOCAL INVENTORY SERVICES CONNECTOR]: Could not find item with id {0}", requestedItemId);
|
||||
|
||||
return item;
|
||||
}
|
||||
|
|
|
@ -275,7 +275,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
part.TaskInventory.LockItemsForRead(false);
|
||||
}
|
||||
|
||||
if (m_scene.AddRestoredSceneObject(sceneObject, true, false))
|
||||
if (!m_scene.AddRestoredSceneObject(sceneObject, true, false))
|
||||
{
|
||||
sceneObjectsLoadedCount++;
|
||||
sceneObject.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, 0);
|
||||
|
|
|
@ -37,6 +37,37 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
{
|
||||
event NewGroupNotice OnNewGroupNotice;
|
||||
|
||||
/// <summary>
|
||||
/// Create a group
|
||||
/// </summary>
|
||||
/// <param name="remoteClient"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="charter"></param>
|
||||
/// <param name="showInList"></param>
|
||||
/// <param name="insigniaID"></param>
|
||||
/// <param name="membershipFee"></param>
|
||||
/// <param name="openEnrollment"></param>
|
||||
/// <param name="allowPublish"></param>
|
||||
/// <param name="maturePublish"></param>
|
||||
/// <returns>The UUID of the created group</returns>
|
||||
UUID CreateGroup(
|
||||
IClientAPI remoteClient, string name, string charter, bool showInList, UUID insigniaID, int membershipFee,
|
||||
bool openEnrollment, bool allowPublish, bool maturePublish);
|
||||
|
||||
/// <summary>
|
||||
/// Get a group
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the group</param>
|
||||
/// <returns>The group's data. Null if there is no such group.</returns>
|
||||
GroupRecord GetGroupRecord(string name);
|
||||
|
||||
/// <summary>
|
||||
/// 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>
|
||||
GroupRecord GetGroupRecord(UUID GroupID);
|
||||
|
||||
void ActivateGroup(IClientAPI remoteClient, UUID groupID);
|
||||
List<GroupTitlesData> GroupTitlesRequest(IClientAPI remoteClient, UUID groupID);
|
||||
List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID);
|
||||
|
@ -51,7 +82,6 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
void SetGroupAcceptNotices(IClientAPI remoteClient, UUID groupID, bool acceptNotices, bool listInProfile);
|
||||
|
||||
void GroupTitleUpdate(IClientAPI remoteClient, UUID GroupID, UUID TitleRoleID);
|
||||
UUID CreateGroup(IClientAPI remoteClient, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish);
|
||||
|
||||
GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID GroupID);
|
||||
string GetGroupTitle(UUID avatarID);
|
||||
|
@ -64,7 +94,6 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
void LeaveGroupRequest(IClientAPI remoteClient, UUID GroupID);
|
||||
void EjectGroupMemberRequest(IClientAPI remoteClient, UUID GroupID, UUID EjecteeID);
|
||||
void InviteGroupRequest(IClientAPI remoteClient, UUID GroupID, UUID InviteeID, UUID RoleID);
|
||||
GroupRecord GetGroupRecord(UUID GroupID);
|
||||
void NotifyChange(UUID GroupID);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,21 +107,24 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
public event OnSetRootAgentSceneDelegate OnSetRootAgentScene;
|
||||
|
||||
/// <summary>
|
||||
/// Called when an object is touched/grabbed.
|
||||
/// Fired when an object is touched/grabbed.
|
||||
/// </summary>
|
||||
/// The originalID is the local ID of the part that was actually touched. The localID itself is always that of
|
||||
/// the root part.
|
||||
public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
|
||||
/// the root part.
|
||||
public event ObjectGrabDelegate OnObjectGrab;
|
||||
public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
|
||||
|
||||
public event ObjectGrabDelegate OnObjectGrabbing;
|
||||
public event ObjectDeGrabDelegate OnObjectDeGrab;
|
||||
public event ScriptResetDelegate OnScriptReset;
|
||||
|
||||
public event OnPermissionErrorDelegate OnPermissionError;
|
||||
public event OnPermissionErrorDelegate OnPermissionError;
|
||||
|
||||
public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource);
|
||||
/// <summary>
|
||||
/// Fired when a new script is created.
|
||||
/// </summary>
|
||||
public event NewRezScript OnRezScript;
|
||||
public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource);
|
||||
|
||||
public delegate void RemoveScript(uint localID, UUID itemID);
|
||||
public event RemoveScript OnRemoveScript;
|
||||
|
@ -163,38 +166,35 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
public delegate void ClientClosed(UUID clientID, Scene scene);
|
||||
|
||||
public event ClientClosed OnClientClosed;
|
||||
public event ClientClosed OnClientClosed;
|
||||
|
||||
/// <summary>
|
||||
/// This is fired when a scene object property that a script might be interested in (such as color, scale or
|
||||
/// inventory) changes. Only enough information is sent for the LSL changed event
|
||||
/// (see http://lslwiki.net/lslwiki/wakka.php?wakka=changed)
|
||||
/// </summary>
|
||||
public event ScriptChangedEvent OnScriptChangedEvent;
|
||||
public delegate void ScriptChangedEvent(uint localID, uint change);
|
||||
|
||||
public event ScriptChangedEvent OnScriptChangedEvent;
|
||||
|
||||
public delegate void ScriptControlEvent(uint localID, UUID item, UUID avatarID, uint held, uint changed);
|
||||
|
||||
public event ScriptControlEvent OnScriptControlEvent;
|
||||
|
||||
public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos);
|
||||
|
||||
public event ScriptAtTargetEvent OnScriptAtTargetEvent;
|
||||
|
||||
public delegate void ScriptNotAtTargetEvent(uint localID);
|
||||
|
||||
public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent;
|
||||
|
||||
public delegate void ScriptAtRotTargetEvent(uint localID, uint handle, Quaternion targetrot, Quaternion atrot);
|
||||
|
||||
public event ScriptAtRotTargetEvent OnScriptAtRotTargetEvent;
|
||||
|
||||
public delegate void ScriptNotAtRotTargetEvent(uint localID);
|
||||
|
||||
public event ScriptNotAtRotTargetEvent OnScriptNotAtRotTargetEvent;
|
||||
|
||||
public delegate void ScriptColliding(uint localID, ColliderArgs colliders);
|
||||
|
||||
public event ScriptColliding OnScriptColliderStart;
|
||||
public event ScriptColliding OnScriptColliding;
|
||||
public event ScriptColliding OnScriptCollidingEnd;
|
||||
|
||||
public event ScriptColliding OnScriptLandColliderStart;
|
||||
public event ScriptColliding OnScriptLandColliding;
|
||||
public event ScriptColliding OnScriptLandColliderEnd;
|
||||
|
|
|
@ -532,7 +532,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
if (recipientParentFolderId == UUID.Zero)
|
||||
{
|
||||
InventoryFolderBase recipientRootFolder = InventoryService.GetRootFolder(recipientId);
|
||||
|
@ -2086,7 +2085,10 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
group.RootPart.IsAttachment = true;
|
||||
}
|
||||
|
||||
AddNewSceneObject(group, true);
|
||||
// If we're rezzing an attachment then don't ask AddNewSceneObject() to update the client since
|
||||
// we'll be doing that later on. Scheduling more than one full update during the attachment
|
||||
// process causes some clients to fail to display the attachment properly.
|
||||
AddNewSceneObject(group, true, !attachment);
|
||||
|
||||
// m_log.InfoFormat("ray end point for inventory rezz is {0} {1} {2} ", RayEnd.X, RayEnd.Y, RayEnd.Z);
|
||||
// if attachment we set it's asset id so object updates can reflect that
|
||||
|
@ -2456,6 +2458,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return;
|
||||
}
|
||||
|
||||
m_log.DebugFormat("[SCENE INVENTORY]: {0} {1} IsAttachment={2}", att.Name, att.LocalId, att.IsAttachment);
|
||||
Console.WriteLine("HERE X");
|
||||
ScenePresence presence;
|
||||
if (TryGetAvatar(remoteClient.AgentId, out presence))
|
||||
{
|
||||
|
@ -2463,9 +2467,12 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
|
||||
item = InventoryService.GetItem(item);
|
||||
presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/);
|
||||
Console.WriteLine("HERE Y");
|
||||
|
||||
if (m_AvatarFactory != null)
|
||||
m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
|
||||
|
||||
Console.WriteLine("HERE Z");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -124,6 +124,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
if (((SceneObjectGroup)ent).LocalId == primLocalID)
|
||||
{
|
||||
m_log.DebugFormat("[SCENE]: Received full update request for {0} from {1}", primLocalID, remoteClient.Name);
|
||||
((SceneObjectGroup)ent).SendFullUpdateToClient(remoteClient);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1874,6 +1874,28 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return sceneObject;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add an object into the scene that has come from storage
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="sceneObject"></param>
|
||||
/// <param name="attachToBackup">
|
||||
/// If true, changes to the object will be reflected in its persisted data
|
||||
/// If false, the persisted data will not be changed even if the object in the scene is changed
|
||||
/// </param>
|
||||
/// <param name="alreadyPersisted">
|
||||
/// If true, we won't persist this object until it changes
|
||||
/// If false, we'll persist this object immediately
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// true if the object was added, false if an object with the same uuid was already in the scene
|
||||
/// </returns>
|
||||
public bool AddRestoredSceneObject(
|
||||
SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates)
|
||||
{
|
||||
return m_sceneGraph.AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, sendClientUpdates);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add an object into the scene that has come from storage
|
||||
/// </summary>
|
||||
|
@ -1893,7 +1915,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
public bool AddRestoredSceneObject(
|
||||
SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted)
|
||||
{
|
||||
return m_sceneGraph.AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted);
|
||||
return AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1927,7 +1949,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete every object from the scene
|
||||
/// Delete every object from the scene. This does not include attachments worn by avatars.
|
||||
/// </summary>
|
||||
public void DeleteAllSceneObjects()
|
||||
{
|
||||
|
@ -1938,7 +1960,11 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
foreach (EntityBase e in entities)
|
||||
{
|
||||
if (e is SceneObjectGroup)
|
||||
DeleteSceneObject((SceneObjectGroup)e, false);
|
||||
{
|
||||
SceneObjectGroup sog = (SceneObjectGroup)e;
|
||||
if (!sog.IsAttachment)
|
||||
DeleteSceneObject((SceneObjectGroup)e, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2502,7 +2528,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <returns></returns>
|
||||
public bool IncomingCreateObject(ISceneObject sog)
|
||||
{
|
||||
//m_log.Debug(" >>> IncomingCreateObject(sog) <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted);
|
||||
m_log.Debug(" >>> IncomingCreateObject(sog) <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted);
|
||||
SceneObjectGroup newObject;
|
||||
try
|
||||
{
|
||||
|
@ -2574,10 +2600,12 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
if (sceneObject.IsAttachmentCheckFull()) // Attachment
|
||||
{
|
||||
m_log.DebugFormat("[SCENE]: Adding attachment {0} {1}", sceneObject.Name, sceneObject.LocalId);
|
||||
|
||||
sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez);
|
||||
sceneObject.RootPart.AddFlag(PrimFlags.Phantom);
|
||||
|
||||
AddRestoredSceneObject(sceneObject, false, false);
|
||||
AddRestoredSceneObject(sceneObject, false, false, false);
|
||||
|
||||
// Handle attachment special case
|
||||
SceneObjectPart RootPrim = sceneObject.RootPart;
|
||||
|
@ -2585,6 +2613,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// Fix up attachment Parent Local ID
|
||||
ScenePresence sp = GetScenePresence(sceneObject.OwnerID);
|
||||
|
||||
Console.WriteLine("AAAA");
|
||||
|
||||
//uint parentLocalID = 0;
|
||||
if (sp != null)
|
||||
{
|
||||
|
@ -2603,20 +2633,25 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
//grp.SetFromAssetID(grp.RootPart.LastOwnerID);
|
||||
m_log.DebugFormat(
|
||||
"[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition);
|
||||
|
||||
|
||||
RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
|
||||
AttachObject(
|
||||
sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false);
|
||||
RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
|
||||
grp.SendGroupFullUpdate();
|
||||
|
||||
//grp.SendGroupFullUpdate();
|
||||
}
|
||||
else
|
||||
{
|
||||
RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
|
||||
RootPrim.AddFlag(PrimFlags.TemporaryOnRez);
|
||||
}
|
||||
|
||||
Console.WriteLine("BBBB");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.DebugFormat("[SCENE]: Adding ordinary object {0} {1}", sceneObject.Name, sceneObject.LocalId);
|
||||
|
||||
AddRestoredSceneObject(sceneObject, true, false);
|
||||
|
||||
if (!Permissions.CanObjectEntry(sceneObject.UUID,
|
||||
|
|
|
@ -1410,7 +1410,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// now we have a child agent in this region. Request all interesting data about other (root) agents
|
||||
agent.SendInitialFullUpdateToAllClients();
|
||||
|
||||
Console.WriteLine("SCS 1");
|
||||
agent.CrossAttachmentsIntoNewRegion(neighbourHandle, true);
|
||||
Console.WriteLine("SCS 2");
|
||||
|
||||
// m_scene.SendKillObject(m_localId);
|
||||
|
||||
|
|
|
@ -216,11 +216,15 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// If true, we won't persist this object until it changes
|
||||
/// If false, we'll persist this object immediately
|
||||
/// </param>
|
||||
/// <param name="sendClientUpdate">
|
||||
/// If true, we send updates to the client to tell it about this object
|
||||
/// If false, we leave it up to the caller to do this
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// true if the object was added, false if an object with the same uuid was already in the scene
|
||||
/// </returns>
|
||||
protected internal bool AddRestoredSceneObject(
|
||||
SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted)
|
||||
SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates)
|
||||
{
|
||||
// KF: Check for out-of-region, move inside and make static.
|
||||
Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X,
|
||||
|
@ -252,8 +256,29 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
sceneObject.HasGroupChanged = true;
|
||||
}
|
||||
|
||||
return AddSceneObject(sceneObject, attachToBackup, true);
|
||||
return AddSceneObject(sceneObject, attachToBackup, sendClientUpdates);
|
||||
}
|
||||
|
||||
// /// <summary>
|
||||
// /// Add an object into the scene that has come from storage
|
||||
// /// </summary>
|
||||
// /// <param name="sceneObject"></param>
|
||||
// /// <param name="attachToBackup">
|
||||
// /// If true, changes to the object will be reflected in its persisted data
|
||||
// /// If false, the persisted data will not be changed even if the object in the scene is changed
|
||||
// /// </param>
|
||||
// /// <param name="alreadyPersisted">
|
||||
// /// If true, we won't persist this object until it changes
|
||||
// /// If false, we'll persist this object immediately
|
||||
// /// </param>
|
||||
// /// <returns>
|
||||
// /// true if the object was added, false if an object with the same uuid was already in the scene
|
||||
// /// </returns>
|
||||
// protected internal bool AddRestoredSceneObject(
|
||||
// SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted)
|
||||
// {
|
||||
// AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, true);
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Add a newly created object to the scene. This will both update the scene, and send information about the
|
||||
|
@ -560,7 +585,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// m_log.DebugFormat(
|
||||
// "[SCENE GRAPH]: Retrieved single object {0} for attachment to {1} on point {2}",
|
||||
// objatt.Name, remoteClient.Name, AttachmentPt);
|
||||
|
||||
if (objatt != null)
|
||||
{
|
||||
bool tainted = false;
|
||||
|
@ -648,11 +672,13 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
protected internal bool AttachObject(
|
||||
IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent)
|
||||
{
|
||||
Console.WriteLine("HERE A");
|
||||
SceneObjectGroup group = GetGroupByPrim(objectLocalID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId))
|
||||
{
|
||||
Console.WriteLine("HERE -1");
|
||||
// If the attachment point isn't the same as the one previously used
|
||||
// set it's offset position = 0 so that it appears on the attachment point
|
||||
// and not in a weird location somewhere unknown.
|
||||
|
@ -691,9 +717,12 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
itemId = group.GetFromItemID();
|
||||
}
|
||||
|
||||
Console.WriteLine("HERE 0");
|
||||
m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group);
|
||||
|
||||
Console.WriteLine("HERE 1");
|
||||
group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent);
|
||||
Console.WriteLine("HERE 2");
|
||||
// In case it is later dropped again, don't let
|
||||
// it get cleaned up
|
||||
//
|
||||
|
|
|
@ -1651,6 +1651,10 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
public void SendFullUpdateToClient(IClientAPI remoteClient)
|
||||
{
|
||||
if (IsAttachment)
|
||||
m_log.DebugFormat(
|
||||
"[SOG]: Sending full update to client {0} for {1} {2}", remoteClient.Name, Name, LocalId);
|
||||
|
||||
SendPartFullUpdate(remoteClient, RootPart, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, RootPart.UUID));
|
||||
|
||||
lockPartsForRead(true);
|
||||
|
@ -1673,8 +1677,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <param name="part"></param>
|
||||
internal void SendPartFullUpdate(IClientAPI remoteClient, SceneObjectPart part, uint clientFlags)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[SOG]: Sendinging part full update to {0} for {1} {2}", remoteClient.Name, part.Name, part.LocalId);
|
||||
if (IsAttachment)
|
||||
m_log.DebugFormat(
|
||||
"[SOG]: Sending part full update to {0} for {1} {2}", remoteClient.Name, part.Name, part.LocalId);
|
||||
|
||||
if (m_rootPart.UUID == part.UUID)
|
||||
{
|
||||
|
@ -2186,7 +2191,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
public void ScheduleFullUpdateToAvatar(ScenePresence presence)
|
||||
{
|
||||
// m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1} just to avatar {2}", Name, UUID, presence.Name);
|
||||
if (IsAttachment)
|
||||
m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1} just to avatar {2}", Name, UUID, presence.Name);
|
||||
|
||||
RootPart.AddFullUpdateToAvatar(presence);
|
||||
|
||||
|
@ -2222,7 +2228,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// </summary>
|
||||
public void ScheduleGroupForFullUpdate()
|
||||
{
|
||||
// m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, UUID);
|
||||
if (IsAttachment)
|
||||
m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, UUID);
|
||||
|
||||
checkAtTargets();
|
||||
RootPart.ScheduleFullUpdate();
|
||||
|
|
|
@ -1270,16 +1270,17 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// Tell all scene presences that they should send updates for this part to their clients
|
||||
/// </summary>
|
||||
public void AddFullUpdateToAllAvatars()
|
||||
{
|
||||
{
|
||||
ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences();
|
||||
for (int i = 0; i < avatars.Length; i++)
|
||||
{
|
||||
avatars[i].SceneViewer.QueuePartForUpdate(this);
|
||||
}
|
||||
AddFullUpdateToAvatar(avatars[i]);
|
||||
}
|
||||
|
||||
public void AddFullUpdateToAvatar(ScenePresence presence)
|
||||
{
|
||||
if (IsAttachment)
|
||||
m_log.DebugFormat("AddFullUpdateToAllAvatar() {0} for {1} {2}", presence.Name, Name, LocalId);
|
||||
|
||||
presence.SceneViewer.QueuePartForUpdate(this);
|
||||
}
|
||||
|
||||
|
@ -1298,13 +1299,14 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences();
|
||||
for (int i = 0; i < avatars.Length; i++)
|
||||
{
|
||||
avatars[i].SceneViewer.QueuePartForUpdate(this);
|
||||
}
|
||||
AddTerseUpdateToAvatar(avatars[i]);
|
||||
}
|
||||
|
||||
public void AddTerseUpdateToAvatar(ScenePresence presence)
|
||||
{
|
||||
if (IsAttachment)
|
||||
m_log.DebugFormat("AddTerseUpdateToAvatar() {0} for {1} {2}", presence.Name, Name, LocalId);
|
||||
|
||||
presence.SceneViewer.QueuePartForUpdate(this);
|
||||
}
|
||||
|
||||
|
@ -2713,7 +2715,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// </summary>
|
||||
public void ScheduleFullUpdate()
|
||||
{
|
||||
// m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId);
|
||||
if (IsAttachment)
|
||||
m_log.DebugFormat("[SOP]: Scheduling full update for {0} {1}", Name, LocalId);
|
||||
|
||||
if (m_parentGroup != null)
|
||||
{
|
||||
|
@ -2826,6 +2829,10 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <param name="remoteClient"></param>
|
||||
public void SendFullUpdate(IClientAPI remoteClient, uint clientFlags)
|
||||
{
|
||||
if (IsAttachment)
|
||||
m_log.DebugFormat(
|
||||
"[SCENE OBJECT PART]: Sending part full update to {0} for {1} {2}", remoteClient.Name, Name, LocalId);
|
||||
|
||||
m_parentGroup.SendPartFullUpdate(remoteClient, this, clientFlags);
|
||||
}
|
||||
|
||||
|
@ -2834,6 +2841,10 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// </summary>
|
||||
public void SendFullUpdateToAllClients()
|
||||
{
|
||||
if (IsAttachment)
|
||||
m_log.DebugFormat(
|
||||
"[SCENE OBJECT PART]: Sending full update for {0} {1} for all clients", Name, LocalId);
|
||||
|
||||
ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences();
|
||||
for (int i = 0; i < avatars.Length; i++)
|
||||
{
|
||||
|
@ -2845,6 +2856,10 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
public void SendFullUpdateToAllClientsExcept(UUID agentID)
|
||||
{
|
||||
if (IsAttachment)
|
||||
m_log.DebugFormat(
|
||||
"[SCENE OBJECT PART]: Sending full update for {0} {1} to all clients except {2}", Name, LocalId, agentID);
|
||||
|
||||
ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences();
|
||||
for (int i = 0; i < avatars.Length; i++)
|
||||
{
|
||||
|
@ -2953,6 +2968,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes
|
||||
{
|
||||
if (IsAttachment)
|
||||
m_log.DebugFormat("[SOP]: Sending scheduled full update for {0} {1}", Name, LocalId);
|
||||
|
||||
AddFullUpdateToAllAvatars();
|
||||
m_updateFlag = 0; //Same here
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using OpenMetaverse;
|
||||
using log4net;
|
||||
using OpenSim.Framework;
|
||||
|
@ -39,6 +40,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
public class SceneViewer : ISceneViewer
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected ScenePresence m_presence;
|
||||
protected UpdateQueue m_partsUpdateQueue = new UpdateQueue();
|
||||
protected Queue<SceneObjectGroup> m_pendingObjects;
|
||||
|
@ -60,6 +63,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <param name="part"></param>
|
||||
public void QueuePartForUpdate(SceneObjectPart part)
|
||||
{
|
||||
if (part.IsAttachment)
|
||||
m_log.DebugFormat("[SCENE VIEWER]: Queueing part {0} {1} for update", part.Name, part.LocalId);
|
||||
|
||||
lock (m_partsUpdateQueue)
|
||||
{
|
||||
m_partsUpdateQueue.Enqueue(part);
|
||||
|
@ -134,7 +140,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
else if (update.LastTerseUpdateTime <= part.TimeStampTerse)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// m_log.DebugFormat(AddFullUpdateToAvatar
|
||||
// "[SCENE PRESENCE]: Tersely updating prim {0}, {1} - part timestamp {2}",
|
||||
// part.Name, part.UUID, part.TimeStampTerse);
|
||||
|
||||
|
|
|
@ -342,7 +342,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
|
||||
private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im)
|
||||
{
|
||||
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||
if (m_debugEnabled)
|
||||
{
|
||||
m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||
m_log.DebugFormat("[GROUPS]: remoteClient ({0}) im ({1})", remoteClient, im);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Group invitations
|
||||
if ((im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept) || (im.dialog == (byte)InstantMessageDialog.GroupInvitationDecline))
|
||||
|
@ -481,7 +487,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
if (member.AcceptNotices)
|
||||
{
|
||||
// Build notice IIM
|
||||
GridInstantMessage msg = CreateGroupNoticeIM(UUID.Zero, NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice);
|
||||
GridInstantMessage msg = CreateGroupNoticeIM(GetRequestingAgentID(remoteClient), NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice);
|
||||
|
||||
msg.toAgentID = member.AgentID.Guid;
|
||||
OutgoingInstantMessage(msg, member.AgentID);
|
||||
|
@ -1024,12 +1030,22 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
|
||||
public void InviteGroupRequest(IClientAPI remoteClient, UUID groupID, UUID invitedAgentID, UUID roleID)
|
||||
{
|
||||
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||
if (m_debugEnabled)
|
||||
{
|
||||
m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||
m_log.DebugFormat("[GROUPS]: remoteClient({0}) groupID({0}) invitedAgentID({0}) roleID({0})", remoteClient, groupID, invitedAgentID, roleID);
|
||||
}
|
||||
|
||||
|
||||
// Todo: Security check, probably also want to send some kind of notification
|
||||
UUID InviteID = UUID.Random();
|
||||
|
||||
m_groupData.AddAgentToGroupInvite(GetRequestingAgentID(remoteClient), InviteID, groupID, roleID, invitedAgentID);
|
||||
UUID requestingAgentID = GetRequestingAgentID(remoteClient);
|
||||
if (requestingAgentID == UUID.Zero)
|
||||
{
|
||||
m_log.Error("[GROUPS] Group Invite Requires a valid requesting agent to be specified");
|
||||
}
|
||||
m_groupData.AddAgentToGroupInvite(requestingAgentID, InviteID, groupID, roleID, invitedAgentID);
|
||||
|
||||
// Check to see if the invite went through, if it did not then it's possible
|
||||
// the remoteClient did not validate or did not have permission to invite.
|
||||
|
|
|
@ -40,6 +40,7 @@ using OpenMetaverse;
|
|||
using OpenMetaverse.StructuredData;
|
||||
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Communications;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
|
||||
namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||
|
@ -66,6 +67,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
private string m_groupReadKey = string.Empty;
|
||||
private string m_groupWriteKey = string.Empty;
|
||||
|
||||
private IUserService m_userService = null;
|
||||
private CommunicationsManager m_commManager = null;
|
||||
|
||||
private bool m_debugEnabled = false;
|
||||
|
||||
|
||||
// Used to track which agents are have dropped from a group chat session
|
||||
// Should be reset per agent, on logon
|
||||
|
@ -110,7 +116,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
|
||||
m_log.InfoFormat("[GROUPS-CONNECTOR]: Initializing {0}", this.Name);
|
||||
|
||||
m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty);
|
||||
m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", groupsConfig.GetString("XmlRpcServiceURL", string.Empty));
|
||||
if ((m_groupsServerURI == null) ||
|
||||
(m_groupsServerURI == string.Empty))
|
||||
{
|
||||
|
@ -124,7 +130,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
m_groupReadKey = groupsConfig.GetString("XmlRpcServiceReadKey", string.Empty);
|
||||
m_groupWriteKey = groupsConfig.GetString("XmlRpcServiceWriteKey", string.Empty);
|
||||
|
||||
|
||||
m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", true);
|
||||
|
||||
|
||||
// If we got all the config options we need, lets start'er'up
|
||||
|
@ -142,6 +148,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
if (m_connectorEnabled)
|
||||
{
|
||||
scene.RegisterModuleInterface<IGroupsServicesConnector>(this);
|
||||
|
||||
if (m_userService == null)
|
||||
{
|
||||
m_userService = scene.CommsManager.UserService;
|
||||
m_commManager = scene.CommsManager;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -912,7 +924,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
string UserService;
|
||||
UUID SessionID;
|
||||
GetClientGroupRequestID(requestingAgentID, out UserService, out SessionID);
|
||||
param.Add("requestingAgentID", requestingAgentID.ToString());
|
||||
param.Add("RequestingAgentID", requestingAgentID.ToString());
|
||||
param.Add("RequestingAgentUserService", UserService);
|
||||
param.Add("RequestingSessionID", SessionID.ToString());
|
||||
|
||||
|
@ -920,6 +932,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
param.Add("ReadKey", m_groupReadKey);
|
||||
param.Add("WriteKey", m_groupWriteKey);
|
||||
|
||||
if (m_debugEnabled)
|
||||
{
|
||||
m_log.Debug("[XMLRPCGROUPDATA] XmlRpcCall Params:");
|
||||
foreach (string key in param.Keys)
|
||||
{
|
||||
m_log.DebugFormat("[XMLRPCGROUPDATA] {0} : {1}", key, param[key]);
|
||||
}
|
||||
}
|
||||
|
||||
IList parameters = new ArrayList();
|
||||
parameters.Add(param);
|
||||
|
@ -940,10 +960,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
m_log.ErrorFormat("[XMLRPCGROUPDATA]: An error has occured while attempting to access the XmlRpcGroups server method: {0}", function);
|
||||
m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", e.ToString());
|
||||
|
||||
foreach (string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine },StringSplitOptions.None))
|
||||
if ((req != null) && (req.RequestResponse != null))
|
||||
{
|
||||
foreach (string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine }, StringSplitOptions.None))
|
||||
{
|
||||
m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", ResponseLine);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (string key in param.Keys)
|
||||
{
|
||||
|
@ -955,12 +978,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
return respData;
|
||||
}
|
||||
|
||||
|
||||
if (resp.Value is Hashtable)
|
||||
{
|
||||
Hashtable respData = (Hashtable)resp.Value;
|
||||
if (respData.Contains("error") && !respData.Contains("succeed"))
|
||||
{
|
||||
LogRespDataToConsoleError(respData);
|
||||
LogRespDataToConsoleError(function, respData);
|
||||
}
|
||||
|
||||
return respData;
|
||||
|
@ -988,18 +1012,26 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
return error;
|
||||
}
|
||||
|
||||
private void LogRespDataToConsoleError(Hashtable respData)
|
||||
private void LogRespDataToConsoleError(string function, Hashtable respData)
|
||||
{
|
||||
m_log.ErrorFormat("[XMLRPCGROUPDATA]: Error data from XmlRpcGroups server method: {0}", function);
|
||||
m_log.Error("[XMLRPCGROUPDATA]: Error:");
|
||||
|
||||
foreach (string key in respData.Keys)
|
||||
{
|
||||
m_log.ErrorFormat("[XMLRPCGROUPDATA]: Key: {0}", key);
|
||||
|
||||
string[] lines = respData[key].ToString().Split(new char[] { '\n' });
|
||||
foreach (string line in lines)
|
||||
if ((respData != null) && (respData.ContainsKey(key)) && (respData[key]!=null))
|
||||
{
|
||||
m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0}", line);
|
||||
string[] lines = respData[key].ToString().Split(new char[] { '\n' });
|
||||
foreach (string line in lines)
|
||||
{
|
||||
m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0}", line);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} : Empty/NULL", key);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1015,23 +1047,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
/// <returns></returns>
|
||||
private void GetClientGroupRequestID(UUID AgentID, out string UserServiceURL, out UUID SessionID)
|
||||
{
|
||||
UserServiceURL = "";
|
||||
// Default to local grid user service
|
||||
UserServiceURL = m_commManager.NetworkServersInfo.UserURL; ;
|
||||
|
||||
// if AgentID == UUID, there will be no SessionID. This will be true when
|
||||
// the region is requesting information for region use (object permissions for example)
|
||||
SessionID = UUID.Zero;
|
||||
|
||||
// Attempt to get User Profile, for SessionID
|
||||
UserProfileData userProfile = m_userService.GetUserProfile(AgentID);
|
||||
|
||||
// Need to rework this based on changes to User Services
|
||||
/*
|
||||
UserAccount userAccount = m_accountService.GetUserAccount(UUID.Zero,AgentID);
|
||||
if (userAccount == null)
|
||||
{
|
||||
// This should be impossible. If I've been passed a reference to a client
|
||||
// that client should be registered with the UserService. So something
|
||||
// is horribly wrong somewhere.
|
||||
|
||||
m_log.WarnFormat("[GROUPS]: Could not find a UserServiceURL for {0}", AgentID);
|
||||
|
||||
}
|
||||
else if (userProfile is ForeignUserProfileData)
|
||||
if ((userProfile != null) && (userProfile is ForeignUserProfileData))
|
||||
{
|
||||
// They aren't from around here
|
||||
ForeignUserProfileData fupd = (ForeignUserProfileData)userProfile;
|
||||
|
@ -1039,13 +1065,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
SessionID = fupd.CurrentAgent.SessionID;
|
||||
|
||||
}
|
||||
else
|
||||
else if (userProfile != null)
|
||||
{
|
||||
// They're a local user, use this:
|
||||
UserServiceURL = m_commManager.NetworkServersInfo.UserURL;
|
||||
// Local, just use the local SessionID
|
||||
SessionID = userProfile.CurrentAgent.SessionID;
|
||||
}
|
||||
*/
|
||||
else if (AgentID != UUID.Zero)
|
||||
{
|
||||
// This should be impossible. If I've been passed a reference to a client
|
||||
// that client should be registered with the UserService. So something
|
||||
// is horribly wrong somewhere.
|
||||
|
||||
// m_log.WarnFormat("[XMLRPCGROUPDATA]: Could not find a UserServiceURL for {0}", AgentID);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -146,6 +146,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
|
|||
c.Position = new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 30);
|
||||
c.Sender = null;
|
||||
c.SenderUUID = UUID.Zero;
|
||||
c.Scene = m_scene;
|
||||
|
||||
m_log.InfoFormat("[RegionReady]: Region \"{0}\" is ready: \"{1}\" on channel {2}",
|
||||
m_scene.RegionInfo.RegionName, c.Message, m_channelNotify);
|
||||
|
|
|
@ -10160,90 +10160,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
Notecard nc = new Notecard();
|
||||
nc.lastRef = DateTime.Now;
|
||||
nc.text = ParseText(text.Replace("\r", "").Split('\n'));
|
||||
nc.text = SLUtil.ParseNotecardToList(text).ToArray();
|
||||
m_Notecards[assetID] = nc;
|
||||
}
|
||||
}
|
||||
|
||||
protected static string[] ParseText(string[] input)
|
||||
{
|
||||
int idx = 0;
|
||||
int level = 0;
|
||||
List<string> output = new List<string>();
|
||||
string[] words;
|
||||
|
||||
while (idx < input.Length)
|
||||
{
|
||||
if (input[idx] == "{")
|
||||
{
|
||||
level++;
|
||||
idx++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (input[idx]== "}")
|
||||
{
|
||||
level--;
|
||||
idx++;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (level)
|
||||
{
|
||||
case 0:
|
||||
words = input[idx].Split(' '); // Linden text ver
|
||||
// Notecards are created *really* empty. Treat that as "no text" (just like after saving an empty notecard)
|
||||
if (words.Length < 3)
|
||||
return new String[0];
|
||||
|
||||
int version = int.Parse(words[3]);
|
||||
if (version != 2)
|
||||
return new String[0];
|
||||
break;
|
||||
case 1:
|
||||
words = input[idx].Split(' ');
|
||||
if (words[0] == "LLEmbeddedItems")
|
||||
break;
|
||||
if (words[0] == "Text")
|
||||
{
|
||||
int len = int.Parse(words[2]);
|
||||
idx++;
|
||||
|
||||
int count = -1;
|
||||
|
||||
while (count < len)
|
||||
{
|
||||
// int l = input[idx].Length;
|
||||
string ln = input[idx];
|
||||
|
||||
int need = len-count-1;
|
||||
if (ln.Length > need)
|
||||
ln = ln.Substring(0, need);
|
||||
|
||||
output.Add(ln);
|
||||
count += ln.Length + 1;
|
||||
idx++;
|
||||
}
|
||||
|
||||
return output.ToArray();
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
words = input[idx].Split(' '); // count
|
||||
if (words[0] == "count")
|
||||
{
|
||||
int c = int.Parse(words[1]);
|
||||
if (c > 0)
|
||||
return new String[0];
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
return output.ToArray();
|
||||
}
|
||||
|
||||
public static bool IsCached(UUID assetID)
|
||||
{
|
||||
lock (m_Notecards)
|
||||
|
@ -10299,4 +10220,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -71,6 +71,8 @@ namespace OpenSim.Server.Base
|
|||
return m_Servers[port];
|
||||
|
||||
m_Servers[port] = new BaseHttpServer(port);
|
||||
|
||||
m_Log.InfoFormat("[SERVER]: Starting new HTTP server on port {0}", port);
|
||||
m_Servers[port].Start();
|
||||
|
||||
return m_Servers[port];
|
||||
|
@ -109,6 +111,7 @@ namespace OpenSim.Server.Base
|
|||
|
||||
protected override void Initialise()
|
||||
{
|
||||
m_Log.InfoFormat("[SERVER]: Starting HTTP server on port {0}", m_HttpServer.Port);
|
||||
m_HttpServer.Start();
|
||||
|
||||
if (MainConsole.Instance is RemoteConsole)
|
||||
|
|
BIN
bin/CSJ2K.dll
BIN
bin/CSJ2K.dll
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
|
@ -12,7 +12,7 @@
|
|||
<log4net>
|
||||
<appender name="Console" type="OpenSim.Framework.Console.OpenSimAppender, OpenSim.Framework.Console">
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date{HH:mm:ss} - %message" />
|
||||
<conversionPattern value="%date{HH:mm:ss,fff} - %message" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
|
|
|
@ -15,16 +15,12 @@
|
|||
;
|
||||
InventoryServerURI = "http://myinventoryserver.com:8003"
|
||||
|
||||
|
||||
[GridService]
|
||||
;
|
||||
; change this to your grid-wide grid server
|
||||
;
|
||||
GridServerURI = "http://mygridserver.com:8003"
|
||||
[Groups]
|
||||
;
|
||||
; change this to your grid-wide groups server
|
||||
;
|
||||
GroupsServerURI = "http://mygridserver.com:82/Grid/"
|
||||
|
||||
|
||||
[Modules]
|
||||
|
|
Loading…
Reference in New Issue