Merge branch 'dev' of ssh://island.sciencesim.com/home/sceneapi/sceneapi into sceneapi

dsg
Dan Lake 2011-03-21 15:22:52 -07:00
commit 71566e31c2
4 changed files with 12 additions and 103 deletions

View File

@ -505,12 +505,9 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
data[partTempID] = OSD.FromUUID(part.UUID); data[partTempID] = OSD.FromUUID(part.UUID);
partNum++; partNum++;
m_log.Debug("SendLinkObject to link " + part.ParentGroup.Name + "," + part.UUID + " with " + root.Name+","+root.UUID); m_log.DebugFormat("{0}: SendLinkObject to link {1},{2} with {3}, {4}", part.Name, part.UUID, root.Name, root.UUID);
} }
m_log.Debug(LogHeader + " to SendLinkObject to link " + children.Count + " parts to " + root.Name + "," + root.UUID);
//m_log.Debug("LinkedObject: "+sogxml);
SymmetricSyncMessage rsm = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.LinkObject, OSDParser.SerializeJsonString(data)); SymmetricSyncMessage rsm = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.LinkObject, OSDParser.SerializeJsonString(data));
//SendObjectUpdateToRelevantSyncConnectors(linkedGroup, rsm); //SendObjectUpdateToRelevantSyncConnectors(linkedGroup, rsm);
SendSceneEventToRelevantSyncConnectors(m_actorID, rsm, linkedGroup); SendSceneEventToRelevantSyncConnectors(m_actorID, rsm, linkedGroup);
@ -864,15 +861,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
//string sogGeneralBucketEncoding = GeneralBucketPropertiesEncoder(bucketName, sog, null); //string sogGeneralBucketEncoding = GeneralBucketPropertiesEncoder(bucketName, sog, null);
SymmetricSyncMessage syncMsg = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.UpdatedObject, sogGeneralBucketEncoding); SymmetricSyncMessage syncMsg = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.UpdatedObject, sogGeneralBucketEncoding);
//TEMP DEBUG
foreach (SceneObjectPart part in sog.Parts)
{
if (part.IsAttachment)
{
m_log.Debug(LogHeader + "PrimUpdatesGeneralBucketSender: part " + part.Name + "," + part.UUID + ", IsAttachment = true");
}
}
lock (m_stats) m_statSOGBucketOut++; lock (m_stats) m_statSOGBucketOut++;
//m_log.DebugFormat(LogHeader + " calling SendObjectUpdateToRelevantSyncConnectors for general bucket for sog {0},{1}", sog.Name, sog.UUID); //m_log.DebugFormat(LogHeader + " calling SendObjectUpdateToRelevantSyncConnectors for general bucket for sog {0},{1}", sog.Name, sog.UUID);
@ -921,13 +909,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
SymmetricSyncMessage syncMsg = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.UpdatedBucketProperties, OSDParser.SerializeJsonString(partData)); SymmetricSyncMessage syncMsg = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.UpdatedBucketProperties, OSDParser.SerializeJsonString(partData));
//m_log.DebugFormat("{0}: PhysBucketSender for {1}, pos={2}", LogHeader, updatedPart.UUID.ToString(), pa.Position.ToString()); //m_log.DebugFormat("{0}: PhysBucketSender for {1}, pos={2}", LogHeader, updatedPart.UUID.ToString(), pa.Position.ToString());
//TEMP DEBUG
if (updatedPart.IsAttachment)
{
m_log.Debug(LogHeader + "PrimUpdatesPhysicsBucketSender: part " + updatedPart.Name + "," + updatedPart.UUID + ", IsAttachment = true");
}
lock (m_stats) m_statPhysBucketOut++; lock (m_stats) m_statPhysBucketOut++;
SendObjectUpdateToRelevantSyncConnectors(updatedPart, syncMsg); SendObjectUpdateToRelevantSyncConnectors(updatedPart, syncMsg);
@ -1131,7 +1112,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
{ {
if (!syncConnectorsSent.Contains(connector.ConnectorNum)) if (!syncConnectorsSent.Contains(connector.ConnectorNum))
{ {
m_log.Debug(LogHeader + " send DeLinkObject to " + connector.Description); m_log.DebugFormat("{0}: send DeLinkObject to {1}", LogHeader, connector.Description);
connector.EnqueueOutgoingUpdate(sog.UUID, syncMsg.ToBytes()); connector.EnqueueOutgoingUpdate(sog.UUID, syncMsg.ToBytes());
syncConnectorsSent.Add(connector.ConnectorNum); syncConnectorsSent.Add(connector.ConnectorNum);
} }
@ -1293,8 +1274,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
//For now, we use configuration to access the information. Might be replaced by some Grid Service later on. //For now, we use configuration to access the information. Might be replaced by some Grid Service later on.
private RegionSyncListenerInfo GetLocalSyncListenerInfo() private RegionSyncListenerInfo GetLocalSyncListenerInfo()
{ {
m_log.Debug(LogHeader + ": Reading in " + m_scene.RegionInfo.RegionName + "_SyncListenerIPAddress" + " and " + m_scene.RegionInfo.RegionName + "_SyncListenerPort");
//string addr = m_sysConfig.GetString(m_scene.RegionInfo.RegionName+"_SyncListenerIPAddress", IPAddrUnknown); //string addr = m_sysConfig.GetString(m_scene.RegionInfo.RegionName+"_SyncListenerIPAddress", IPAddrUnknown);
//int port = m_sysConfig.GetInt(m_scene.RegionInfo.RegionName+"_SyncListenerPort", PortUnknown); //int port = m_sysConfig.GetInt(m_scene.RegionInfo.RegionName+"_SyncListenerPort", PortUnknown);
@ -1507,7 +1486,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
SceneObjectSerializer.WriteBucketSyncInfo(writer, bucketSyncInfoList); SceneObjectSerializer.WriteBucketSyncInfo(writer, bucketSyncInfoList);
string xmlString = sw.ToString(); string xmlString = sw.ToString();
m_log.Debug("Serialized xml string: " + xmlString); m_log.DebugFormat("Serialized xml string: {0}", xmlString);
//second, test de-serialization //second, test de-serialization
XmlTextReader reader = new XmlTextReader(new StringReader(xmlString)); XmlTextReader reader = new XmlTextReader(new StringReader(xmlString));
@ -1573,7 +1552,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
m_syncConnectors = newlist; m_syncConnectors = newlist;
} }
m_log.Debug("[REGION SYNC MODULE]: new connector " + syncConnector.ConnectorNum); m_log.DebugFormat("{0}: new connector {1}", LogHeader, syncConnector.ConnectorNum);
} }
public void RemoveSyncConnector(SyncConnector syncConnector) public void RemoveSyncConnector(SyncConnector syncConnector)
@ -1805,7 +1784,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
//set new terrain //set new terrain
m_scene.Heightmap.LoadFromXmlString(msgData); m_scene.Heightmap.LoadFromXmlString(msgData);
m_scene.RequestModuleInterface<ITerrainModule>().TaintTerrianBySynchronization(lastUpdateTimeStamp, lastUpdateActorID); ; m_scene.RequestModuleInterface<ITerrainModule>().TaintTerrianBySynchronization(lastUpdateTimeStamp, lastUpdateActorID); ;
m_log.Debug(LogHeader + ": Synchronized terrain"); m_log.DebugFormat("{0} : Synchronized terrain", LogHeader);
} }
private void HandleAddNewObject(SymmetricSyncMessage msg, string senderActorID) private void HandleAddNewObject(SymmetricSyncMessage msg, string senderActorID)
@ -1864,13 +1843,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
} }
else else
{ {
foreach (SceneObjectPart part in sog.Parts)
{
if (part.IsAttachment)
{
m_log.Debug(LogHeader + "HandleUpdateObjectBySynchronization: part " + part.Name + "," + part.UUID + ", IsAttachment = true");
}
}
//m_log.Debug(LogHeader + "HandleUpdateObjectBySynchronization: sog " + sog.Name + "," + sog.UUID); //m_log.Debug(LogHeader + "HandleUpdateObjectBySynchronization: sog " + sog.Name + "," + sog.UUID);
@ -1901,16 +1873,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
SceneObjectGroup sog = SceneObjectSerializer.FromXml2Format(sogxml); SceneObjectGroup sog = SceneObjectSerializer.FromXml2Format(sogxml);
lock (m_stats) m_statSOGBucketIn++; lock (m_stats) m_statSOGBucketIn++;
//SYNC DEBUG
/*
string partnames = "";
foreach (SceneObjectPart part in sog.Parts)
{
partnames += "(" + part.Name + ", " + part.UUID + ")";
}
m_log.Debug(LogHeader+" received "+msg.Type.ToString()+" from "+senderActorID+" about obj "+sog.Name+", "+sog.UUID);//+"; parts -- "+partnames);
* */
if (sog.IsDeleted) if (sog.IsDeleted)
{ {
@ -1919,13 +1881,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
} }
else else
{ {
foreach (SceneObjectPart part in sog.Parts)
{
if (part.IsAttachment)
{
m_log.Debug(LogHeader + "HandleAddOrUpdateObjectBySynchronization: part " + part.Name + "," + part.UUID + ", IsAttachment = true");
}
}
Scene.ObjectUpdateResult updateResult = m_scene.AddOrUpdateObjectBySynchronization(sog); Scene.ObjectUpdateResult updateResult = m_scene.AddOrUpdateObjectBySynchronization(sog);
@ -2008,21 +1963,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
data = null; data = null;
} }
return data; return data;
} }
/*
private void HandleAddNewObject(SceneObjectGroup sog)
{
//RegionSyncModule only add object to SceneGraph. Any actor specific actions will be implemented
//by each ActorSyncModule, which would be triggered its subcription to event SceneGraph.OnObjectCreate.
bool attachToBackup = false;
if (m_scene.AddNewSceneObject(sog, attachToBackup))
{
m_log.Debug(LogHeader + ": added obj " + sog.UUID);
}
}
* */
private void HandleRemovedObject(SymmetricSyncMessage msg, string senderActorID) private void HandleRemovedObject(SymmetricSyncMessage msg, string senderActorID)
{ {
@ -2053,12 +1994,12 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
{ {
if (!softDelete) if (!softDelete)
{ {
m_log.Debug(LogHeader + " hard delete object " + sog.UUID); m_log.DebugFormat("{0}: hard delete object {1}", LogHeader, sog.UUID);
m_scene.DeleteSceneObjectBySynchronization(sog); m_scene.DeleteSceneObjectBySynchronization(sog);
} }
else else
{ {
m_log.Debug(LogHeader + " soft delete object " + sog.UUID); m_log.DebugFormat("{0}: soft delete object {1}", LogHeader, sog.UUID);
m_scene.UnlinkSceneObject(sog, true); m_scene.UnlinkSceneObject(sog, true);
} }
} }
@ -2097,17 +2038,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
childrenIDs.Add(data[partTempID].AsUUID()); childrenIDs.Add(data[partTempID].AsUUID());
} }
m_log.Debug(LogHeader + " received LinkObject from " + senderActorID); m_log.DebugFormat("{0}: received LinkObject from {1}", LogHeader, senderActorID);
//m_log.Debug("LinkedObject: " + sogxml);
//TEMP DEBUG
foreach (SceneObjectPart part in linkedGroup.Parts)
{
if (part.IsAttachment)
{
m_log.Debug(LogHeader + "HandleLinkObject: part " + part.Name + "," + part.UUID + " IsAttachment = true in incoming sync message");
}
}
m_scene.LinkObjectBySync(linkedGroup, rootID, childrenIDs); m_scene.LinkObjectBySync(linkedGroup, rootID, childrenIDs);
@ -2237,7 +2168,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
/// <param name="data">OSDMap data of event args</param> /// <param name="data">OSDMap data of event args</param>
private void HandleRemoteEvent_OnNewScript(string actorID, ulong evSeqNum, OSDMap data) private void HandleRemoteEvent_OnNewScript(string actorID, ulong evSeqNum, OSDMap data)
{ {
m_log.Debug(LogHeader + ", " + m_actorID + ": received NewScript");
UUID agentID = data["agentID"].AsUUID(); UUID agentID = data["agentID"].AsUUID();
UUID primID = data["primID"].AsUUID(); UUID primID = data["primID"].AsUUID();
@ -2264,7 +2194,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
if (updateResult == Scene.ObjectUpdateResult.Updated || updateResult == Scene.ObjectUpdateResult.New) if (updateResult == Scene.ObjectUpdateResult.Updated || updateResult == Scene.ObjectUpdateResult.New)
{ {
m_log.Debug(LogHeader + ": TriggerNewScriptLocally");
//Next, trigger creating the new script //Next, trigger creating the new script
SceneObjectPart localPart = m_scene.GetSceneObjectPart(primID); SceneObjectPart localPart = m_scene.GetSceneObjectPart(primID);
m_scene.EventManager.TriggerNewScriptLocally(agentID, localPart, itemID); m_scene.EventManager.TriggerNewScriptLocally(agentID, localPart, itemID);
@ -2298,7 +2227,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
/// <param name="data">OSDMap data of event args</param> /// <param name="data">OSDMap data of event args</param>
private void HandleRemoteEvent_OnScriptReset(string actorID, ulong evSeqNum, OSDMap data) private void HandleRemoteEvent_OnScriptReset(string actorID, ulong evSeqNum, OSDMap data)
{ {
m_log.Debug(LogHeader + ", " + m_actorID + ": received ScriptReset"); //m_log.Debug(LogHeader + ", " + m_actorID + ": received ScriptReset");
UUID agentID = data["agentID"].AsUUID(); UUID agentID = data["agentID"].AsUUID();
UUID itemID = data["itemID"].AsUUID(); UUID itemID = data["itemID"].AsUUID();
@ -2567,7 +2496,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
/// <param name="part">the prim that contains the new script</param> /// <param name="part">the prim that contains the new script</param>
private void OnLocalNewScript(UUID clientID, SceneObjectPart part, UUID itemID) private void OnLocalNewScript(UUID clientID, SceneObjectPart part, UUID itemID)
{ {
m_log.Debug(LogHeader + " RegionSyncModule_OnLocalNewScript"); //m_log.Debug(LogHeader + " RegionSyncModule_OnLocalNewScript");
SceneObjectGroup sog = part.ParentGroup; SceneObjectGroup sog = part.ParentGroup;
if(sog==null){ if(sog==null){
@ -2596,7 +2525,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
/// <param name="newAssetID"></param> /// <param name="newAssetID"></param>
private void OnLocalUpdateScript(UUID agentID, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID) private void OnLocalUpdateScript(UUID agentID, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID)
{ {
m_log.Debug(LogHeader + " RegionSyncModule_OnUpdateScript"); //m_log.Debug(LogHeader + " RegionSyncModule_OnUpdateScript");
OSDMap data = new OSDMap(); OSDMap data = new OSDMap();
data["agentID"] = OSD.FromUUID(agentID); data["agentID"] = OSD.FromUUID(agentID);

View File

@ -2203,13 +2203,6 @@ namespace OpenSim.Region.Framework.Scenes
partnames += "(" + part.Name + ", " + part.UUID + ")"; partnames += "(" + part.Name + ", " + part.UUID + ")";
} }
m_log.DebugFormat("[SCENE] RezObject {0} with InvItem name {1} at pos {2} with parts {3}", group.UUID.ToString(), item.Name, group.RootPart.GroupPosition.ToString(), partnames); m_log.DebugFormat("[SCENE] RezObject {0} with InvItem name {1} at pos {2} with parts {3}", group.UUID.ToString(), item.Name, group.RootPart.GroupPosition.ToString(), partnames);
foreach (SceneObjectPart part in group.Parts)
{
if (part.IsAttachment)
{
m_log.Debug("[SCENE]: part " + part.Name + "," + part.UUID + ", IsAttachment = true");
}
}
// We can only call this after adding the scene object, since the scene object references the scene // We can only call this after adding the scene object, since the scene object references the scene
// to find out if scripts should be activated at all. // to find out if scripts should be activated at all.

View File

@ -832,14 +832,6 @@ namespace OpenSim.Region.Framework.Scenes
//Leverage the LinkObject implementation to get the book keeping of Group and Parts relations right //Leverage the LinkObject implementation to get the book keeping of Group and Parts relations right
m_sceneGraph.LinkObjectsBySync(root, children); m_sceneGraph.LinkObjectsBySync(root, children);
foreach (SceneObjectPart part in linkedGroup.Parts)
{
if (part.IsAttachment)
{
m_log.Debug("LinkObjectBySync: part " + part.Name + "," + part.UUID + " IsAttachment = true after linking");
}
}
//The properties of the newly linked object should be updated later with another UpdatedObject message. //The properties of the newly linked object should be updated later with another UpdatedObject message.

View File

@ -5496,11 +5496,6 @@ namespace OpenSim.Region.Framework.Scenes
// localPart.IsAttachment = updatedPart.IsAttachment; // localPart.IsAttachment = updatedPart.IsAttachment;
//} //}
if (localPart.IsAttachment)
{
m_log.Debug("GeneralBucketUpdateProcessor: part " + localPart.Name + "," + localPart.UUID + ", IsAttachment = true; previously, IsAttachment = " + preIsAttachment.ToString());
}
localPart.AggregateScriptEvents = updatedPart.AggregateScriptEvents; localPart.AggregateScriptEvents = updatedPart.AggregateScriptEvents;
aggregateScriptEventSubscriptions(); aggregateScriptEventSubscriptions();