aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorubit2012-10-05 07:04:58 +0200
committerubit2012-10-05 07:04:58 +0200
commitceb33b24f7297bd543612ff9a472213472aeb551 (patch)
tree19abec0df719c9802ec595ac50c6c270be5261f0
parentMerge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff)
parentMerge branch 'avination' into ubitwork (diff)
downloadopensim-SC_OLD-ceb33b24f7297bd543612ff9a472213472aeb551.zip
opensim-SC_OLD-ceb33b24f7297bd543612ff9a472213472aeb551.tar.gz
opensim-SC_OLD-ceb33b24f7297bd543612ff9a472213472aeb551.tar.bz2
opensim-SC_OLD-ceb33b24f7297bd543612ff9a472213472aeb551.tar.xz
Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
-rw-r--r--OpenSim/Framework/WebUtil.cs28
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs27
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs18
-rw-r--r--OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs37
4 files changed, 70 insertions, 40 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index 8094b6d..30a8c28 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -706,9 +706,10 @@ namespace OpenSim.Framework
706 // m_log.DebugFormat("[WEB UTIL]: <{0}> start osd request for {1}, method {2}",reqnum,url,method); 706 // m_log.DebugFormat("[WEB UTIL]: <{0}> start osd request for {1}, method {2}",reqnum,url,method);
707 707
708 int tickstart = Util.EnvironmentTickCount(); 708 int tickstart = Util.EnvironmentTickCount();
709 int tickdata = 0; 709// int tickdata = 0;
710 int tickdiff = 0;
710 711
711 // m_log.DebugFormat("[ASYNC REQUEST]: Starting {0} {1}", verb, requestUrl); 712// m_log.DebugFormat("[ASYNC REQUEST]: Starting {0} {1}", verb, requestUrl);
712 713
713 Type type = typeof(TRequest); 714 Type type = typeof(TRequest);
714 715
@@ -751,8 +752,8 @@ namespace OpenSim.Framework
751 requestStream.Close(); 752 requestStream.Close();
752 753
753 // capture how much time was spent writing 754 // capture how much time was spent writing
754 tickdata = Util.EnvironmentTickCountSubtract(tickstart); 755 // useless in this async
755 756// tickdata = Util.EnvironmentTickCountSubtract(tickstart);
756 request.BeginGetResponse(delegate(IAsyncResult ar) 757 request.BeginGetResponse(delegate(IAsyncResult ar)
757 { 758 {
758 response = request.EndGetResponse(ar); 759 response = request.EndGetResponse(ar);
@@ -769,7 +770,8 @@ namespace OpenSim.Framework
769 finally 770 finally
770 { 771 {
771 // Let's not close this 772 // Let's not close this
772 //buffer.Close(); 773 // yes do close it
774 buffer.Close();
773 respStream.Close(); 775 respStream.Close();
774 response.Close(); 776 response.Close();
775 } 777 }
@@ -837,7 +839,6 @@ namespace OpenSim.Framework
837 } 839 }
838 840
839 // m_log.DebugFormat("[ASYNC REQUEST]: Received {0}", deserial.ToString()); 841 // m_log.DebugFormat("[ASYNC REQUEST]: Received {0}", deserial.ToString());
840
841 try 842 try
842 { 843 {
843 action(deserial); 844 action(deserial);
@@ -852,9 +853,10 @@ namespace OpenSim.Framework
852 }, null); 853 }, null);
853 } 854 }
854 855
855 int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); 856 tickdiff = Util.EnvironmentTickCountSubtract(tickstart);
856 if (tickdiff > WebUtil.LongCallTime) 857 if (tickdiff > WebUtil.LongCallTime)
857 { 858 {
859/*
858 string originalRequest = null; 860 string originalRequest = null;
859 861
860 if (buffer != null) 862 if (buffer != null)
@@ -873,6 +875,13 @@ namespace OpenSim.Framework
873 tickdiff, 875 tickdiff,
874 tickdata, 876 tickdata,
875 originalRequest); 877 originalRequest);
878*/
879 m_log.InfoFormat(
880 "[ASYNC REQUEST]: Slow WebRequest SETUP <{0}> {1} {2} took {3}ms",
881 reqnum,
882 verb,
883 requestUrl,
884 tickdiff);
876 } 885 }
877 } 886 }
878 } 887 }
@@ -903,6 +912,8 @@ namespace OpenSim.Framework
903 request.Method = verb; 912 request.Method = verb;
904 string respstring = String.Empty; 913 string respstring = String.Empty;
905 914
915 int tickset = Util.EnvironmentTickCountSubtract(tickstart);
916
906 using (MemoryStream buffer = new MemoryStream()) 917 using (MemoryStream buffer = new MemoryStream())
907 { 918 {
908 if ((verb == "POST") || (verb == "PUT")) 919 if ((verb == "POST") || (verb == "PUT"))
@@ -979,11 +990,12 @@ namespace OpenSim.Framework
979 int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); 990 int tickdiff = Util.EnvironmentTickCountSubtract(tickstart);
980 if (tickdiff > WebUtil.LongCallTime) 991 if (tickdiff > WebUtil.LongCallTime)
981 m_log.InfoFormat( 992 m_log.InfoFormat(
982 "[FORMS]: Slow request to <{0}> {1} {2} took {3}ms, {4}ms writing, {5}", 993 "[FORMS]: Slow request to <{0}> {1} {2} took {3}ms {4}ms writing {5}",
983 reqnum, 994 reqnum,
984 verb, 995 verb,
985 requestUrl, 996 requestUrl,
986 tickdiff, 997 tickdiff,
998 tickset,
987 tickdata, 999 tickdata,
988 obj.Length > WebUtil.MaxRequestDiagLength ? obj.Remove(WebUtil.MaxRequestDiagLength) : obj); 1000 obj.Length > WebUtil.MaxRequestDiagLength ? obj.Remove(WebUtil.MaxRequestDiagLength) : obj);
989 1001
diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
index 33041e9..ad421ee 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
87 { 87 {
88 if (m_defaultAnimation.AnimID == animID) 88 if (m_defaultAnimation.AnimID == animID)
89 { 89 {
90 ResetDefaultAnimation(); 90 m_defaultAnimation = new OpenSim.Framework.Animation(UUID.Zero, 1, UUID.Zero);
91 } 91 }
92 else if (HasAnimation(animID)) 92 else if (HasAnimation(animID))
93 { 93 {
@@ -149,19 +149,26 @@ namespace OpenSim.Region.Framework.Scenes.Animation
149 { 149 {
150 lock (m_animations) 150 lock (m_animations)
151 { 151 {
152 animIDs = new UUID[m_animations.Count + 1]; 152 int defaultSize = 0;
153 sequenceNums = new int[m_animations.Count + 1]; 153 if (m_defaultAnimation.AnimID != UUID.Zero)
154 objectIDs = new UUID[m_animations.Count + 1]; 154 defaultSize++;
155 155
156 animIDs[0] = m_defaultAnimation.AnimID; 156 animIDs = new UUID[m_animations.Count + defaultSize];
157 sequenceNums[0] = m_defaultAnimation.SequenceNum; 157 sequenceNums = new int[m_animations.Count + defaultSize];
158 objectIDs[0] = m_defaultAnimation.ObjectID; 158 objectIDs = new UUID[m_animations.Count + defaultSize];
159
160 if (m_defaultAnimation.AnimID != UUID.Zero)
161 {
162 animIDs[0] = m_defaultAnimation.AnimID;
163 sequenceNums[0] = m_defaultAnimation.SequenceNum;
164 objectIDs[0] = m_defaultAnimation.ObjectID;
165 }
159 166
160 for (int i = 0; i < m_animations.Count; ++i) 167 for (int i = 0; i < m_animations.Count; ++i)
161 { 168 {
162 animIDs[i + 1] = m_animations[i].AnimID; 169 animIDs[i + defaultSize] = m_animations[i].AnimID;
163 sequenceNums[i + 1] = m_animations[i].SequenceNum; 170 sequenceNums[i + defaultSize] = m_animations[i].SequenceNum;
164 objectIDs[i + 1] = m_animations[i].ObjectID; 171 objectIDs[i + defaultSize] = m_animations[i].ObjectID;
165 } 172 }
166 } 173 }
167 } 174 }
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index 50a176b..9458079 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -424,13 +424,19 @@ namespace OpenSim.Region.Framework.Scenes.Animation
424 { 424 {
425 lock (m_animations) 425 lock (m_animations)
426 { 426 {
427 CurrentMovementAnimation = DetermineMovementAnimation(); 427 string newMovementAnimation = DetermineMovementAnimation();
428 if (CurrentMovementAnimation != newMovementAnimation)
429 {
430 CurrentMovementAnimation = DetermineMovementAnimation();
428 431
429// m_log.DebugFormat( 432// m_log.DebugFormat(
430// "[SCENE PRESENCE ANIMATOR]: Determined animation {0} for {1} in UpdateMovementAnimations()", 433// "[SCENE PRESENCE ANIMATOR]: Determined animation {0} for {1} in UpdateMovementAnimations()",
431// CurrentMovementAnimation, m_scenePresence.Name); 434// CurrentMovementAnimation, m_scenePresence.Name);
432 435
433 TrySetMovementAnimation(CurrentMovementAnimation); 436 // Only set it if it's actually changed, give a script
437 // a chance to stop a default animation
438 TrySetMovementAnimation(CurrentMovementAnimation);
439 }
434 } 440 }
435 } 441 }
436 442
@@ -552,4 +558,4 @@ namespace OpenSim.Region.Framework.Scenes.Animation
552 SendAnimPack(animIDs, sequenceNums, objectIDs); 558 SendAnimPack(animIDs, sequenceNums, objectIDs);
553 } 559 }
554 } 560 }
555} \ No newline at end of file 561}
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
index 9d6d9ad..7f32ad3 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
@@ -295,25 +295,30 @@ namespace OpenSim.Services.Connectors
295 bool success = false; 295 bool success = false;
296 try 296 try
297 { 297 {
298 AsynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0, 298 AssetBase a = SynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0, 30);
299 delegate(AssetBase a) 299 if (a != null)
300 { 300 {
301 if (m_Cache != null) 301 if (m_Cache != null)
302 m_Cache.Cache(a); 302 m_Cache.Cache(a);
303 303
304 List<AssetRetrievedEx> handlers; 304 List<AssetRetrievedEx> handlers;
305 lock (m_AssetHandlers) 305 lock (m_AssetHandlers)
306 {
307 handlers = m_AssetHandlers[id];
308 m_AssetHandlers.Remove(id);
309 }
310 foreach (AssetRetrievedEx h in handlers)
311 {
312 Util.FireAndForget(x =>
306 { 313 {
307 handlers = m_AssetHandlers[id];
308 m_AssetHandlers.Remove(id);
309 }
310 foreach (AssetRetrievedEx h in handlers)
311 h.Invoke(a); 314 h.Invoke(a);
312 if (handlers != null) 315 });
313 handlers.Clear(); 316 }
314 }, 30); 317 if (handlers != null)
318 handlers.Clear();
315 319
316 success = true; 320 success = true;
321 }
317 } 322 }
318 finally 323 finally
319 { 324 {
@@ -326,7 +331,7 @@ namespace OpenSim.Services.Connectors
326 m_AssetHandlers.Remove(id); 331 m_AssetHandlers.Remove(id);
327 } 332 }
328 if (handlers != null) 333 if (handlers != null)
329 handlers.Clear(); 334 handlers.Clear();
330 } 335 }
331 } 336 }
332 } 337 }