diff options
author | lbsa71 | 2008-07-21 10:02:55 +0000 |
---|---|---|
committer | lbsa71 | 2008-07-21 10:02:55 +0000 |
commit | 9dbb6f28bc7e91b4643d2e80e2182f273d7e9121 (patch) | |
tree | 07f3101eeac8c7bd9970317b513d20d54a986870 | |
parent | some optimizations in quaternion normalization in llRot2Fwd, llRot2Left, and ... (diff) | |
download | opensim-SC_OLD-9dbb6f28bc7e91b4643d2e80e2182f273d7e9121.zip opensim-SC_OLD-9dbb6f28bc7e91b4643d2e80e2182f273d7e9121.tar.gz opensim-SC_OLD-9dbb6f28bc7e91b4643d2e80e2182f273d7e9121.tar.bz2 opensim-SC_OLD-9dbb6f28bc7e91b4643d2e80e2182f273d7e9121.tar.xz |
* eliminated some warnings and added some const and readonlies
* refactored some member names for readability and ccc (code convention conformance)
* took away two refs from Rest.Inventory since
* System.IO is part of System
* System.Xml.Serialization is part of System.Xml
-rw-r--r-- | OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLPacketThrottle.cs | 42 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 2 | ||||
-rw-r--r-- | prebuild.xml | 2 |
5 files changed, 24 insertions, 26 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs index c351272..9a1f628 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs | |||
@@ -441,7 +441,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
441 | 441 | ||
442 | // Preserves the original handler's semantics | 442 | // Preserves the original handler's semantics |
443 | 443 | ||
444 | public new void AddStreamHandler(string httpMethod, string path, RestMethod method) | 444 | public void AddStreamHandler(string httpMethod, string path, RestMethod method) |
445 | { | 445 | { |
446 | 446 | ||
447 | if (!IsEnabled) | 447 | if (!IsEnabled) |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs index 5983454..2a3f2e1 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
40 | //private static readonly log4net.ILog m_log | 40 | //private static readonly log4net.ILog m_log |
41 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 41 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
42 | 42 | ||
43 | private LLClientStackNetworkHandler m_networkHandler; | 43 | private readonly LLClientStackNetworkHandler m_networkHandler; |
44 | private IScene m_scene; | 44 | private IScene m_scene; |
45 | 45 | ||
46 | //private readonly ClientManager m_clientManager = new ClientManager(); | 46 | //private readonly ClientManager m_clientManager = new ClientManager(); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketThrottle.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketThrottle.cs index cd5ff7e..b9f4594 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketThrottle.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketThrottle.cs | |||
@@ -29,63 +29,63 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
29 | { | 29 | { |
30 | public class LLPacketThrottle | 30 | public class LLPacketThrottle |
31 | { | 31 | { |
32 | private int max; // max allowable throttle | 32 | private readonly int m_maxAllowableThrottle; |
33 | private int min; // min allowable throttle | 33 | private readonly int m_minAllowableThrottle; |
34 | private int throttle; // current throttle setting | 34 | private int m_currentThrottle; |
35 | private static int divisor = 7; // the throttle time divisor, this probably should factor out | 35 | private const int m_throttleTimeDivisor = 7; |
36 | private int sent; // current number of bytes sent | 36 | private int m_currentBytesSent; |
37 | 37 | ||
38 | public LLPacketThrottle(int Min, int Max, int Throttle) | 38 | public LLPacketThrottle(int Min, int Max, int Throttle) |
39 | { | 39 | { |
40 | max = Max; | 40 | m_maxAllowableThrottle = Max; |
41 | min = Min; | 41 | m_minAllowableThrottle = Min; |
42 | throttle = Throttle; | 42 | m_currentThrottle = Throttle; |
43 | sent = 0; | 43 | m_currentBytesSent = 0; |
44 | } | 44 | } |
45 | 45 | ||
46 | public void Reset() | 46 | public void Reset() |
47 | { | 47 | { |
48 | sent = 0; | 48 | m_currentBytesSent = 0; |
49 | } | 49 | } |
50 | 50 | ||
51 | public bool UnderLimit() | 51 | public bool UnderLimit() |
52 | { | 52 | { |
53 | return (sent < (throttle/divisor)); | 53 | return (m_currentBytesSent < (m_currentThrottle/m_throttleTimeDivisor)); |
54 | } | 54 | } |
55 | 55 | ||
56 | public int Add(int bytes) | 56 | public int Add(int bytes) |
57 | { | 57 | { |
58 | sent += bytes; | 58 | m_currentBytesSent += bytes; |
59 | return sent; | 59 | return m_currentBytesSent; |
60 | } | 60 | } |
61 | 61 | ||
62 | // Properties | 62 | // Properties |
63 | public int Max | 63 | public int Max |
64 | { | 64 | { |
65 | get { return max; } | 65 | get { return m_maxAllowableThrottle; } |
66 | } | 66 | } |
67 | 67 | ||
68 | public int Min | 68 | public int Min |
69 | { | 69 | { |
70 | get { return min; } | 70 | get { return m_minAllowableThrottle; } |
71 | } | 71 | } |
72 | 72 | ||
73 | public int Throttle | 73 | public int Throttle |
74 | { | 74 | { |
75 | get { return throttle; } | 75 | get { return m_currentThrottle; } |
76 | set | 76 | set |
77 | { | 77 | { |
78 | if (value > max) | 78 | if (value > m_maxAllowableThrottle) |
79 | { | 79 | { |
80 | throttle = max; | 80 | m_currentThrottle = m_maxAllowableThrottle; |
81 | } | 81 | } |
82 | else if (value < min) | 82 | else if (value < m_minAllowableThrottle) |
83 | { | 83 | { |
84 | throttle = min; | 84 | m_currentThrottle = m_minAllowableThrottle; |
85 | } | 85 | } |
86 | else | 86 | else |
87 | { | 87 | { |
88 | throttle = value; | 88 | m_currentThrottle = value; |
89 | } | 89 | } |
90 | } | 90 | } |
91 | } | 91 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index edccbe5..156310b 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -921,7 +921,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
921 | } | 921 | } |
922 | 922 | ||
923 | [XmlIgnore] | 923 | [XmlIgnore] |
924 | public LLUUID RegionID | 924 | public virtual LLUUID RegionID |
925 | { | 925 | { |
926 | get { return ParentGroup.Scene.RegionInfo.RegionID; } | 926 | get { return ParentGroup.Scene.RegionInfo.RegionID; } |
927 | set {} // read only | 927 | set {} // read only |
diff --git a/prebuild.xml b/prebuild.xml index 97f9394..513b419 100644 --- a/prebuild.xml +++ b/prebuild.xml | |||
@@ -1189,9 +1189,7 @@ | |||
1189 | <ReferencePath>../../../../bin/</ReferencePath> | 1189 | <ReferencePath>../../../../bin/</ReferencePath> |
1190 | <Reference name="Mono.Addins.dll" /> | 1190 | <Reference name="Mono.Addins.dll" /> |
1191 | <Reference name="System"/> | 1191 | <Reference name="System"/> |
1192 | <Reference name="System.IO"/> | ||
1193 | <Reference name="System.Xml"/> | 1192 | <Reference name="System.Xml"/> |
1194 | <Reference name="System.Xml.Serialization"/> | ||
1195 | <Reference name="libsecondlife.dll" /> | 1193 | <Reference name="libsecondlife.dll" /> |
1196 | <Reference name="Nini.dll" /> | 1194 | <Reference name="Nini.dll" /> |
1197 | <Reference name="XMLRPC.dll" /> | 1195 | <Reference name="XMLRPC.dll" /> |