cosmetics

This commit is contained in:
UbitUmarov
2022-03-14 21:12:53 +00:00
parent e1de79dad2
commit 5728d634b5
6 changed files with 28 additions and 27 deletions

View File

@@ -152,7 +152,7 @@ namespace OpenSim.Server.Handlers.Grid
/// <summary>
/// Get GridInfo in json format: Used by the OSSL osGetGrid*
/// Adding the SRV_HomeIRI to the kvp returned for use in scripts
/// Adding the SRV_HomeURI to the kvp returned for use in scripts
/// </summary>
/// <returns>
/// json string

View File

@@ -198,26 +198,31 @@ namespace OpenSim.Server.Handlers.Login
if (request.Type == OSDType.Map)
{
OSDMap map = (OSDMap)request;
if (map.ContainsKey("first") && map.ContainsKey("last") && map.ContainsKey("passwd"))
if (map.TryGetValue("first", out OSD ofirst) &&
map.TryGetValue("last", out OSD olast) &&
map.TryGetValue("passwd", out OSD opass))
{
string startLocation = string.Empty;
string first = ofirst.AsString();
string last = olast.AsString();
string passwd = opass.AsString();
if (map.ContainsKey("start"))
startLocation = map["start"].AsString();
string startLocation = string.Empty;
OSD otmp;
if (map.TryGetValue("start", out otmp))
startLocation = otmp.AsString();
UUID scopeID = UUID.Zero;
if (map.ContainsKey("scope_id"))
scopeID = new UUID(map["scope_id"].AsString());
if (map.TryGetValue("scope_id", out otmp))
scopeID = new UUID(otmp.AsString());
m_log.Info("[LOGIN]: LLSD Login Requested for: '" + map["first"].AsString() + "' '" + map["last"].AsString() + "' / " + startLocation);
m_log.Info("[LOGIN]: LLSD Login Requested for: '" + first + "' '" + last + "' / " + startLocation);
LoginResponse reply = null;
reply = m_LocalService.Login(map["first"].AsString(), map["last"].AsString(), map["passwd"].AsString(), startLocation, scopeID,
map["version"].AsString(), map["channel"].AsString(), map["mac"].AsString(), map["id0"].AsString(), remoteClient);
reply = m_LocalService.Login(first, last, passwd, startLocation, scopeID,
map["version"].AsString(), map["channel"].AsString(), map["mac"].AsString(),
map["id0"].AsString(), remoteClient);
return reply.ToOSDMap();
}
}

View File

@@ -146,11 +146,9 @@ namespace OpenSim.Server.Handlers.Simulation
source.RawServerURI = null;
}
OSDMap resp = new OSDMap(2);
string reason = string.Empty;
bool result = CreateAgent(source, gatekeeper, destination, aCircuit, data.flags, data.fromLogin, ctx, out reason);
bool result = CreateAgent(source, gatekeeper, destination, aCircuit, data.flags, data.fromLogin, ctx, out string reason);
OSDMap resp = new OSDMap(3);
resp["reason"] = OSD.FromString(reason);
resp["success"] = OSD.FromBoolean(result);
// Let's also send out the IP address of the caller back to the caller (HG 1.5)