aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authordiva2009-02-13 00:49:58 +0000
committerdiva2009-02-13 00:49:58 +0000
commita54758eef38e911fcdca1cf200e97f56d6bf5e8f (patch)
tree7524bf1bce0209a024ca013f84cc9e372e13aa1c
parentRemove extra ID field from asset DB mapping. Mantis #3122, fixes Mantis #3080. (diff)
downloadopensim-SC-a54758eef38e911fcdca1cf200e97f56d6bf5e8f.zip
opensim-SC-a54758eef38e911fcdca1cf200e97f56d6bf5e8f.tar.gz
opensim-SC-a54758eef38e911fcdca1cf200e97f56d6bf5e8f.tar.bz2
opensim-SC-a54758eef38e911fcdca1cf200e97f56d6bf5e8f.tar.xz
Bug fix in prim crossing: making it clear when the local object needs to be cloned (regions on the same instance) and when it doesn't (regions on different instances).
-rw-r--r--OpenSim/Region/CoreModules/Communications/Local/LocalInterregionComms.cs15
-rw-r--r--OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs6
-rw-r--r--OpenSim/Region/Framework/Interfaces/IInterregionComms.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
4 files changed, 17 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Communications/Local/LocalInterregionComms.cs b/OpenSim/Region/CoreModules/Communications/Local/LocalInterregionComms.cs
index 48f737e..6e813f4 100644
--- a/OpenSim/Region/CoreModules/Communications/Local/LocalInterregionComms.cs
+++ b/OpenSim/Region/CoreModules/Communications/Local/LocalInterregionComms.cs
@@ -204,15 +204,24 @@ namespace OpenSim.Region.CoreModules.Communications.Local
204 * Object-related communications 204 * Object-related communications
205 */ 205 */
206 206
207 public bool SendCreateObject(ulong regionHandle, ISceneObject sog) 207 public bool SendCreateObject(ulong regionHandle, ISceneObject sog, bool isLocalCall)
208 { 208 {
209 foreach (Scene s in m_sceneList) 209 foreach (Scene s in m_sceneList)
210 { 210 {
211 if (s.RegionInfo.RegionHandle == regionHandle) 211 if (s.RegionInfo.RegionHandle == regionHandle)
212 { 212 {
213 //m_log.Debug("[LOCAL COMMS]: Found region to SendCreateObject"); 213 //m_log.Debug("[LOCAL COMMS]: Found region to SendCreateObject");
214 ISceneObject sogClone = sog.CloneForNewScene(); 214 if (isLocalCall)
215 return s.IncomingCreateObject(sogClone); 215 {
216 // We need to make a local copy of the object
217 ISceneObject sogClone = sog.CloneForNewScene();
218 return s.IncomingCreateObject(sogClone);
219 }
220 else
221 {
222 // Use the object as it came through the wire
223 return s.IncomingCreateObject(sog);
224 }
216 } 225 }
217 } 226 }
218 return false; 227 return false;
diff --git a/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs
index afc3441..f533553 100644
--- a/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs
+++ b/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs
@@ -214,10 +214,10 @@ namespace OpenSim.Region.CoreModules.Communications.REST
214 * Object-related communications 214 * Object-related communications
215 */ 215 */
216 216
217 public bool SendCreateObject(ulong regionHandle, ISceneObject sog) 217 public bool SendCreateObject(ulong regionHandle, ISceneObject sog, bool isLocalCall)
218 { 218 {
219 // Try local first 219 // Try local first
220 if (m_localBackend.SendCreateObject(regionHandle, sog)) 220 if (m_localBackend.SendCreateObject(regionHandle, sog, true))
221 { 221 {
222 //m_log.Debug("[REST COMMS]: LocalBackEnd SendCreateObject succeeded"); 222 //m_log.Debug("[REST COMMS]: LocalBackEnd SendCreateObject succeeded");
223 return true; 223 return true;
@@ -865,7 +865,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
865 } 865 }
866 } 866 }
867 // This is the meaning of POST object 867 // This is the meaning of POST object
868 bool result = m_localBackend.SendCreateObject(regionhandle, sog); 868 bool result = m_localBackend.SendCreateObject(regionhandle, sog, false);
869 869
870 responsedata["int_response_code"] = 200; 870 responsedata["int_response_code"] = 200;
871 responsedata["str_response_string"] = result.ToString(); 871 responsedata["str_response_string"] = result.ToString();
diff --git a/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs b/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs
index 06ef1aa..d3f44bb 100644
--- a/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs
+++ b/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Framework.Interfaces
70 /// <returns></returns> 70 /// <returns></returns>
71 bool SendCloseAgent(ulong regionHandle, UUID id); 71 bool SendCloseAgent(ulong regionHandle, UUID id);
72 72
73 bool SendCreateObject(ulong regionHandle, ISceneObject sog); 73 bool SendCreateObject(ulong regionHandle, ISceneObject sog, bool isLocalCall);
74 74
75 } 75 }
76 76
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 30b44b1..ffe0b81 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2028,7 +2028,7 @@ namespace OpenSim.Region.Framework.Scenes
2028 2028
2029 // And the new channel... 2029 // And the new channel...
2030 if (m_interregionCommsOut != null) 2030 if (m_interregionCommsOut != null)
2031 successYN = m_interregionCommsOut.SendCreateObject(newRegionHandle, grp); 2031 successYN = m_interregionCommsOut.SendCreateObject(newRegionHandle, grp, true);
2032 2032
2033 if (successYN) 2033 if (successYN)
2034 { 2034 {