diff options
Diffstat (limited to 'OpenSim')
10 files changed, 71 insertions, 62 deletions
diff --git a/OpenSim/Capabilities/Caps.cs b/OpenSim/Capabilities/Caps.cs index 82ecd55..9931934 100644 --- a/OpenSim/Capabilities/Caps.cs +++ b/OpenSim/Capabilities/Caps.cs | |||
@@ -119,6 +119,17 @@ namespace OpenSim.Framework.Capabilities | |||
119 | get { return m_externalCapsHandlers; } | 119 | get { return m_externalCapsHandlers; } |
120 | } | 120 | } |
121 | 121 | ||
122 | [Flags] | ||
123 | public enum CapsFlags:uint | ||
124 | { | ||
125 | None = 0, | ||
126 | SentSeeds = 1, | ||
127 | |||
128 | ObjectAnim = 0x10 | ||
129 | } | ||
130 | |||
131 | public CapsFlags Flags { get; set;} | ||
132 | |||
122 | public Caps(IHttpServer httpServer, string httpListen, uint httpPort, string capsPath, | 133 | public Caps(IHttpServer httpServer, string httpListen, uint httpPort, string capsPath, |
123 | UUID agent, string regionName) | 134 | UUID agent, string regionName) |
124 | { | 135 | { |
@@ -138,12 +149,18 @@ namespace OpenSim.Framework.Capabilities | |||
138 | m_agentID = agent; | 149 | m_agentID = agent; |
139 | m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort); | 150 | m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort); |
140 | m_regionName = regionName; | 151 | m_regionName = regionName; |
152 | Flags = CapsFlags.None; | ||
141 | m_capsActive.Reset(); | 153 | m_capsActive.Reset(); |
142 | } | 154 | } |
143 | 155 | ||
144 | ~Caps() | 156 | ~Caps() |
145 | { | 157 | { |
146 | m_capsActive.Dispose(); | 158 | Flags = CapsFlags.None; |
159 | if (m_capsActive!= null) | ||
160 | { | ||
161 | m_capsActive.Dispose(); | ||
162 | m_capsActive = null; | ||
163 | } | ||
147 | } | 164 | } |
148 | 165 | ||
149 | /// <summary> | 166 | /// <summary> |
@@ -262,6 +279,7 @@ namespace OpenSim.Framework.Capabilities | |||
262 | caps[kvp.Key] = kvp.Value; | 279 | caps[kvp.Key] = kvp.Value; |
263 | } | 280 | } |
264 | 281 | ||
282 | Flags |= CapsFlags.SentSeeds; | ||
265 | return caps; | 283 | return caps; |
266 | } | 284 | } |
267 | 285 | ||
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 8f7d49c..d1f5378 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -710,7 +710,7 @@ namespace OpenSim.Framework | |||
710 | Vector3 StartPos { get; set; } | 710 | Vector3 StartPos { get; set; } |
711 | 711 | ||
712 | UUID AgentId { get; } | 712 | UUID AgentId { get; } |
713 | bool DoObjectAnimations { get; set; } | 713 | bool SupportObjectAnimations { get; set; } |
714 | 714 | ||
715 | /// <summary> | 715 | /// <summary> |
716 | /// The scene agent for this client. This will only be set if the client has an agent in a scene (i.e. if it | 716 | /// The scene agent for this client. This will only be set if the client has an agent in a scene (i.e. if it |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index f54c5f5..92f5a2c 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -374,7 +374,12 @@ namespace OpenSim.Region.ClientStack.Linden | |||
374 | List<string> validCaps = new List<string>(); | 374 | List<string> validCaps = new List<string>(); |
375 | 375 | ||
376 | foreach (OSD c in capsRequested) | 376 | foreach (OSD c in capsRequested) |
377 | validCaps.Add(c.AsString()); | 377 | { |
378 | string cstr = c.AsString(); | ||
379 | if(cstr == "ObjectAnimation") | ||
380 | m_HostCapsObj.Flags |= Caps.CapsFlags.ObjectAnim; | ||
381 | validCaps.Add(cstr); | ||
382 | } | ||
378 | 383 | ||
379 | string result = LLSDHelpers.SerialiseLLSDReply(m_HostCapsObj.GetCapsDetails(true, validCaps)); | 384 | string result = LLSDHelpers.SerialiseLLSDReply(m_HostCapsObj.GetCapsDetails(true, validCaps)); |
380 | 385 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 7866997..34e3a43 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -351,7 +351,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
351 | #pragma warning restore 0414 | 351 | #pragma warning restore 0414 |
352 | private const uint MaxTransferBytesPerPacket = 600; | 352 | private const uint MaxTransferBytesPerPacket = 600; |
353 | 353 | ||
354 | public bool DoObjectAnimations { get; set; } | 354 | public bool SupportObjectAnimations { get; set; } |
355 | 355 | ||
356 | /// <value> | 356 | /// <value> |
357 | /// Maintain a record of all the objects killed. This allows us to stop an update being sent from the | 357 | /// Maintain a record of all the objects killed. This allows us to stop an update being sent from the |
@@ -3917,7 +3917,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3917 | public void SendObjectAnimations(UUID[] animations, int[] seqs, UUID senderId) | 3917 | public void SendObjectAnimations(UUID[] animations, int[] seqs, UUID senderId) |
3918 | { | 3918 | { |
3919 | // m_log.DebugFormat("[LLCLIENTVIEW]: Sending Object animations for {0} to {1}", sourceAgentId, Name); | 3919 | // m_log.DebugFormat("[LLCLIENTVIEW]: Sending Object animations for {0} to {1}", sourceAgentId, Name); |
3920 | if(!DoObjectAnimations) | 3920 | if(!SupportObjectAnimations) |
3921 | return; | 3921 | return; |
3922 | 3922 | ||
3923 | ObjectAnimationPacket ani = (ObjectAnimationPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAnimation); | 3923 | ObjectAnimationPacket ani = (ObjectAnimationPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAnimation); |
@@ -4330,7 +4330,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4330 | 4330 | ||
4331 | if (update.Entity is SceneObjectPart) | 4331 | if (update.Entity is SceneObjectPart) |
4332 | { | 4332 | { |
4333 | if (DoObjectAnimations && updateFlags.HasFlag(PrimUpdateFlags.Animations)) | 4333 | if (SupportObjectAnimations && updateFlags.HasFlag(PrimUpdateFlags.Animations)) |
4334 | { | 4334 | { |
4335 | SceneObjectPart sop = (SceneObjectPart)update.Entity; | 4335 | SceneObjectPart sop = (SceneObjectPart)update.Entity; |
4336 | if ( sop.Animations != null) | 4336 | if ( sop.Animations != null) |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index afa1e4c..667acf9 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -1919,38 +1919,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1919 | uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo) | 1919 | uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo) |
1920 | { | 1920 | { |
1921 | IClientAPI client = null; | 1921 | IClientAPI client = null; |
1922 | bool createNew = false; | ||
1923 | 1922 | ||
1924 | // We currently synchronize this code across the whole scene to avoid issues such as | 1923 | // We currently synchronize this code across the whole scene to avoid issues such as |
1925 | // http://opensimulator.org/mantis/view.php?id=5365 However, once locking per agent circuit can be done | 1924 | // http://opensimulator.org/mantis/view.php?id=5365 However, once locking per agent circuit can be done |
1926 | // consistently, this lock could probably be removed. | 1925 | // consistently, this lock could probably be removed. |
1927 | lock (this) | 1926 | lock (this) |
1928 | { | 1927 | { |
1929 | if (!Scene.TryGetClient(agentID, out client)) | 1928 | if (Scene.TryGetClient(agentID, out client)) |
1930 | { | 1929 | { |
1931 | createNew = true; | 1930 | if (client.SceneAgent != null) |
1932 | } | 1931 | return client; |
1933 | else | 1932 | Scene.CloseAgent(agentID, true); |
1934 | { | ||
1935 | if (client.SceneAgent == null) | ||
1936 | { | ||
1937 | Scene.CloseAgent(agentID, true); | ||
1938 | createNew = true; | ||
1939 | } | ||
1940 | } | 1933 | } |
1941 | 1934 | ||
1942 | if (createNew) | 1935 | LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, Throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO); |
1943 | { | ||
1944 | LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, Throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO); | ||
1945 | 1936 | ||
1946 | client = new LLClientView(Scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode); | 1937 | client = new LLClientView(Scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode); |
1947 | client.OnLogout += LogoutHandler; | 1938 | client.OnLogout += LogoutHandler; |
1948 | client.DebugPacketLevel = DefaultClientPacketDebugLevel; | 1939 | client.DebugPacketLevel = DefaultClientPacketDebugLevel; |
1949 | 1940 | ||
1950 | ((LLClientView)client).DisableFacelights = m_disableFacelights; | 1941 | ((LLClientView)client).DisableFacelights = m_disableFacelights; |
1951 | 1942 | ||
1952 | client.Start(); | 1943 | client.Start(); |
1953 | } | ||
1954 | } | 1944 | } |
1955 | 1945 | ||
1956 | return client; | 1946 | return client; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a8d2f84..ed98046 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3111,12 +3111,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3111 | 3111 | ||
3112 | m_LastLogin = Util.EnvironmentTickCount(); | 3112 | m_LastLogin = Util.EnvironmentTickCount(); |
3113 | 3113 | ||
3114 | //HACK only send object animations to fs beta for now | ||
3115 | string viewername = Util.GetViewerName(aCircuit); | ||
3116 | if(sp != null && viewername.StartsWith("Firestorm-Betax64 6")) | ||
3117 | { | ||
3118 | sp.ControllingClient.DoObjectAnimations = true; | ||
3119 | } | ||
3120 | return sp; | 3114 | return sp; |
3121 | } | 3115 | } |
3122 | 3116 | ||
@@ -3207,36 +3201,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
3207 | public override bool CheckClient(UUID agentID, System.Net.IPEndPoint ep) | 3201 | public override bool CheckClient(UUID agentID, System.Net.IPEndPoint ep) |
3208 | { | 3202 | { |
3209 | AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(agentID); | 3203 | AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(agentID); |
3210 | if (aCircuit != null) | 3204 | if (aCircuit == null) |
3211 | { | 3205 | return false; |
3212 | bool vialogin = false; | ||
3213 | if (!VerifyClient(aCircuit, ep, out vialogin)) | ||
3214 | { | ||
3215 | // if it doesn't pass, we remove the agentcircuitdata altogether | ||
3216 | // and the scene presence and the client, if they exist | ||
3217 | try | ||
3218 | { | ||
3219 | ScenePresence sp = WaitGetScenePresence(agentID); | ||
3220 | |||
3221 | if (sp != null) | ||
3222 | { | ||
3223 | PresenceService.LogoutAgent(sp.ControllingClient.SessionId); | ||
3224 | |||
3225 | CloseAgent(sp.UUID, false); | ||
3226 | } | ||
3227 | 3206 | ||
3228 | // BANG! SLASH! | 3207 | bool vialogin = false; |
3229 | m_authenticateHandler.RemoveCircuit(agentID); | 3208 | if (VerifyClient(aCircuit, ep, out vialogin)) |
3209 | return true; | ||
3230 | 3210 | ||
3231 | return false; | 3211 | // if it doesn't pass, we remove the agentcircuitdata altogether |
3232 | } | 3212 | // and the scene presence and the client, if they exist |
3233 | catch (Exception e) | 3213 | try |
3234 | { | 3214 | { |
3235 | m_log.DebugFormat("[SCENE]: Exception while closing aborted client: {0}", e.StackTrace); | 3215 | ScenePresence sp = WaitGetScenePresence(agentID); |
3236 | } | 3216 | if (sp != null) |
3217 | { | ||
3218 | PresenceService.LogoutAgent(sp.ControllingClient.SessionId); | ||
3219 | CloseAgent(sp.UUID, false); | ||
3237 | } | 3220 | } |
3238 | else | 3221 | // BANG! SLASH! |
3239 | return true; | 3222 | m_authenticateHandler.RemoveCircuit(agentID); |
3223 | } | ||
3224 | catch (Exception e) | ||
3225 | { | ||
3226 | m_log.DebugFormat("[SCENE]: Exception while closing aborted client: {0}", e.StackTrace); | ||
3240 | } | 3227 | } |
3241 | 3228 | ||
3242 | return false; | 3229 | return false; |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 2b6c5e6..527f12e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -45,6 +45,7 @@ using OpenSim.Region.PhysicsModules.SharedBase; | |||
45 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 45 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
46 | using OpenSim.Services.Interfaces; | 46 | using OpenSim.Services.Interfaces; |
47 | using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags; | 47 | using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags; |
48 | using Caps = OpenSim.Framework.Capabilities.Caps; | ||
48 | 49 | ||
49 | namespace OpenSim.Region.Framework.Scenes | 50 | namespace OpenSim.Region.Framework.Scenes |
50 | { | 51 | { |
@@ -1110,6 +1111,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1110 | 1111 | ||
1111 | HealRate = 0.5f; | 1112 | HealRate = 0.5f; |
1112 | 1113 | ||
1114 | ControllingClient.SupportObjectAnimations = false; | ||
1115 | if (m_scene.CapsModule != null) | ||
1116 | { | ||
1117 | Caps cap = m_scene.CapsModule.GetCapsForUser(ControllingClient.CircuitCode); | ||
1118 | if (cap != null && (cap.Flags & Caps.CapsFlags.ObjectAnim) != 0) | ||
1119 | ControllingClient.SupportObjectAnimations = true; | ||
1120 | } | ||
1121 | |||
1113 | IConfig sconfig = m_scene.Config.Configs["EntityTransfer"]; | 1122 | IConfig sconfig = m_scene.Config.Configs["EntityTransfer"]; |
1114 | if (sconfig != null) | 1123 | if (sconfig != null) |
1115 | { | 1124 | { |
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 5962495..febf995 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -60,7 +60,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
60 | 60 | ||
61 | public int PingTimeMS { get { return 0; } } | 61 | public int PingTimeMS { get { return 0; } } |
62 | 62 | ||
63 | public bool DoObjectAnimations { get; set; } | 63 | public bool SupportObjectAnimations { get; set; } |
64 | 64 | ||
65 | private string m_username; | 65 | private string m_username; |
66 | private string m_nick; | 66 | private string m_nick; |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index cbb7e60..0984c60 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -73,7 +73,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
73 | private UUID m_profileImage = UUID.Zero; | 73 | private UUID m_profileImage = UUID.Zero; |
74 | private string m_born; | 74 | private string m_born; |
75 | public List<uint> SelectedObjects {get; private set;} | 75 | public List<uint> SelectedObjects {get; private set;} |
76 | public bool DoObjectAnimations { get; set; } | 76 | public bool SupportObjectAnimations { get; set; } |
77 | 77 | ||
78 | public NPCAvatar( | 78 | public NPCAvatar( |
79 | string firstname, string lastname, Vector3 position, UUID ownerID, bool senseAsAgent, Scene scene) | 79 | string firstname, string lastname, Vector3 position, UUID ownerID, bool senseAsAgent, Scene scene) |
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 151dcca..b0ede78 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -354,7 +354,7 @@ namespace OpenSim.Tests.Common | |||
354 | 354 | ||
355 | public ISceneAgent SceneAgent { get; set; } | 355 | public ISceneAgent SceneAgent { get; set; } |
356 | 356 | ||
357 | public bool DoObjectAnimations { get; set; } | 357 | public bool SupportObjectAnimations { get; set; } |
358 | 358 | ||
359 | /// <value> | 359 | /// <value> |
360 | /// The last caps seed url that this client was given. | 360 | /// The last caps seed url that this client was given. |