MW 2007-03-15 12:44:06 +00:00
parent f58edfb479
commit 1260e35ca8
4 changed files with 89 additions and 64 deletions

View File

@ -76,7 +76,8 @@ namespace OpenSim
} }
static string ParseXMLRPC(string requestBody) { static string ParseXMLRPC(string requestBody) {
try{ try
{
XmlRpcRequest request = (XmlRpcRequest)(new XmlRpcRequestDeserializer()).Deserialize(requestBody); XmlRpcRequest request = (XmlRpcRequest)(new XmlRpcRequestDeserializer()).Deserialize(requestBody);
Hashtable requestData = (Hashtable)request.Params[0]; Hashtable requestData = (Hashtable)request.Params[0];
@ -96,7 +97,9 @@ namespace OpenSim
return "<?xml version=\"1.0\"?><methodResponse><params /></methodResponse>"; return "<?xml version=\"1.0\"?><methodResponse><params /></methodResponse>";
break; break;
} }
} catch(Exception e) { }
catch(Exception e)
{
Console.WriteLine(e.ToString()); Console.WriteLine(e.ToString());
} }
return ""; return "";
@ -149,7 +152,6 @@ namespace OpenSim
break; break;
} }
byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString); byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString);
System.IO.Stream output = response.OutputStream; System.IO.Stream output = response.OutputStream;
response.SendChunked=false; response.SendChunked=false;

View File

@ -120,7 +120,8 @@ namespace OpenSim.GridServers
IGridServer GetGridServer(); IGridServer GetGridServer();
} }
public class agentcircuitdata { public class agentcircuitdata
{
public agentcircuitdata() { } public agentcircuitdata() { }
public LLUUID AgentID; public LLUUID AgentID;
public LLUUID SessionID; public LLUUID SessionID;

View File

@ -216,6 +216,21 @@ namespace OpenSim.GridServers
int SessionRand = this.RandomClass.Next(1,999); int SessionRand = this.RandomClass.Next(1,999);
Session = new LLUUID("aaaabbbb-0200-"+SessionRand.ToString("0000")+"-8664-58f53e442797"); Session = new LLUUID("aaaabbbb-0200-"+SessionRand.ToString("0000")+"-8664-58f53e442797");
//create some login info
Hashtable LoginFlagsHash = new Hashtable();
LoginFlagsHash["daylight_savings"]="N";
LoginFlagsHash["stipend_since_login"]="N";
LoginFlagsHash["gendered"]="Y";
LoginFlagsHash["ever_logged_in"]="Y";
ArrayList LoginFlags=new ArrayList();
LoginFlags.Add(LoginFlagsHash);
Hashtable GlobalT = new Hashtable();
GlobalT["sun_texture_id"] = "cce0f112-878f-4586-a2e2-a8f104bba271";
GlobalT["cloud_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
GlobalT["moon_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
ArrayList GlobalTextures = new ArrayList();
GlobalTextures.Add(GlobalT);
XmlRpcResponse response =(XmlRpcResponse)(new XmlRpcResponseDeserializer()).Deserialize(this._defaultResponse); XmlRpcResponse response =(XmlRpcResponse)(new XmlRpcResponseDeserializer()).Deserialize(this._defaultResponse);
Hashtable responseData = (Hashtable)response.Value; Hashtable responseData = (Hashtable)response.Value;
@ -224,6 +239,11 @@ namespace OpenSim.GridServers
responseData["sim_ip"] = OpenSim_Main.cfg.IPListenAddr; responseData["sim_ip"] = OpenSim_Main.cfg.IPListenAddr;
responseData["agent_id"] = Agent.ToStringHyphenated(); responseData["agent_id"] = Agent.ToStringHyphenated();
responseData["session_id"] = Session.ToStringHyphenated(); responseData["session_id"] = Session.ToStringHyphenated();
responseData["seconds_since_epoch"]=(Int32)(DateTime.UtcNow - new DateTime(1970,1,1)).TotalSeconds;
responseData["login-flags"]=LoginFlags;
responseData["global-textures"]=GlobalTextures;
//inventory
ArrayList InventoryList = (ArrayList) responseData["inventory-skeleton"]; ArrayList InventoryList = (ArrayList) responseData["inventory-skeleton"];
Hashtable Inventory1 = (Hashtable)InventoryList[0]; Hashtable Inventory1 = (Hashtable)InventoryList[0];
Hashtable Inventory2 = (Hashtable)InventoryList[1]; Hashtable Inventory2 = (Hashtable)InventoryList[1];
@ -249,7 +269,7 @@ namespace OpenSim.GridServers
_login.BaseFolder = BaseFolderID; _login.BaseFolder = BaseFolderID;
_login.InventoryFolder = InventoryFolderID; _login.InventoryFolder = InventoryFolderID;
//working on local computer so lets add to the gridserver's list of sessions? //working on local computer if so lets add to the gridserver's list of sessions?
if(OpenSim_Main.gridServers.GridServer.GetName() == "Local") if(OpenSim_Main.gridServers.GridServer.GetName() == "Local")
{ {
((LocalGridBase)this._gridServer).AddNewSession(_login); ((LocalGridBase)this._gridServer).AddNewSession(_login);

View File

@ -59,7 +59,9 @@ namespace OpenSim
public bool Incoming; public bool Incoming;
} }
public class agentcircuitdata { /* this is in IGridServer.cs, so there should be no reason for it to be here as well
public class agentcircuitdata
{
public agentcircuitdata() { } public agentcircuitdata() { }
public LLUUID AgentID; public LLUUID AgentID;
public LLUUID SessionID; public LLUUID SessionID;
@ -68,7 +70,7 @@ namespace OpenSim
public string lastname; public string lastname;
public uint circuitcode; public uint circuitcode;
} }
*/
public class BlockingQueue< T > { public class BlockingQueue< T > {
private Queue< T > _queue = new Queue< T >(); private Queue< T > _queue = new Queue< T >();