aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/ClientManager.cs3
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetTransactions.cs17
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs12
-rw-r--r--OpenSim/Region/ClientStack/PacketServer.cs12
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs5
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs2
6 files changed, 39 insertions, 12 deletions
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs
index 6843dce..064b82d 100644
--- a/OpenSim/Framework/ClientManager.cs
+++ b/OpenSim/Framework/ClientManager.cs
@@ -26,6 +26,7 @@
26* 26*
27*/ 27*/
28 28
29using System;
29using System.Collections.Generic; 30using System.Collections.Generic;
30using libsecondlife; 31using libsecondlife;
31using libsecondlife.Packets; 32using libsecondlife.Packets;
@@ -70,7 +71,9 @@ namespace OpenSim.Framework
70 71
71 public void Remove(uint id) 72 public void Remove(uint id)
72 { 73 {
74 //m_log.Info(String.Format("[CLIENT]: Removing client with code {0}, current count {1}", id, m_clients.Count));
73 m_clients.Remove(id); 75 m_clients.Remove(id);
76 m_log.Info(String.Format("[CLIENT]: Removed client with code {0}, new client count {1}", id, m_clients.Count));
74 } 77 }
75 78
76 public void Add(uint id, IClientAPI client) 79 public void Add(uint id, IClientAPI client)
diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs
index d09e343..4a75f52 100644
--- a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs
@@ -103,12 +103,22 @@ namespace OpenSim.Framework.Communications.Cache
103 } 103 }
104 } 104 }
105 105
106 /// <summary>
107 /// Get an uploaded asset. If the data is successfully retrieved, the transaction will be removed.
108 /// </summary>
109 /// <param name="transactionID"></param>
110 /// <returns>The asset if the upload has completed, null if it has not.</returns>
106 public AssetBase GetTransactionAsset(LLUUID transactionID) 111 public AssetBase GetTransactionAsset(LLUUID transactionID)
107 { 112 {
108 if (XferUploaders.ContainsKey(transactionID)) 113 if (XferUploaders.ContainsKey(transactionID))
109 { 114 {
110 return XferUploaders[transactionID].GetAssetData(); 115 AssetXferUploader uploader = XferUploaders[transactionID];
116 AssetBase asset = uploader.GetAssetData();
117 XferUploaders.Remove(transactionID);
118
119 return asset;
111 } 120 }
121
112 return null; 122 return null;
113 } 123 }
114 124
@@ -237,6 +247,7 @@ namespace OpenSim.Framework.Communications.Cache
237 SaveAssetToFile(filename, Asset.Data); 247 SaveAssetToFile(filename, Asset.Data);
238 } 248 }
239 } 249 }
250
240 ///Left this in and commented in case there are unforseen issues 251 ///Left this in and commented in case there are unforseen issues
241 //private void SaveAssetToFile(string filename, byte[] data) 252 //private void SaveAssetToFile(string filename, byte[] data)
242 //{ 253 //{
@@ -311,10 +322,6 @@ namespace OpenSim.Framework.Communications.Cache
311 } 322 }
312 } 323 }
313 324
314 public void UpdateInventoryItem(LLUUID itemID)
315 {
316 }
317
318 public AssetBase GetAssetData() 325 public AssetBase GetAssetData()
319 { 326 {
320 if (m_finished) 327 if (m_finished)
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 363688f..6f25191 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.ClientStack
53 { 53 {
54 ~ClientView() 54 ~ClientView()
55 { 55 {
56 m_log.Info("[CLIENTVIEW]: Dstructor called"); 56 System.Console.WriteLine("[CLIENTVIEW]: Destructor called");
57 } 57 }
58 58
59 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 59 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@@ -237,6 +237,10 @@ namespace OpenSim.Region.ClientStack
237 private void CloseCleanup() 237 private void CloseCleanup()
238 { 238 {
239 m_scene.RemoveClient(AgentId); 239 m_scene.RemoveClient(AgentId);
240
241 //m_log.Info(String.Format("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false)));
242 //m_log.Info(String.Format("[CLIENTVIEW] Memory post GC {0}", System.GC.GetTotalMemory(true)));
243
240 // Send the STOP packet 244 // Send the STOP packet
241 DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator); 245 DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator);
242 OutPacket(disable, ThrottleOutPacketType.Task); 246 OutPacket(disable, ThrottleOutPacketType.Task);
@@ -264,6 +268,11 @@ namespace OpenSim.Region.ClientStack
264 m_clientThread.Abort(); 268 m_clientThread.Abort();
265 } 269 }
266 270
271 /// <summary>
272 /// Close down the client view. This *must* be the last method called, since the last #
273 /// statement of CloseCleanup() aborts the thread.
274 /// </summary>
275 /// <param name="ShutdownCircult"></param>
267 public void Close(bool ShutdownCircult) 276 public void Close(bool ShutdownCircult)
268 { 277 {
269 // Pull Client out of Region 278 // Pull Client out of Region
@@ -273,7 +282,6 @@ namespace OpenSim.Region.ClientStack
273 if (ShutdownCircult) 282 if (ShutdownCircult)
274 OnConnectionClosed(this); 283 OnConnectionClosed(this);
275 284
276
277 CloseCleanup(); 285 CloseCleanup();
278 } 286 }
279 287
diff --git a/OpenSim/Region/ClientStack/PacketServer.cs b/OpenSim/Region/ClientStack/PacketServer.cs
index 9608ce5..7036de93 100644
--- a/OpenSim/Region/ClientStack/PacketServer.cs
+++ b/OpenSim/Region/ClientStack/PacketServer.cs
@@ -25,6 +25,8 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28
29using System;
28using System.Net; 30using System.Net;
29using System.Net.Sockets; 31using System.Net.Sockets;
30using libsecondlife; 32using libsecondlife;
@@ -133,13 +135,17 @@ namespace OpenSim.Region.ClientStack
133 //m_scene.ClientManager.CloseAllAgents(circuitcode); 135 //m_scene.ClientManager.CloseAllAgents(circuitcode);
134 } 136 }
135 137
138 /// <summary>
139 /// Completely close down the given client.
140 /// </summary>
141 /// <param name="client"></param>
136 public virtual void CloseClient(IClientAPI client) 142 public virtual void CloseClient(IClientAPI client)
137 { 143 {
138 //m_log.Info("PacketServer:CloseClient()"); 144 m_log.Info("PacketServer:CloseClient()");
139 145
140 CloseCircuit(client.CircuitCode); 146 CloseCircuit(client.CircuitCode);
147 m_scene.ClientManager.Remove(client.CircuitCode);
141 client.Close(false); 148 client.Close(false);
142 m_scene.ClientManager.Remove(client.CircuitCode);
143 } 149 }
144 } 150 }
145} 151}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 3480530..3fafaf4 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1445,7 +1445,10 @@ namespace OpenSim.Region.Environment.Scenes
1445 } 1445 }
1446 1446
1447 // Remove client agent from profile, so new logins will work 1447 // Remove client agent from profile, so new logins will work
1448 CommsManager.UserService.clearUserAgent(agentID); 1448 CommsManager.UserService.clearUserAgent(agentID);
1449
1450 //m_log.Info(String.Format("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false)));
1451 //m_log.Info(String.Format("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)));
1449 } 1452 }
1450 1453
1451 public override void CloseAllAgents(uint circuitcode) 1454 public override void CloseAllAgents(uint circuitcode)
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 6fae71b..1b9e154 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Scenes
41 { 41 {
42 ~ScenePresence() 42 ~ScenePresence()
43 { 43 {
44 m_log.Info("[ScenePresence] Destructor called"); 44 System.Console.WriteLine("[ScenePresence] Destructor called");
45 } 45 }
46 46
47 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 47 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);