aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2015-01-13 19:27:29 +0000
committerJustin Clark-Casey (justincc)2015-01-13 19:27:29 +0000
commit55e081548c73988d3d0f7a438dd2c822dde20ed9 (patch)
treebade530d573f74bb3dd5086664f487f4d8f15c43
parentRemove misstaken quotes from column selection in PGSQLUserProfilesData.GetUse... (diff)
downloadopensim-SC_OLD-55e081548c73988d3d0f7a438dd2c822dde20ed9.zip
opensim-SC_OLD-55e081548c73988d3d0f7a438dd2c822dde20ed9.tar.gz
opensim-SC_OLD-55e081548c73988d3d0f7a438dd2c822dde20ed9.tar.bz2
opensim-SC_OLD-55e081548c73988d3d0f7a438dd2c822dde20ed9.tar.xz
Fix bug where gathering the clientstack..OutgoingPacketsQueuedCount stat would fail with a casting exception for scenes with NPCs
Present since 51eb8fa (Oct 2 2014)
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 7bd16e6..4fec91f 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -770,8 +770,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
770 770
771 foreach (ScenePresence sp in Scene.GetScenePresences()) 771 foreach (ScenePresence sp in Scene.GetScenePresences())
772 { 772 {
773 LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient; 773 // XXX: Need a better way to determine which IClientAPIs have UDPClients (NPCs do not, for instance).
774 total += udpClient.GetTotalPacketsQueuedCount(); 774 if (sp.ControllingClient is LLClientView)
775 {
776 LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
777 total += udpClient.GetTotalPacketsQueuedCount();
778 }
775 } 779 }
776 780
777 return total; 781 return total;