* Sanity check for invalid response data during login in libomv and GridClient
* Couple of tiny fixes here and there git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2806 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -1016,6 +1016,7 @@ namespace GridProxy
|
||||
|
||||
// call the loginRequestDelegate
|
||||
if (loginRequestDelegate != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
loginRequestDelegate(request);
|
||||
@@ -1024,6 +1025,7 @@ namespace GridProxy
|
||||
{
|
||||
OpenMetaverse.Logger.Log("Exception in login request delegate" + e, Helpers.LogLevel.Error, e);
|
||||
}
|
||||
}
|
||||
|
||||
XmlRpcResponse response;
|
||||
try
|
||||
@@ -1038,7 +1040,30 @@ namespace GridProxy
|
||||
return;
|
||||
}
|
||||
|
||||
System.Collections.Hashtable responseData = (System.Collections.Hashtable)response.Value;
|
||||
// call the loginResponseDelegate
|
||||
if (loginResponseDelegate != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
loginResponseDelegate(response);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log("exception in login response delegate: " + e.Message, true);
|
||||
Log(e.StackTrace, true);
|
||||
}
|
||||
}
|
||||
|
||||
System.Collections.Hashtable responseData;
|
||||
try
|
||||
{
|
||||
responseData = (System.Collections.Hashtable)response.Value;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
OpenMetaverse.Logger.Log(e.Message, Helpers.LogLevel.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
// proxy any simulator address given in the XML-RPC response
|
||||
if (responseData.Contains("sim_ip") && responseData.Contains("sim_port"))
|
||||
@@ -1062,19 +1087,6 @@ namespace GridProxy
|
||||
responseData["seed_capability"] = loginURI + responseData["seed_capability"];
|
||||
}
|
||||
|
||||
// call the loginResponseDelegate
|
||||
if (loginResponseDelegate != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
loginResponseDelegate(response);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
OpenMetaverse.Logger.Log("Error in login response delegate", Helpers.LogLevel.Error, e);
|
||||
}
|
||||
}
|
||||
|
||||
// forward the XML-RPC response to the client
|
||||
StreamWriter writer = new StreamWriter(netStream);
|
||||
writer.Write("HTTP/1.0 200 OK\r\n");
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace OpenMetaverse.TestClient
|
||||
private static void Usage()
|
||||
{
|
||||
Console.WriteLine("Usage: " + Environment.NewLine +
|
||||
"TestClient.exe --first firstname --last lastname --pass password [--loginuri=\"uri\"] [--startpos \"sim/x/y/z\"] [--master \"master name\"] [--masterkey \"master uuid\"] [--gettextures] [--scriptfile \"filename\"]");
|
||||
"TestClient.exe [--first firstname --last lastname --pass password] [--file userlist.txt] [--loginuri=\"uri\"] [--startpos \"sim/x/y/z\"] [--master \"master name\"] [--masterkey \"master uuid\"] [--gettextures] [--scriptfile \"filename\"]");
|
||||
}
|
||||
|
||||
static void Main(string[] args)
|
||||
|
||||
Reference in New Issue
Block a user