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,12 +97,23 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
try
|
// 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
|
||||||
m_remoteDataPort = config.Configs["Network"].GetInt("remoteDataPort", m_remoteDataPort);
|
// get called only one time (or we lose any open channels)
|
||||||
}
|
if (null == m_openChannels)
|
||||||
catch (Exception)
|
|
||||||
{
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_scenes.Contains(scene))
|
if (!m_scenes.Contains(scene))
|
||||||
|
@ -117,11 +128,6 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
|
||||||
{
|
{
|
||||||
if (IsEnabled())
|
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
|
// Start http server
|
||||||
// Attach xmlrpc handlers
|
// Attach xmlrpc handlers
|
||||||
m_log.Info("[REMOTE_DATA]: " +
|
m_log.Info("[REMOTE_DATA]: " +
|
||||||
|
@ -177,6 +183,13 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
|
||||||
{
|
{
|
||||||
LLUUID newChannel = LLUUID.Zero;
|
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?
|
//Is a dupe?
|
||||||
foreach (RPCChannelInfo ci in m_openChannels.Values)
|
foreach (RPCChannelInfo ci in m_openChannels.Values)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue