viewers group search page size is 100 ( and not way to detect other value, so hardwired)

0.9.1.0-post-fixes
UbitUmarov 2019-10-13 19:11:21 +01:00
parent 5bbaea50e4
commit 6d1ad6acd5
1 changed files with 9 additions and 1 deletions

View File

@ -193,7 +193,7 @@ namespace OpenSim.Region.CoreModules.Framework.Search
return;
}
// filter out groups with no members
// filter out groups
DirGroupsReplyData[] result = new DirGroupsReplyData[answer.Count];
int count = 0;
foreach(DirGroupsReplyData dgrd in answer)
@ -207,10 +207,18 @@ namespace OpenSim.Region.CoreModules.Framework.Search
if ((queryStart > 0) && (queryStart < count))
{
int len = count - queryStart;
if (len > 101) // a viewer page is 100
len = 101;
DirGroupsReplyData[] tmp = new DirGroupsReplyData[len];
Array.Copy(result, queryStart, tmp, 0, len);
result = tmp;
}
else if (count > 101)
{
DirGroupsReplyData[] tmp = new DirGroupsReplyData[101];
Array.Copy(result, 0, tmp, 0, 101);
result = tmp;
}
// TODO: This currently ignores pretty much all the query flags including Mature and sort order
remoteClient.SendDirGroupsReply(queryID, result);