Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
commit
dc58c985e8
|
@ -513,6 +513,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
byte flags = buffer.Data[0];
|
byte flags = buffer.Data[0];
|
||||||
bool isResend = (flags & Helpers.MSG_RESENT) != 0;
|
bool isResend = (flags & Helpers.MSG_RESENT) != 0;
|
||||||
bool isReliable = (flags & Helpers.MSG_RELIABLE) != 0;
|
bool isReliable = (flags & Helpers.MSG_RELIABLE) != 0;
|
||||||
|
bool isZerocoded = (flags & Helpers.MSG_ZEROCODED) != 0;
|
||||||
LLUDPClient udpClient = outgoingPacket.Client;
|
LLUDPClient udpClient = outgoingPacket.Client;
|
||||||
|
|
||||||
if (!udpClient.IsConnected)
|
if (!udpClient.IsConnected)
|
||||||
|
@ -522,23 +523,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
int dataLength = buffer.DataLength;
|
int dataLength = buffer.DataLength;
|
||||||
|
|
||||||
// Keep appending ACKs until there is no room left in the buffer or there are
|
// NOTE: I'm seeing problems with some viewers when ACKs are appended to zerocoded packets so I've disabled that here
|
||||||
// no more ACKs to append
|
if (!isZerocoded)
|
||||||
uint ackCount = 0;
|
|
||||||
uint ack;
|
|
||||||
while (dataLength + 5 < buffer.Data.Length && udpClient.PendingAcks.Dequeue(out ack))
|
|
||||||
{
|
{
|
||||||
Utils.UIntToBytesBig(ack, buffer.Data, dataLength);
|
// Keep appending ACKs until there is no room left in the buffer or there are
|
||||||
dataLength += 4;
|
// no more ACKs to append
|
||||||
++ackCount;
|
uint ackCount = 0;
|
||||||
}
|
uint ack;
|
||||||
|
while (dataLength + 5 < buffer.Data.Length && udpClient.PendingAcks.Dequeue(out ack))
|
||||||
|
{
|
||||||
|
Utils.UIntToBytesBig(ack, buffer.Data, dataLength);
|
||||||
|
dataLength += 4;
|
||||||
|
++ackCount;
|
||||||
|
}
|
||||||
|
|
||||||
if (ackCount > 0)
|
if (ackCount > 0)
|
||||||
{
|
{
|
||||||
// Set the last byte of the packet equal to the number of appended ACKs
|
// Set the last byte of the packet equal to the number of appended ACKs
|
||||||
buffer.Data[dataLength++] = (byte)ackCount;
|
buffer.Data[dataLength++] = (byte)ackCount;
|
||||||
// Set the appended ACKs flag on this packet
|
// Set the appended ACKs flag on this packet
|
||||||
buffer.Data[0] = (byte)(buffer.Data[0] | Helpers.MSG_APPENDED_ACKS);
|
buffer.Data[0] = (byte)(buffer.Data[0] | Helpers.MSG_APPENDED_ACKS);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer.DataLength = dataLength;
|
buffer.DataLength = dataLength;
|
||||||
|
|
|
@ -144,6 +144,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||||
return account;
|
return account;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool StoreUserAccount(UserAccount data)
|
||||||
|
{
|
||||||
|
// This remote connector refuses to serve this method
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -600,14 +600,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID)
|
public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID)
|
||||||
{
|
{
|
||||||
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||||
List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID);
|
List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID);
|
||||||
|
|
||||||
if (m_debugEnabled)
|
if (m_debugEnabled)
|
||||||
{
|
{
|
||||||
foreach (GroupMembersData member in data)
|
foreach (GroupMembersData member in data)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[GROUPS]: Member({0}) - IsOwner({1})", member.AgentID, member.IsOwner);
|
m_log.DebugFormat("[GROUPS]: Member({0}) - IsOwner({1})", member.AgentID, member.IsOwner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
@ -627,14 +627,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
{
|
{
|
||||||
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||||
|
|
||||||
List<GroupRoleMembersData> data = m_groupData.GetGroupRoleMembers(GetRequestingAgentID(remoteClient), groupID);
|
List<GroupRoleMembersData> data = m_groupData.GetGroupRoleMembers(GetRequestingAgentID(remoteClient), groupID);
|
||||||
|
|
||||||
if (m_debugEnabled)
|
if (m_debugEnabled)
|
||||||
{
|
{
|
||||||
foreach (GroupRoleMembersData member in data)
|
foreach (GroupRoleMembersData member in data)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[GROUPS]: Member({0}) - Role({1})", member.MemberID, member.RoleID);
|
m_log.DebugFormat("[GROUPS]: Member({0}) - Role({1})", member.MemberID, member.RoleID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
@ -1143,11 +1143,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
OSDMap llDataStruct = new OSDMap(3);
|
OSDMap llDataStruct = new OSDMap(3);
|
||||||
llDataStruct.Add("AgentData", AgentData);
|
llDataStruct.Add("AgentData", AgentData);
|
||||||
llDataStruct.Add("GroupData", GroupData);
|
llDataStruct.Add("GroupData", GroupData);
|
||||||
llDataStruct.Add("NewGroupData", NewGroupData);
|
llDataStruct.Add("NewGroupData", NewGroupData);
|
||||||
|
|
||||||
if (m_debugEnabled)
|
if (m_debugEnabled)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[GROUPS]: {0}", OSDParser.SerializeJsonString(llDataStruct));
|
m_log.InfoFormat("[GROUPS]: {0}", OSDParser.SerializeJsonString(llDataStruct));
|
||||||
}
|
}
|
||||||
|
|
||||||
IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
|
IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
|
||||||
|
@ -1307,16 +1307,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private UUID GetRequestingAgentID(IClientAPI client)
|
private UUID GetRequestingAgentID(IClientAPI client)
|
||||||
{
|
{
|
||||||
UUID requestingAgentID = UUID.Zero;
|
UUID requestingAgentID = UUID.Zero;
|
||||||
if (client != null)
|
if (client != null)
|
||||||
{
|
{
|
||||||
requestingAgentID = client.AgentId;
|
requestingAgentID = client.AgentId;
|
||||||
}
|
}
|
||||||
return requestingAgentID;
|
return requestingAgentID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -176,18 +176,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
|
||||||
|
|
||||||
byte[] StoreAccount(Dictionary<string, object> request)
|
byte[] StoreAccount(Dictionary<string, object> request)
|
||||||
{
|
{
|
||||||
//if (!request.ContainsKey("account"))
|
// No can do. No changing user accounts from remote sims
|
||||||
// return FailureResult();
|
|
||||||
//if (request["account"] == null)
|
|
||||||
// return FailureResult();
|
|
||||||
//if (!(request["account"] is Dictionary<string, object>))
|
|
||||||
// return FailureResult();
|
|
||||||
|
|
||||||
UserAccount account = new UserAccount(request);
|
|
||||||
|
|
||||||
if (m_UserAccountService.StoreUserAccount(account))
|
|
||||||
return SuccessResult();
|
|
||||||
|
|
||||||
return FailureResult();
|
return FailureResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
||||||
if (response["Success"].AsBoolean() && response["Identities"] is OSDArray)
|
if (response["Success"].AsBoolean() && response["Identities"] is OSDArray)
|
||||||
{
|
{
|
||||||
|
bool md5hashFound = false;
|
||||||
|
|
||||||
OSDArray identities = (OSDArray)response["Identities"];
|
OSDArray identities = (OSDArray)response["Identities"];
|
||||||
for (int i = 0; i < identities.Count; i++)
|
for (int i = 0; i < identities.Count; i++)
|
||||||
{
|
{
|
||||||
|
@ -114,13 +116,19 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
{
|
{
|
||||||
string credential = identity["Credential"].AsString();
|
string credential = identity["Credential"].AsString();
|
||||||
|
|
||||||
if (password == credential || "$1$" + Utils.MD5String(password) == credential)
|
if (password == credential || "$1$" + Utils.MD5String(password) == credential || Utils.MD5String(password) == credential)
|
||||||
return Authorize(principalID);
|
return Authorize(principalID);
|
||||||
|
|
||||||
|
md5hashFound = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.Warn("[SIMIAN AUTH CONNECTOR]: Authentication failed for " + principalID);
|
if (md5hashFound)
|
||||||
|
m_log.Warn("[SIMIAN AUTH CONNECTOR]: Authentication failed for " + principalID + " using md5hash $1$" + Utils.MD5String(password));
|
||||||
|
else
|
||||||
|
m_log.Warn("[SIMIAN AUTH CONNECTOR]: Authentication failed for " + principalID + ", no md5hash identity found");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -395,7 +395,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve sessions for " + userID + ": " + response["Message"].AsString());
|
m_log.Debug("[SIMIAN PRESENCE CONNECTOR]: No session returned for " + userID + ": " + response["Message"].AsString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,7 @@ namespace OpenSim.Services.Connectors
|
||||||
return accounts;
|
return accounts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool StoreUserAccount(UserAccount data)
|
public virtual bool StoreUserAccount(UserAccount data)
|
||||||
{
|
{
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
//sendData["SCOPEID"] = scopeID.ToString();
|
//sendData["SCOPEID"] = scopeID.ToString();
|
||||||
|
|
|
@ -134,6 +134,10 @@ namespace OpenSim.Services.UserAccountService
|
||||||
u.UserTitle = d.Data["UserTitle"].ToString();
|
u.UserTitle = d.Data["UserTitle"].ToString();
|
||||||
else
|
else
|
||||||
u.UserTitle = string.Empty;
|
u.UserTitle = string.Empty;
|
||||||
|
if (d.Data.ContainsKey("UserLevel") && d.Data["UserLevel"] != null)
|
||||||
|
Int32.TryParse(d.Data["UserLevel"], out u.UserLevel);
|
||||||
|
if (d.Data.ContainsKey("UserFlags") && d.Data["UserFlags"] != null)
|
||||||
|
Int32.TryParse(d.Data["UserFlags"], out u.UserFlags);
|
||||||
|
|
||||||
if (d.Data.ContainsKey("ServiceURLs") && d.Data["ServiceURLs"] != null)
|
if (d.Data.ContainsKey("ServiceURLs") && d.Data["ServiceURLs"] != null)
|
||||||
{
|
{
|
||||||
|
@ -218,6 +222,10 @@ namespace OpenSim.Services.UserAccountService
|
||||||
d.Data = new Dictionary<string, string>();
|
d.Data = new Dictionary<string, string>();
|
||||||
d.Data["Email"] = data.Email;
|
d.Data["Email"] = data.Email;
|
||||||
d.Data["Created"] = data.Created.ToString();
|
d.Data["Created"] = data.Created.ToString();
|
||||||
|
d.Data["UserLevel"] = data.UserLevel.ToString();
|
||||||
|
d.Data["UserFlags"] = data.UserFlags.ToString();
|
||||||
|
if (data.UserTitle != null)
|
||||||
|
d.Data["UserTitle"] = data.UserTitle.ToString();
|
||||||
|
|
||||||
List<string> parts = new List<string>();
|
List<string> parts = new List<string>();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue