Mantis#1460. Thank you, CMickeyb for a patch that addresses:
I'm getting an unhandled exception in openxmlrpcchannel during simulator initialization. I have two objects in different regions that open remote data channels in the state_entry event. It appears that the state_entry call is executing before the postinitialize method is called in xmlrpcmodule (the exception occurs because m_openChannels is not initialized).0.6.0-stable
parent
d66de83938
commit
f9a67ab5f0
|
@ -97,6 +97,16 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
|
|||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
// We need to create these early because the scripts might be calling
|
||||
// But since this gets called for every region, we need to make sure they
|
||||
// get called only one time (or we lose any open channels)
|
||||
if (null == m_openChannels)
|
||||
{
|
||||
m_openChannels = new Dictionary<LLUUID, RPCChannelInfo>();
|
||||
m_rpcPending = new Dictionary<LLUUID, RPCRequestInfo>();
|
||||
m_rpcPendingResponses = new Dictionary<LLUUID, RPCRequestInfo>();
|
||||
m_pendingSRDResponses = new Dictionary<LLUUID, SendRemoteDataRequest>();
|
||||
|
||||
try
|
||||
{
|
||||
m_remoteDataPort = config.Configs["Network"].GetInt("remoteDataPort", m_remoteDataPort);
|
||||
|
@ -104,6 +114,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
|
|||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_scenes.Contains(scene))
|
||||
{
|
||||
|
@ -117,11 +128,6 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
|
|||
{
|
||||
if (IsEnabled())
|
||||
{
|
||||
m_openChannels = new Dictionary<LLUUID, RPCChannelInfo>();
|
||||
m_rpcPending = new Dictionary<LLUUID, RPCRequestInfo>();
|
||||
m_rpcPendingResponses = new Dictionary<LLUUID, RPCRequestInfo>();
|
||||
m_pendingSRDResponses = new Dictionary<LLUUID, SendRemoteDataRequest>();
|
||||
|
||||
// Start http server
|
||||
// Attach xmlrpc handlers
|
||||
m_log.Info("[REMOTE_DATA]: " +
|
||||
|
@ -177,6 +183,13 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
|
|||
{
|
||||
LLUUID newChannel = LLUUID.Zero;
|
||||
|
||||
// This should no longer happen, but the check is reasonable anyway
|
||||
if (null == m_openChannels)
|
||||
{
|
||||
m_log.Warn("[RemoteDataReply] Attempt to open channel before initialization is complete");
|
||||
return newChannel;
|
||||
}
|
||||
|
||||
//Is a dupe?
|
||||
foreach (RPCChannelInfo ci in m_openChannels.Values)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue