Thank you kindly, TLaukkan, for a patch that:

Adds connectivity to grid regions. 
* Fixed UserService cast.
* Added exception handling to avoid mxp message handling 
thread to exit and hang the module on unhandled exception.
0.6.5-rc1
Charles Krinke 2009-04-22 19:27:35 +00:00
parent 4c80685563
commit 0f08f4cc4b
2 changed files with 102 additions and 84 deletions

View File

@ -83,13 +83,20 @@ namespace OpenSim.Client.MXP
m_ticker.Start(); m_ticker.Start();
m_log.Info("[MXP] MXP Enabled and Listening"); m_log.Info("[MXP ClientStack] MXP Enabled and Listening");
} }
} }
void ticker_Elapsed(object sender, ElapsedEventArgs e) void ticker_Elapsed(object sender, ElapsedEventArgs e)
{
try
{ {
m_server.Process(); m_server.Process();
}
catch (Exception ex)
{
m_log.Error("[MXP ClientStack]: Unhandled exception in process loop: " + ex.ToString() + " :" + ex.StackTrace.ToString());
}
if (!m_shutdown) if (!m_shutdown)
m_ticker.Start(); m_ticker.Start();

View File

@ -270,6 +270,9 @@ namespace OpenSim.Client.MXP.PacketHandler
(session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" +
session.RemoteEndPoint.Port + ")"); session.RemoteEndPoint.Port + ")");
try
{
if (joinRequestMessage.BubbleId == Guid.Empty) if (joinRequestMessage.BubbleId == Guid.Empty)
{ {
foreach (Scene scene in m_scenes.Values) foreach (Scene scene in m_scenes.Values)
@ -358,7 +361,13 @@ namespace OpenSim.Client.MXP.PacketHandler
DeclineConnection(session, joinRequestMessage); DeclineConnection(session, joinRequestMessage);
} }
}
catch (Exception e)
{
m_log.Error("[MXP ClientStack]: Session join request failure: " + session.SessionId + " (" +
(session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" +
session.RemoteEndPoint.Port + "): "+e.ToString()+" :"+e.StackTrace.ToString());
}
tmpRemove.Add(session); tmpRemove.Add(session);
} }
} }
@ -528,7 +537,7 @@ namespace OpenSim.Client.MXP.PacketHandler
{ {
//Scene scene = m_scenes[sceneId]; //Scene scene = m_scenes[sceneId];
CommunicationsManager commsManager = m_scenes[sceneId].CommsManager; CommunicationsManager commsManager = m_scenes[sceneId].CommsManager;
UserManagerBase userService = (UserManagerBase)commsManager.UserService; IUserService userService = (IUserService)commsManager.UserService;
UserAgentData agent = new UserAgentData(); UserAgentData agent = new UserAgentData();
@ -565,7 +574,9 @@ namespace OpenSim.Client.MXP.PacketHandler
userProfile.CurrentAgent = agent; userProfile.CurrentAgent = agent;
userService.CommitAgent(ref userProfile);
userService.UpdateUserProfile(userProfile);
//userService.CommitAgent(ref userProfile);
} }
private void PrepareSceneForConnection(UUID sessionId, UUID sceneId, UserProfileData userProfile) private void PrepareSceneForConnection(UUID sessionId, UUID sceneId, UserProfileData userProfile)