aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs36
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs38
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs2
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs40
-rw-r--r--OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs17
6 files changed, 96 insertions, 43 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 9e72a98..437d150 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -258,10 +258,25 @@ namespace OpenSim.ApplicationPlugins.RemoteController
258 { 258 {
259 m_log.Info("[RADMIN]: Request to restart Region."); 259 m_log.Info("[RADMIN]: Request to restart Region.");
260 260
261 CheckRegionParams(requestData, responseData);
262
263 Scene rebootedScene = null; 261 Scene rebootedScene = null;
264 GetSceneFromRegionParams(requestData, responseData, out rebootedScene); 262 bool restartAll = false;
263
264 IConfig startupConfig = m_configSource.Configs["Startup"];
265 if (startupConfig != null)
266 {
267 if (startupConfig.GetBoolean("InworldRestartShutsDown", false))
268 {
269 rebootedScene = m_application.SceneManager.CurrentOrFirstScene;
270 restartAll = true;
271 }
272 }
273
274 if (rebootedScene == null)
275 {
276 CheckRegionParams(requestData, responseData);
277
278 GetSceneFromRegionParams(requestData, responseData, out rebootedScene);
279 }
265 280
266 IRestartModule restartModule = rebootedScene.RequestModuleInterface<IRestartModule>(); 281 IRestartModule restartModule = rebootedScene.RequestModuleInterface<IRestartModule>();
267 282
@@ -324,11 +339,20 @@ namespace OpenSim.ApplicationPlugins.RemoteController
324 notice = false; 339 notice = false;
325 } 340 }
326 341
327 if (restartModule != null) 342 List<Scene> restartList;
343
344 if (restartAll)
345 restartList = m_application.SceneManager.Scenes;
346 else
347 restartList = new List<Scene>() { rebootedScene };
348
349 foreach (Scene s in m_application.SceneManager.Scenes)
328 { 350 {
329 restartModule.ScheduleRestart(UUID.Zero, message, times.ToArray(), notice); 351 restartModule = s.RequestModuleInterface<IRestartModule>();
330 responseData["success"] = true; 352 if (restartModule != null)
353 restartModule.ScheduleRestart(UUID.Zero, message, times.ToArray(), notice);
331 } 354 }
355 responseData["success"] = true;
332 } 356 }
333 catch (Exception e) 357 catch (Exception e)
334 { 358 {
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 5912a15..77dbca7 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -346,7 +346,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
346 /// All manipulation of this set has to occur under an m_entityUpdates.SyncRoot lock 346 /// All manipulation of this set has to occur under an m_entityUpdates.SyncRoot lock
347 /// 347 ///
348 /// </value> 348 /// </value>
349 protected HashSet<uint> m_killRecord; 349// protected HashSet<uint> m_killRecord;
350 350
351// protected HashSet<uint> m_attachmentsSent; 351// protected HashSet<uint> m_attachmentsSent;
352 352
@@ -472,7 +472,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
472 m_entityUpdates = new PriorityQueue(m_scene.Entities.Count); 472 m_entityUpdates = new PriorityQueue(m_scene.Entities.Count);
473 m_entityProps = new PriorityQueue(m_scene.Entities.Count); 473 m_entityProps = new PriorityQueue(m_scene.Entities.Count);
474 m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>(); 474 m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>();
475 m_killRecord = new HashSet<uint>(); 475// m_killRecord = new HashSet<uint>();
476// m_attachmentsSent = new HashSet<uint>(); 476// m_attachmentsSent = new HashSet<uint>();
477 477
478 m_assetService = m_scene.RequestModuleInterface<IAssetService>(); 478 m_assetService = m_scene.RequestModuleInterface<IAssetService>();
@@ -1574,17 +1574,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1574 // We MUST lock for both manipulating the kill record and sending the packet, in order to avoid a race 1574 // We MUST lock for both manipulating the kill record and sending the packet, in order to avoid a race
1575 // condition where a kill can be processed before an out-of-date update for the same object. 1575 // condition where a kill can be processed before an out-of-date update for the same object.
1576 // ProcessEntityUpdates() also takes the m_killRecord lock. 1576 // ProcessEntityUpdates() also takes the m_killRecord lock.
1577 lock (m_killRecord) 1577// lock (m_killRecord)
1578 { 1578// {
1579 foreach (uint localID in localIDs) 1579// foreach (uint localID in localIDs)
1580 m_killRecord.Add(localID); 1580// m_killRecord.Add(localID);
1581 1581
1582 // The throttle queue used here must match that being used for updates. Otherwise, there is a 1582 // The throttle queue used here must match that being used for updates. Otherwise, there is a
1583 // chance that a kill packet put on a separate queue will be sent to the client before an existing 1583 // chance that a kill packet put on a separate queue will be sent to the client before an existing
1584 // update packet on another queue. Receiving updates after kills results in unowned and undeletable 1584 // update packet on another queue. Receiving updates after kills results in unowned and undeletable
1585 // scene objects in a viewer until that viewer is relogged in. 1585 // scene objects in a viewer until that viewer is relogged in.
1586 OutPacket(kill, ThrottleOutPacketType.Task); 1586 OutPacket(kill, ThrottleOutPacketType.Task);
1587 } 1587// }
1588 } 1588 }
1589 } 1589 }
1590 1590
@@ -3802,11 +3802,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3802 // If the object is an attachment we don't want it to be in the kill 3802 // If the object is an attachment we don't want it to be in the kill
3803 // record. Else attaching from inworld and subsequently dropping 3803 // record. Else attaching from inworld and subsequently dropping
3804 // it will no longer work. 3804 // it will no longer work.
3805 lock (m_killRecord) 3805// lock (m_killRecord)
3806 { 3806// {
3807 m_killRecord.Remove(part.LocalId); 3807// m_killRecord.Remove(part.LocalId);
3808 m_killRecord.Remove(part.ParentGroup.RootPart.LocalId); 3808// m_killRecord.Remove(part.ParentGroup.RootPart.LocalId);
3809 } 3809// }
3810 } 3810 }
3811 else 3811 else
3812 { 3812 {
@@ -3822,13 +3822,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3822 // after the root prim has been deleted. 3822 // after the root prim has been deleted.
3823 // 3823 //
3824 // We ignore this for attachments because attaching something from inworld breaks unless we do. 3824 // We ignore this for attachments because attaching something from inworld breaks unless we do.
3825 lock (m_killRecord) 3825// lock (m_killRecord)
3826 { 3826// {
3827 if (m_killRecord.Contains(part.LocalId)) 3827// if (m_killRecord.Contains(part.LocalId))
3828 continue; 3828// continue;
3829 if (m_killRecord.Contains(part.ParentGroup.RootPart.LocalId)) 3829// if (m_killRecord.Contains(part.ParentGroup.RootPart.LocalId))
3830 continue; 3830// continue;
3831 } 3831// }
3832 } 3832 }
3833 3833
3834 if (part.ParentGroup.IsAttachment && m_disableFacelights) 3834 if (part.ParentGroup.IsAttachment && m_disableFacelights)
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index e2f32dd..2b1fb3d 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -867,7 +867,7 @@ namespace OpenSim.Region.Framework.Scenes
867 867
868 IsChildAgent = false; 868 IsChildAgent = false;
869 869
870 Animator.TrySetMovementAnimation("SIT"); 870// Animator.TrySetMovementAnimation("SIT");
871 } 871 }
872 else 872 else
873 { 873 {
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
index 9a40ab5..9b3b51b 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
@@ -3252,9 +3252,9 @@ namespace OpenSim.Region.Physics.OdePlugin
3252 } 3252 }
3253 3253
3254 3254
3255 private void changeAddImpulse(Vector3 impulse) 3255 private void changeAddForce(Vector3 theforce)
3256 { 3256 {
3257 m_forceacc += impulse *m_invTimeStep; 3257 m_forceacc += theforce;
3258 if (!m_isSelected) 3258 if (!m_isSelected)
3259 { 3259 {
3260 lock (this) 3260 lock (this)
@@ -3960,7 +3960,7 @@ namespace OpenSim.Region.Physics.OdePlugin
3960 break; 3960 break;
3961 3961
3962 case changes.AddForce: 3962 case changes.AddForce:
3963 changeAddImpulse((Vector3)arg); 3963 changeAddForce((Vector3)arg);
3964 break; 3964 break;
3965 3965
3966 case changes.AddAngForce: 3966 case changes.AddAngForce:
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index ea78dc3..ec0966b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -111,6 +111,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
111 protected Timer m_ShoutSayTimer; 111 protected Timer m_ShoutSayTimer;
112 protected int m_SayShoutCount = 0; 112 protected int m_SayShoutCount = 0;
113 113
114 private Dictionary<string, string> MovementAnimationsForLSL =
115 new Dictionary<string, string> {
116 {"FLY", "Flying"},
117 {"FLYSLOW", "FlyingSlow"},
118 {"HOVER_UP", "Hovering Up"},
119 {"HOVER_DOWN", "Hovering Down"},
120 {"HOVER", "Hovering"},
121 {"LAND", "Landing"},
122 {"FALLDOWN", "Falling Down"},
123 {"PREJUMP", "PreJumping"},
124 {"JUMP", "Jumping"},
125 {"STANDUP", "Standing Up"},
126 {"SOFT_LAND", "Soft Landing"},
127 {"STAND", "Standing"},
128 {"CROUCHWALK", "CrouchWalking"},
129 {"RUN", "Running"},
130 {"WALK", "Walking"},
131 {"CROUCH", "Crouching"},
132 {"TURNLEFT", "Turning Left"},
133 {"TURNRIGHT", "Turning Right"}
134 };
135
114 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID) 136 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID)
115 { 137 {
116 m_ShoutSayTimer = new Timer(1000); 138 m_ShoutSayTimer = new Timer(1000);
@@ -2523,7 +2545,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2523 } 2545 }
2524 else 2546 else
2525 { 2547 {
2526 vel = m_host.Velocity; 2548 vel = m_host.ParentGroup.RootPart.Velocity;
2527 } 2549 }
2528 2550
2529 return new LSL_Vector(vel.X, vel.Y, vel.Z); 2551 return new LSL_Vector(vel.X, vel.Y, vel.Z);
@@ -4820,14 +4842,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4820 4842
4821 if (m_host.RegionHandle == presence.RegionHandle) 4843 if (m_host.RegionHandle == presence.RegionHandle)
4822 { 4844 {
4823 Dictionary<UUID, string> animationstateNames = DefaultAvatarAnimations.AnimStateNames;
4824
4825 if (presence != null) 4845 if (presence != null)
4826 { 4846 {
4827 AnimationSet currentAnims = presence.Animator.Animations; 4847 if (presence.SitGround)
4828 string currentAnimationState = String.Empty; 4848 return "Sitting on Ground";
4829 if (animationstateNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimationState)) 4849 if (presence.ParentID != 0 || presence.ParentUUID != UUID.Zero)
4830 return currentAnimationState; 4850 return "Sitting";
4851
4852 string movementAnimation = presence.Animator.CurrentMovementAnimation;
4853 string lslMovementAnimation;
4854
4855 if (MovementAnimationsForLSL.TryGetValue(movementAnimation, out lslMovementAnimation))
4856 return lslMovementAnimation;
4831 } 4857 }
4832 } 4858 }
4833 4859
diff --git a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs
index 0d7ced9..769c3c2 100644
--- a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs
@@ -103,6 +103,8 @@ namespace OpenSim.Services.AuthenticationService
103 if ((user.UserFlags & impersonateFlag) == 0) 103 if ((user.UserFlags & impersonateFlag) == 0)
104 return String.Empty; 104 return String.Empty;
105 105
106 m_log.DebugFormat("[PASS AUTH]: Attempting impersonation");
107
106 List<UserAccount> accounts = m_UserAccountService.GetUserAccountsWhere(UUID.Zero, "UserLevel >= 200"); 108 List<UserAccount> accounts = m_UserAccountService.GetUserAccountsWhere(UUID.Zero, "UserLevel >= 200");
107 if (accounts == null || accounts.Count == 0) 109 if (accounts == null || accounts.Count == 0)
108 return String.Empty; 110 return String.Empty;
@@ -117,6 +119,8 @@ namespace OpenSim.Services.AuthenticationService
117 continue; 119 continue;
118 } 120 }
119 121
122// m_log.DebugFormat("[PASS AUTH]: Trying {0}", data.PrincipalID);
123
120 hashed = Util.Md5Hash(password + ":" + 124 hashed = Util.Md5Hash(password + ":" +
121 data.Data["passwordSalt"].ToString()); 125 data.Data["passwordSalt"].ToString());
122 126
@@ -125,13 +129,12 @@ namespace OpenSim.Services.AuthenticationService
125 m_log.DebugFormat("[PASS AUTH]: {0} {1} impersonating {2}, proceeding with login", a.FirstName, a.LastName, principalID); 129 m_log.DebugFormat("[PASS AUTH]: {0} {1} impersonating {2}, proceeding with login", a.FirstName, a.LastName, principalID);
126 return GetToken(principalID, lifetime); 130 return GetToken(principalID, lifetime);
127 } 131 }
128 else 132// else
129 { 133// {
130 m_log.DebugFormat( 134// m_log.DebugFormat(
131 "[AUTH SERVICE]: Salted hash {0} of given password did not match salted hash of {1} for PrincipalID {2}. Authentication failure.", 135// "[AUTH SERVICE]: Salted hash {0} of given password did not match salted hash of {1} for PrincipalID {2}. Authentication failure.",
132 hashed, data.Data["passwordHash"], principalID); 136// hashed, data.Data["passwordHash"], data.PrincipalID);
133 return String.Empty; 137// }
134 }
135 } 138 }
136 139
137 m_log.DebugFormat("[PASS AUTH]: Impersonation of {0} failed", principalID); 140 m_log.DebugFormat("[PASS AUTH]: Impersonation of {0} failed", principalID);