From 6d1ad6acd5cd79b29bc0253aaa16cf940eea9658 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 13 Oct 2019 19:11:21 +0100 Subject: [PATCH] viewers group search page size is 100 ( and not way to detect other value, so hardwired) --- .../CoreModules/Framework/Search/BasicSearchModule.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs b/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs index 1026eae91d..8a44ba46bc 100644 --- a/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs @@ -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);