diff options
author | Justin Clark-Casey (justincc) | 2015-01-13 19:27:29 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2015-01-13 19:27:29 +0000 |
commit | 55e081548c73988d3d0f7a438dd2c822dde20ed9 (patch) | |
tree | bade530d573f74bb3dd5086664f487f4d8f15c43 /OpenSim/Region/ClientStack/Linden | |
parent | Remove misstaken quotes from column selection in PGSQLUserProfilesData.GetUse... (diff) | |
download | opensim-SC-55e081548c73988d3d0f7a438dd2c822dde20ed9.zip opensim-SC-55e081548c73988d3d0f7a438dd2c822dde20ed9.tar.gz opensim-SC-55e081548c73988d3d0f7a438dd2c822dde20ed9.tar.bz2 opensim-SC-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)
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 8 |
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; |