* This slightly extends a lock in WorldCommModule so that it covers the GetNewHandle method which states in it's doc that it assumes locking has happened before the method is called * Thanks DoranZemlja0.6.3-post-fixes
parent
829c84e69f
commit
6bcf7cbb2c
|
@ -381,25 +381,25 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
||||||
|
|
||||||
if (m_curlisteners < m_maxlisteners)
|
if (m_curlisteners < m_maxlisteners)
|
||||||
{
|
{
|
||||||
int newHandle = GetNewHandle(itemID);
|
lock (m_listeners)
|
||||||
|
|
||||||
if (newHandle > 0)
|
|
||||||
{
|
{
|
||||||
ListenerInfo li = new ListenerInfo(newHandle, localID, itemID, hostID, channel, name, id, msg);
|
int newHandle = GetNewHandle(itemID);
|
||||||
|
|
||||||
lock (m_listeners)
|
if (newHandle > 0)
|
||||||
{
|
{
|
||||||
List<ListenerInfo> listeners;
|
ListenerInfo li = new ListenerInfo(newHandle, localID, itemID, hostID, channel, name, id, msg);
|
||||||
if (!m_listeners.TryGetValue(channel,out listeners))
|
|
||||||
{
|
|
||||||
listeners = new List<ListenerInfo>();
|
|
||||||
m_listeners.Add(channel, listeners);
|
|
||||||
}
|
|
||||||
listeners.Add(li);
|
|
||||||
m_curlisteners++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return newHandle;
|
List<ListenerInfo> listeners;
|
||||||
|
if (!m_listeners.TryGetValue(channel,out listeners))
|
||||||
|
{
|
||||||
|
listeners = new List<ListenerInfo>();
|
||||||
|
m_listeners.Add(channel, listeners);
|
||||||
|
}
|
||||||
|
listeners.Add(li);
|
||||||
|
m_curlisteners++;
|
||||||
|
|
||||||
|
return newHandle;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue