示例#1
0
        protected void DoAgentDelete(IOSHttpRequest httpRequest, IOSHttpResponse httpResponse, UUID agentID, string action, UUID regionID, string auth_token)
        {
            if (string.IsNullOrEmpty(action))
            {
                m_log.DebugFormat("[AGENT HANDLER]: >>> DELETE <<< RegionID: {0}; from: {1}; auth_code: {2}",
                                  regionID, httpRequest.RemoteIPEndPoint.Address.ToString(), auth_token);
            }
            else
            {
                m_log.DebugFormat("[AGENT HANDLER]: Release {0} to RegionID: {1}", agentID, regionID);
            }


            if (action.Equals("release"))
            {
                m_SimulationService.ReleaseAgent(regionID, agentID, "");
            }
            else
            {
                GridRegion destination = new GridRegion();
                destination.RegionID = regionID;
                Util.FireAndForget(
                    o => m_SimulationService.CloseAgent(destination, agentID, auth_token), null, "AgentHandler.DoAgentDelete");
            }

            httpResponse.StatusCode = (int)HttpStatusCode.OK;
            httpResponse.RawBuffer  = Util.UTF8.GetBytes("OpenSim agent " + agentID.ToString());

            //m_log.DebugFormat("[AGENT HANDLER]: Agent {0} Released/Deleted from region {1}", id, regionID);
        }
 protected virtual void ReleaseAgent(UUID regionID, UUID id)
 {
     m_SimulationService.ReleaseAgent(regionID, id, "");
 }