ToOSD() public method

public ToOSD ( ) : OSDMap
return OSDMap
        public bool UpdateAgent (GridRegion destination, AgentPosition data)
        {
            if (m_blackListedRegions.ContainsKey (destination.ServerURI)) {
                //Check against time
                if (m_blackListedRegions [destination.ServerURI] > 3 &&
                    Util.EnvironmentTickCountSubtract (m_blackListedRegions [destination.ServerURI]) > 0) {
                    MainConsole.Instance.Warn ("[SimServiceConnector]: Blacklisted region " + destination.RegionName + " requested");
                    //Still blacklisted
                    return false;
                }
            }

            UpdateAgentPositionRequest request = new UpdateAgentPositionRequest ();
            request.Update = data;
            request.Destination = destination;

            AutoResetEvent resetEvent = new AutoResetEvent (false);
            OSDMap result = null;
            m_syncMessagePoster.Get (destination.ServerURI, request.ToOSD (), response => {
                result = response;
                resetEvent.Set ();
            });

            bool success = resetEvent.WaitOne (10000) && result != null;
            if (!success) {
                if (m_blackListedRegions.ContainsKey (destination.ServerURI)) {
                    if (m_blackListedRegions [destination.ServerURI] == 3) {
                        //add it to the blacklist as the request completely failed 3 times
                        m_blackListedRegions [destination.ServerURI] = Util.EnvironmentTickCount () + 60 * 1000; //60 seconds
                    } else if (m_blackListedRegions [destination.ServerURI] == 0)
                        m_blackListedRegions [destination.ServerURI]++;
                } else
                    m_blackListedRegions [destination.ServerURI] = 0;
                return false;
            }

            //Clear out the blacklist if it went through
            m_blackListedRegions.Remove (destination.ServerURI);

            return result ["Success"].AsBoolean ();
        }