logger.warning("Login server returned (some) invalid data: " + e.getMessage());
}
// Home
OSDMap home = null;
OSD osdHome = NotationalLLSDOSDParser.DeserializeLLSDNotation(reply.get("home").asString());
if (osdHome.getType().equals(OSDType.Map))
{
home = (OSDMap)osdHome;
OSD homeRegion = null;
if ( ((homeRegion = home.get("region_handle")) !=null) && homeRegion.getType().equals(OSDType.Array))
{
OSDArray homeArray = (OSDArray)homeRegion;
if (homeArray.count() == 2)
HomeRegion = new BigInteger(Utils.int64ToBytes(Utils.uintsToLong((long)homeArray.get(0).asInteger(), (long)homeArray.get(1).asInteger())));
else
HomeRegion = new BigInteger("0");
}
HomePosition = ParseVector3("position", home);
HomeLookAt = ParseVector3("look_at", home);
}
else
{
HomeRegion = new BigInteger("0");
HomePosition = Vector3.Zero;
HomeLookAt = Vector3.Zero;
}
CircuitCode = (int)ParseUInt("circuit_code", reply);
RegionX = (int)ParseUInt("region_x", reply);
RegionY = (int)ParseUInt("region_y", reply);
SimPort = (short)ParseUInt("sim_port", reply);
String simIP = ParseString("sim_ip", reply);
InetAddress[] simIParray = new InetAddress[1];
if(PlatformUtils.tryParseInetAddress(simIP, simIParray))
SimIP = simIParray[0];
else
simIParray = null;
SeedCapability = ParseString("seed_capability", reply);
// Buddy list
OSD buddyLLSD = null;
if ( ((buddyLLSD = reply.get("buddy-list"))!=null) && buddyLLSD.getType().equals(OSDType.Array))
{
List<BuddyListEntry> buddys = new ArrayList<BuddyListEntry>();
OSDArray buddyArray = (OSDArray)buddyLLSD;
for (int i = 0; i < buddyArray.count(); i++)
{