aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Estate
diff options
context:
space:
mode:
authorRobert Adams2013-10-16 07:53:44 -0700
committerRobert Adams2013-10-16 07:53:44 -0700
commit8937a2244d65ea71c402777bb68a986f60982e07 (patch)
tree03601074b85b0c41ff15f5155a4b14c197954450 /OpenSim/Region/CoreModules/World/Estate
parentvarregion: move the compressed heighmap compression factor from (diff)
parentBulletSim: implement the SL bug where VEHICLE_HOVER_UP_ONLY disables (diff)
downloadopensim-SC-8937a2244d65ea71c402777bb68a986f60982e07.zip
opensim-SC-8937a2244d65ea71c402777bb68a986f60982e07.tar.gz
opensim-SC-8937a2244d65ea71c402777bb68a986f60982e07.tar.bz2
opensim-SC-8937a2244d65ea71c402777bb68a986f60982e07.tar.xz
Merge branch 'master' into varregion
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Estate')
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs47
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateTerrainXferHandler.cs6
2 files changed, 31 insertions, 22 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index 42db1cf..17387da 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -829,26 +829,23 @@ namespace OpenSim.Region.CoreModules.World.Estate
829 829
830 private void AbortTerrainXferHandler(IClientAPI remoteClient, ulong XferID) 830 private void AbortTerrainXferHandler(IClientAPI remoteClient, ulong XferID)
831 { 831 {
832 if (TerrainUploader != null) 832 lock (this)
833 { 833 {
834 lock (TerrainUploader) 834 if ((TerrainUploader != null) && (XferID == TerrainUploader.XferID))
835 { 835 {
836 if (XferID == TerrainUploader.XferID) 836 remoteClient.OnXferReceive -= TerrainUploader.XferReceive;
837 { 837 remoteClient.OnAbortXfer -= AbortTerrainXferHandler;
838 remoteClient.OnXferReceive -= TerrainUploader.XferReceive; 838 TerrainUploader.TerrainUploadDone -= HandleTerrainApplication;
839 remoteClient.OnAbortXfer -= AbortTerrainXferHandler;
840 TerrainUploader.TerrainUploadDone -= HandleTerrainApplication;
841 839
842 TerrainUploader = null; 840 TerrainUploader = null;
843 remoteClient.SendAlertMessage("Terrain Upload aborted by the client"); 841 remoteClient.SendAlertMessage("Terrain Upload aborted by the client");
844 }
845 } 842 }
846 } 843 }
847
848 } 844 }
845
849 private void HandleTerrainApplication(string filename, byte[] terrainData, IClientAPI remoteClient) 846 private void HandleTerrainApplication(string filename, byte[] terrainData, IClientAPI remoteClient)
850 { 847 {
851 lock (TerrainUploader) 848 lock (this)
852 { 849 {
853 remoteClient.OnXferReceive -= TerrainUploader.XferReceive; 850 remoteClient.OnXferReceive -= TerrainUploader.XferReceive;
854 remoteClient.OnAbortXfer -= AbortTerrainXferHandler; 851 remoteClient.OnAbortXfer -= AbortTerrainXferHandler;
@@ -907,22 +904,32 @@ namespace OpenSim.Region.CoreModules.World.Estate
907 904
908 private void handleUploadTerrain(IClientAPI remote_client, string clientFileName) 905 private void handleUploadTerrain(IClientAPI remote_client, string clientFileName)
909 { 906 {
910 if (TerrainUploader == null) 907 lock (this)
911 { 908 {
912 909 if (TerrainUploader == null)
913 TerrainUploader = new EstateTerrainXferHandler(remote_client, clientFileName);
914 lock (TerrainUploader)
915 { 910 {
911 m_log.DebugFormat("Starting to receive uploaded terrain");
912 TerrainUploader = new EstateTerrainXferHandler(remote_client, clientFileName);
916 remote_client.OnXferReceive += TerrainUploader.XferReceive; 913 remote_client.OnXferReceive += TerrainUploader.XferReceive;
917 remote_client.OnAbortXfer += AbortTerrainXferHandler; 914 remote_client.OnAbortXfer += AbortTerrainXferHandler;
918 TerrainUploader.TerrainUploadDone += HandleTerrainApplication; 915 TerrainUploader.TerrainUploadDone += HandleTerrainApplication;
916 TerrainUploader.RequestStartXfer(remote_client);
917 }
918 else
919 {
920 remote_client.SendAlertMessage("Another Terrain Upload is in progress. Please wait your turn!");
919 } 921 }
920 TerrainUploader.RequestStartXfer(remote_client);
921
922 } 922 }
923 else 923 }
924
925 public bool IsTerrainXfer(ulong xferID)
926 {
927 lock (this)
924 { 928 {
925 remote_client.SendAlertMessage("Another Terrain Upload is in progress. Please wait your turn!"); 929 if (TerrainUploader == null)
930 return false;
931 else
932 return TerrainUploader.XferID == xferID;
926 } 933 }
927 } 934 }
928 935
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateTerrainXferHandler.cs b/OpenSim/Region/CoreModules/World/Estate/EstateTerrainXferHandler.cs
index b8d8b10..2d74eaf 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateTerrainXferHandler.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateTerrainXferHandler.cs
@@ -78,7 +78,10 @@ namespace OpenSim.Region.CoreModules.World.Estate
78 /// <param name="data"></param> 78 /// <param name="data"></param>
79 public void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data) 79 public void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data)
80 { 80 {
81 if (mXferID == xferID) 81 if (mXferID != xferID)
82 return;
83
84 lock (this)
82 { 85 {
83 if (m_asset.Data.Length > 1) 86 if (m_asset.Data.Length > 1)
84 { 87 {
@@ -99,7 +102,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
99 if ((packetID & 0x80000000) != 0) 102 if ((packetID & 0x80000000) != 0)
100 { 103 {
101 SendCompleteMessage(remoteClient); 104 SendCompleteMessage(remoteClient);
102
103 } 105 }
104 } 106 }
105 } 107 }