diff options
Diffstat (limited to '')
3 files changed, 38 insertions, 47 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index dfb09f4..9bb952d 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -356,7 +356,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
356 | } | 356 | } |
357 | catch (Exception e) | 357 | catch (Exception e) |
358 | { | 358 | { |
359 | m_log.ErrorFormat("[BASE HTTP SERVER]: OnRequest() failed with {0}{1}", e.Message, e.StackTrace); | 359 | m_log.Error(String.Format("[BASE HTTP SERVER]: OnRequest() failed: {0} ", e.Message), e); |
360 | } | 360 | } |
361 | } | 361 | } |
362 | 362 | ||
@@ -551,11 +551,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
551 | catch (SocketException e) | 551 | catch (SocketException e) |
552 | { | 552 | { |
553 | // This has to be here to prevent a Linux/Mono crash | 553 | // This has to be here to prevent a Linux/Mono crash |
554 | m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e); | 554 | m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux. ", e.Message), e); |
555 | } | 555 | } |
556 | catch (IOException e) | 556 | catch (IOException e) |
557 | { | 557 | { |
558 | m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message); | 558 | m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}. ", e.Message), e); |
559 | } | 559 | } |
560 | 560 | ||
561 | return; | 561 | return; |
@@ -658,15 +658,15 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
658 | // | 658 | // |
659 | // An alternative may be to turn off all response write exceptions on the HttpListener, but let's go | 659 | // An alternative may be to turn off all response write exceptions on the HttpListener, but let's go |
660 | // with the minimum first | 660 | // with the minimum first |
661 | m_log.WarnFormat("[BASE HTTP SERVER]: HandleRequest threw {0}.\nNOTE: this may be spurious on Linux", e); | 661 | m_log.Warn(String.Format("[BASE HTTP SERVER]: HandleRequest threw {0}.\nNOTE: this may be spurious on Linux ", e.Message), e); |
662 | } | 662 | } |
663 | catch (IOException e) | 663 | catch (IOException e) |
664 | { | 664 | { |
665 | m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw {0}{1}", e.Message, e.StackTrace); | 665 | m_log.Error(String.Format("[BASE HTTP SERVER]: HandleRequest() threw {0} ", e.Message), e); |
666 | } | 666 | } |
667 | catch (Exception e) | 667 | catch (Exception e) |
668 | { | 668 | { |
669 | m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw {0}{1}", e.Message, e.StackTrace); | 669 | m_log.Error(String.Format("[BASE HTTP SERVER]: HandleRequest() threw {0} ", e.Message), e); |
670 | SendHTML500(response); | 670 | SendHTML500(response); |
671 | } | 671 | } |
672 | finally | 672 | finally |
@@ -933,11 +933,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
933 | catch (SocketException e) | 933 | catch (SocketException e) |
934 | { | 934 | { |
935 | // This has to be here to prevent a Linux/Mono crash | 935 | // This has to be here to prevent a Linux/Mono crash |
936 | m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e); | 936 | m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux. ", e.Message), e); |
937 | } | 937 | } |
938 | catch (IOException e) | 938 | catch (IOException e) |
939 | { | 939 | { |
940 | m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message); | 940 | m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0} ", e.Message), e); |
941 | } | 941 | } |
942 | } | 942 | } |
943 | return; | 943 | return; |
@@ -970,11 +970,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
970 | catch (SocketException e) | 970 | catch (SocketException e) |
971 | { | 971 | { |
972 | // This has to be here to prevent a Linux/Mono crash | 972 | // This has to be here to prevent a Linux/Mono crash |
973 | m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e); | 973 | m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux. ", e.Message), e); |
974 | } | 974 | } |
975 | catch (IOException e) | 975 | catch (IOException e) |
976 | { | 976 | { |
977 | m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message); | 977 | m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0} ", e.Message), e); |
978 | } | 978 | } |
979 | } | 979 | } |
980 | } | 980 | } |
@@ -1085,12 +1085,12 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1085 | } | 1085 | } |
1086 | catch (IOException e) | 1086 | catch (IOException e) |
1087 | { | 1087 | { |
1088 | m_log.WarnFormat("[BASE HTTP SERVER]: LLSD IOException {0}.", e); | 1088 | m_log.Warn(String.Format("[BASE HTTP SERVER]: LLSD IOException {0} ", e.Message), e); |
1089 | } | 1089 | } |
1090 | catch (SocketException e) | 1090 | catch (SocketException e) |
1091 | { | 1091 | { |
1092 | // This has to be here to prevent a Linux/Mono crash | 1092 | // This has to be here to prevent a Linux/Mono crash |
1093 | m_log.WarnFormat("[BASE HTTP SERVER]: LLSD issue {0}.\nNOTE: this may be spurious on Linux.", e); | 1093 | m_log.Warn(String.Format("[BASE HTTP SERVER]: LLSD issue {0}.\nNOTE: this may be spurious on Linux. ", e.Message), e); |
1094 | } | 1094 | } |
1095 | } | 1095 | } |
1096 | } | 1096 | } |
@@ -1342,8 +1342,8 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1342 | catch (SocketException f) | 1342 | catch (SocketException f) |
1343 | { | 1343 | { |
1344 | // This has to be here to prevent a Linux/Mono crash | 1344 | // This has to be here to prevent a Linux/Mono crash |
1345 | m_log.WarnFormat( | 1345 | m_log.Warn( |
1346 | "[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", f); | 1346 | String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux. ", f.Message), f); |
1347 | } | 1347 | } |
1348 | } | 1348 | } |
1349 | catch(Exception) | 1349 | catch(Exception) |
@@ -1661,11 +1661,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1661 | catch (SocketException e) | 1661 | catch (SocketException e) |
1662 | { | 1662 | { |
1663 | // This has to be here to prevent a Linux/Mono crash | 1663 | // This has to be here to prevent a Linux/Mono crash |
1664 | m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e); | 1664 | m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux. ", e.Message), e); |
1665 | } | 1665 | } |
1666 | catch (IOException e) | 1666 | catch (IOException e) |
1667 | { | 1667 | { |
1668 | m_log.Warn("[BASE HTTP SERVER]: XmlRpcRequest issue: " + e.Message); | 1668 | m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0} ", e.Message), e); |
1669 | } | 1669 | } |
1670 | } | 1670 | } |
1671 | } | 1671 | } |
@@ -1702,7 +1702,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1702 | catch (SocketException e) | 1702 | catch (SocketException e) |
1703 | { | 1703 | { |
1704 | // This has to be here to prevent a Linux/Mono crash | 1704 | // This has to be here to prevent a Linux/Mono crash |
1705 | m_log.WarnFormat("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e); | 1705 | m_log.Warn(String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux. ", e.Message), e); |
1706 | } | 1706 | } |
1707 | } | 1707 | } |
1708 | } | 1708 | } |
@@ -1738,7 +1738,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1738 | catch (SocketException e) | 1738 | catch (SocketException e) |
1739 | { | 1739 | { |
1740 | // This has to be here to prevent a Linux/Mono crash | 1740 | // This has to be here to prevent a Linux/Mono crash |
1741 | m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e); | 1741 | m_log.Warn(String.Format("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux. ", e.Message), e); |
1742 | } | 1742 | } |
1743 | } | 1743 | } |
1744 | } | 1744 | } |
@@ -1817,7 +1817,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1817 | 1817 | ||
1818 | public void httpServerException(object source, Exception exception) | 1818 | public void httpServerException(object source, Exception exception) |
1819 | { | 1819 | { |
1820 | m_log.ErrorFormat("[BASE HTTP SERVER]: {0} had an exception {1}", source.ToString(), exception.ToString()); | 1820 | m_log.Error(String.Format("[BASE HTTP SERVER]: {0} had an exception: {1} ", source.ToString(), exception.Message), exception); |
1821 | /* | 1821 | /* |
1822 | if (HTTPDRunning)// && NotSocketErrors > 5) | 1822 | if (HTTPDRunning)// && NotSocketErrors > 5) |
1823 | { | 1823 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index fc6325d..24ec435 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | |||
@@ -449,29 +449,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
449 | /// </summary> | 449 | /// </summary> |
450 | public IClientAPI LocateClientObject(UUID agentID) | 450 | public IClientAPI LocateClientObject(UUID agentID) |
451 | { | 451 | { |
452 | Scene scene = GetClientScene(agentID); | ||
453 | if (scene != null) | ||
454 | { | ||
455 | ScenePresence presence = scene.GetScenePresence(agentID); | ||
456 | if (presence != null) | ||
457 | return presence.ControllingClient; | ||
458 | } | ||
459 | |||
460 | return null; | ||
461 | } | ||
462 | |||
463 | /// <summary> | ||
464 | /// Find the scene for an agent | ||
465 | /// </summary> | ||
466 | private Scene GetClientScene(UUID agentId) | ||
467 | { | ||
468 | lock (m_Scenes) | 452 | lock (m_Scenes) |
469 | { | 453 | { |
470 | foreach (Scene scene in m_Scenes) | 454 | foreach (Scene scene in m_Scenes) |
471 | { | 455 | { |
472 | ScenePresence presence = scene.GetScenePresence(agentId); | 456 | ScenePresence presence = scene.GetScenePresence(agentID); |
473 | if (presence != null && !presence.IsChildAgent) | 457 | if (presence != null && !presence.IsChildAgent) |
474 | return scene; | 458 | return presence.ControllingClient; |
475 | } | 459 | } |
476 | } | 460 | } |
477 | 461 | ||
@@ -498,7 +482,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
498 | Util.FireAndForget( | 482 | Util.FireAndForget( |
499 | delegate | 483 | delegate |
500 | { | 484 | { |
501 | m_log.DebugFormat("[FRIENDS MODULE]: Notifying {0} friends", friendList.Count); | 485 | m_log.DebugFormat( |
486 | "[FRIENDS MODULE]: Notifying {0} friends of {1} of online status {2}", | ||
487 | friendList.Count, agentID, online); | ||
488 | |||
502 | // Notify about this user status | 489 | // Notify about this user status |
503 | StatusNotify(friendList, agentID, online); | 490 | StatusNotify(friendList, agentID, online); |
504 | } | 491 | } |
@@ -515,7 +502,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
515 | { | 502 | { |
516 | // Try local | 503 | // Try local |
517 | if (LocalStatusNotification(userID, friendID, online)) | 504 | if (LocalStatusNotification(userID, friendID, online)) |
518 | return; | 505 | continue; |
519 | 506 | ||
520 | // The friend is not here [as root]. Let's forward. | 507 | // The friend is not here [as root]. Let's forward. |
521 | PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { friendID.ToString() }); | 508 | PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { friendID.ToString() }); |
@@ -523,11 +510,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
523 | { | 510 | { |
524 | PresenceInfo friendSession = null; | 511 | PresenceInfo friendSession = null; |
525 | foreach (PresenceInfo pinfo in friendSessions) | 512 | foreach (PresenceInfo pinfo in friendSessions) |
513 | { | ||
526 | if (pinfo.RegionID != UUID.Zero) // let's guard against sessions-gone-bad | 514 | if (pinfo.RegionID != UUID.Zero) // let's guard against sessions-gone-bad |
527 | { | 515 | { |
528 | friendSession = pinfo; | 516 | friendSession = pinfo; |
529 | break; | 517 | break; |
530 | } | 518 | } |
519 | } | ||
531 | 520 | ||
532 | if (friendSession != null) | 521 | if (friendSession != null) |
533 | { | 522 | { |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 0688916..321d0d2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -128,6 +128,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
128 | { | 128 | { |
129 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 129 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
130 | 130 | ||
131 | public const string GridInfoServiceConfigSectionName = "GridInfoService"; | ||
132 | |||
131 | internal IScriptEngine m_ScriptEngine; | 133 | internal IScriptEngine m_ScriptEngine; |
132 | internal ILSL_Api m_LSL_Api = null; // get a reference to the LSL API so we can call methods housed there | 134 | internal ILSL_Api m_LSL_Api = null; // get a reference to the LSL API so we can call methods housed there |
133 | internal SceneObjectPart m_host; | 135 | internal SceneObjectPart m_host; |
@@ -2041,8 +2043,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2041 | string nick = String.Empty; | 2043 | string nick = String.Empty; |
2042 | IConfigSource config = m_ScriptEngine.ConfigSource; | 2044 | IConfigSource config = m_ScriptEngine.ConfigSource; |
2043 | 2045 | ||
2044 | if (config.Configs["GridInfo"] != null) | 2046 | if (config.Configs[GridInfoServiceConfigSectionName] != null) |
2045 | nick = config.Configs["GridInfo"].GetString("gridnick", nick); | 2047 | nick = config.Configs[GridInfoServiceConfigSectionName].GetString("gridnick", nick); |
2046 | 2048 | ||
2047 | if (String.IsNullOrEmpty(nick)) | 2049 | if (String.IsNullOrEmpty(nick)) |
2048 | nick = GridUserInfo(InfoType.Nick); | 2050 | nick = GridUserInfo(InfoType.Nick); |
@@ -2058,8 +2060,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2058 | string name = String.Empty; | 2060 | string name = String.Empty; |
2059 | IConfigSource config = m_ScriptEngine.ConfigSource; | 2061 | IConfigSource config = m_ScriptEngine.ConfigSource; |
2060 | 2062 | ||
2061 | if (config.Configs["GridInfo"] != null) | 2063 | if (config.Configs[GridInfoServiceConfigSectionName] != null) |
2062 | name = config.Configs["GridInfo"].GetString("gridname", name); | 2064 | name = config.Configs[GridInfoServiceConfigSectionName].GetString("gridname", name); |
2063 | 2065 | ||
2064 | if (String.IsNullOrEmpty(name)) | 2066 | if (String.IsNullOrEmpty(name)) |
2065 | name = GridUserInfo(InfoType.Name); | 2067 | name = GridUserInfo(InfoType.Name); |
@@ -2075,8 +2077,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2075 | string loginURI = String.Empty; | 2077 | string loginURI = String.Empty; |
2076 | IConfigSource config = m_ScriptEngine.ConfigSource; | 2078 | IConfigSource config = m_ScriptEngine.ConfigSource; |
2077 | 2079 | ||
2078 | if (config.Configs["GridInfo"] != null) | 2080 | if (config.Configs[GridInfoServiceConfigSectionName] != null) |
2079 | loginURI = config.Configs["GridInfo"].GetString("login", loginURI); | 2081 | loginURI = config.Configs[GridInfoServiceConfigSectionName].GetString("login", loginURI); |
2080 | 2082 | ||
2081 | if (String.IsNullOrEmpty(loginURI)) | 2083 | if (String.IsNullOrEmpty(loginURI)) |
2082 | loginURI = GridUserInfo(InfoType.Login); | 2084 | loginURI = GridUserInfo(InfoType.Login); |
@@ -2123,8 +2125,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2123 | string retval = String.Empty; | 2125 | string retval = String.Empty; |
2124 | IConfigSource config = m_ScriptEngine.ConfigSource; | 2126 | IConfigSource config = m_ScriptEngine.ConfigSource; |
2125 | 2127 | ||
2126 | if (config.Configs["GridInfo"] != null) | 2128 | if (config.Configs[GridInfoServiceConfigSectionName] != null) |
2127 | retval = config.Configs["GridInfo"].GetString(key, retval); | 2129 | retval = config.Configs[GridInfoServiceConfigSectionName].GetString(key, retval); |
2128 | 2130 | ||
2129 | if (String.IsNullOrEmpty(retval)) | 2131 | if (String.IsNullOrEmpty(retval)) |
2130 | retval = GridUserInfo(InfoType.Custom, key); | 2132 | retval = GridUserInfo(InfoType.Custom, key); |