mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
If a friends identifier which is too short is given to HGFriendsModule.GetOnlineFriends() then spit out a warning rather than failing on the String.Substring().
This is to progress http://opensimulator.org/mantis/view.php?id=5789
This commit is contained in:
@@ -141,7 +141,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
{
|
||||
List<string> fList = new List<string>();
|
||||
foreach (string s in friendList)
|
||||
fList.Add(s.Substring(0, 36));
|
||||
{
|
||||
if (s.Length < 36)
|
||||
m_log.WarnFormat(
|
||||
"[HGFRIENDS MODULE]: Ignoring friend {0} ({1} chars) for {2} since identifier too short",
|
||||
s, s.Length, userID);
|
||||
else
|
||||
fList.Add(s.Substring(0, 36));
|
||||
}
|
||||
|
||||
PresenceInfo[] presence = PresenceService.GetAgents(fList.ToArray());
|
||||
foreach (PresenceInfo pi in presence)
|
||||
|
||||
Reference in New Issue
Block a user