diff options
11 files changed, 147 insertions, 194 deletions
diff --git a/.nant/local.include b/.nant/local.include index a9ba17d..0c23e50 100644 --- a/.nant/local.include +++ b/.nant/local.include | |||
@@ -38,52 +38,8 @@ | |||
38 | <include name=".hgignore"/> | 38 | <include name=".hgignore"/> |
39 | </fileset> | 39 | </fileset> |
40 | </delete> | 40 | </delete> |
41 | |||
42 | </target> | 41 | </target> |
43 | 42 | ||
44 | <!-- I don't think these targets are being actively used. But just in case, we'll just comment them out for now - justincc --> | ||
45 | <!-- | ||
46 | <property name="projectdir" value="opensim-0.6.9" /> | ||
47 | <target name="dist" depends="distdir"> | ||
48 | <zip zipfile="${projectdir}.zip"> | ||
49 | <fileset basedir="."> | ||
50 | <include name="${projectdir}/**" /> | ||
51 | </fileset> | ||
52 | </zip> | ||
53 | <tar destfile="${projectdir}.tar.gz" compression="GZip"> | ||
54 | <fileset basedir="."> | ||
55 | <include name="${projectdir}/**" /> | ||
56 | </fileset> | ||
57 | </tar> | ||
58 | </target> | ||
59 | |||
60 | <target name="distdir"> | ||
61 | <delete dir="${projectdir}" /> | ||
62 | <copy todir="${projectdir}"> | ||
63 | <fileset basedir="."> | ||
64 | <include name="ThirdPartyLicenses/**" /> | ||
65 | <include name="CONTRIBUTORS.txt" /> | ||
66 | <include name="README" /> | ||
67 | <include name="OpenSim/**/*.cs" /> | ||
68 | <include name="**/*.build" /> | ||
69 | <include name="**/*.csproj" /> | ||
70 | <include name="**/*.csproj.user" /> | ||
71 | <include name="**/*.sln" /> | ||
72 | <include name="bin/*.dll" /> | ||
73 | <include name="bin/*.so" /> | ||
74 | <include name="bin/*.config" /> | ||
75 | <include name="bin/assets/**" /> | ||
76 | <include name="bin/data/**" /> | ||
77 | <include name="bin/OpenSim*xml" /> | ||
78 | <include name="bin/OpenSim.ini" /> | ||
79 | <include name="bin/defaultstripe.png" /> | ||
80 | <exclude name="bin/OpenSim.*dll" /> | ||
81 | </fileset> | ||
82 | </copy> | ||
83 | <touch file="${projectdir}/bin/startup_commands.txt" /> | ||
84 | </target> | ||
85 | --> | ||
86 | |||
87 | <target name="test" depends="build, find-nunit"> | 43 | <target name="test" depends="build, find-nunit"> |
88 | <setenv name="MONO_THREADS_PER_CPU" value="100" /> | 44 | <setenv name="MONO_THREADS_PER_CPU" value="100" /> |
89 | 45 | ||
@@ -153,116 +109,6 @@ | |||
153 | <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.capabilities.handlers.tests)==0}" /> | 109 | <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.capabilities.handlers.tests)==0}" /> |
154 | 110 | ||
155 | <delete dir="%temp%"/> | 111 | <delete dir="%temp%"/> |
156 | |||
157 | </target> | ||
158 | |||
159 | <target name="test-cov" depends="build"> | ||
160 | <!-- Code Coverage Test. Prototype, only works with mono 1.2. Instructions in http://opensimulator.org/wiki/Automated_Testing --> | ||
161 | <mkdir dir="cov" failonerror="false" /> | ||
162 | <exec program="mono"> | ||
163 | <arg value="--debug" /> | ||
164 | <arg value="--profile=monocov:outfile=./cov/OpenSim.Framework.Servers.cov,+[OpenSim.Framework.Servers]" /> | ||
165 | <arg value="/usr/lib/nunit/nunit-console.exe" /> | ||
166 | <arg value="./bin/OpenSim.Framework.Servers.Tests.dll" /> | ||
167 | </exec> | ||
168 | <delete dir="./cov/OpenSim.Framework.Servers" /> | ||
169 | <exec program="monocov"> | ||
170 | <arg value="--export-html=./cov/OpenSim.Framework.Servers ./cov/OpenSim.Framework.Servers.cov" /> | ||
171 | </exec> | ||
172 | |||
173 | <!-- | ||
174 | <exec program="mono"> | ||
175 | <arg value="--debug" /> | ||
176 | <arg value="--profile=monocov:outfile=./cov/OpenSim.Region.ClientStack.LindenUDP.cov,+[OpenSim.Region.ClientStack.LindenUDP]" /> | ||
177 | <arg value="/usr/lib/nunit/nunit-console.exe" /> | ||
178 | <arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" /> | ||
179 | </exec> | ||
180 | <delete dir="./cov/OpenSim.Region.ClientStack.LindenUDP" /> | ||
181 | <exec program="monocov"> | ||
182 | <arg value="--export-html=./cov/OpenSim.Region.ClientStack.LindenUDP ./cov/OpenSim.Region.ClientStack.LindenUDP.cov" /> | ||
183 | </exec> | ||
184 | --> | ||
185 | |||
186 | <exec program="mono"> | ||
187 | <arg value="--debug" /> | ||
188 | <arg value="--profile=monocov:outfile=./cov/OpenSim.Region.ScriptEngine.Shared.cov,+[OpenSim.Region.ScriptEngine.Shared]" /> | ||
189 | <arg value="/usr/lib/nunit/nunit-console.exe" /> | ||
190 | <arg value="./bin/OpenSim.Region.ScriptEngine.Shared.Tests.dll" /> | ||
191 | </exec> | ||
192 | <delete dir="./cov/OpenSim.Region.ScriptEngine.Shared" /> | ||
193 | <exec program="monocov"> | ||
194 | <arg value="--export-html=./cov/OpenSim.Region.ScriptEngine.Shared ./cov/OpenSim.Region.ScriptEngine.Shared.cov" /> | ||
195 | </exec> | ||
196 | |||
197 | <exec program="mono"> | ||
198 | <arg value="--debug" /> | ||
199 | <arg value="--profile=monocov:outfile=./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools.cov,+[OpenSim.Region.ScriptEngine.Shared.CodeTools]" /> | ||
200 | <arg value="/usr/lib/nunit/nunit-console.exe" /> | ||
201 | <arg value="./bin/OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests.dll" /> | ||
202 | </exec> | ||
203 | <delete dir="./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools" /> | ||
204 | <exec program="monocov"> | ||
205 | <arg value="--export-html=./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools ./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools.cov" /> | ||
206 | </exec> | ||
207 | |||
208 | <exec program="mono"> | ||
209 | <arg value="--debug" /> | ||
210 | <arg value="--profile=monocov:outfile=./cov/OpenSim.Region.CoreModules.cov,+[OpenSim.Region.CoreModules]" /> | ||
211 | <arg value="/usr/lib/nunit/nunit-console.exe" /> | ||
212 | <arg value="./bin/OpenSim.Region.CoreModules.Tests.dll" /> | ||
213 | </exec> | ||
214 | <delete dir="./cov/OpenSim.Region.CoreModules" /> | ||
215 | <exec program="monocov"> | ||
216 | <arg value="--export-html=./cov/OpenSim.Region.CoreModules ./cov/OpenSim.Region.CoreModules.cov" /> | ||
217 | </exec> | ||
218 | |||
219 | <exec program="mono"> | ||
220 | <arg value="--debug" /> | ||
221 | <arg value="--profile=monocov:outfile=./cov/OpenSim.Region.OptionalModules.cov,+[OpenSim.Region.OptionalModules]" /> | ||
222 | <arg value="/usr/lib/nunit/nunit-console.exe" /> | ||
223 | <arg value="./bin/OpenSim.Region.OptionalModules.Tests.dll" /> | ||
224 | </exec> | ||
225 | <delete dir="./cov/OpenSim.Region.OptionalModules" /> | ||
226 | <exec program="monocov"> | ||
227 | <arg value="--export-html=./cov/OpenSim.Region.OptionalModules ./cov/OpenSim.Region.OptionalModules.cov" /> | ||
228 | </exec> | ||
229 | |||
230 | <exec program="mono"> | ||
231 | <arg value="--debug" /> | ||
232 | <arg value="--profile=monocov:outfile=./cov/OpenSim.Region.Framework.cov,+[OpenSim.Region.Framework]" /> | ||
233 | <arg value="/usr/lib/nunit/nunit-console.exe" /> | ||
234 | <arg value="./bin/OpenSim.Region.Framework.Tests.dll" /> | ||
235 | </exec> | ||
236 | <delete dir="./cov/OpenSim.Region.Framework" /> | ||
237 | <exec program="monocov"> | ||
238 | <arg value="--export-html=./cov/OpenSim.Region.Framework ./cov/OpenSim.Region.Framework.cov" /> | ||
239 | </exec> | ||
240 | |||
241 | <exec program="mono"> | ||
242 | <arg value="--debug" /> | ||
243 | <arg value="--profile=monocov:outfile=./cov/OpenSim.Data.SQLite.cov,+[OpenSim.Data.SQLite]" /> | ||
244 | <arg value="/usr/lib/nunit/nunit-console.exe" /> | ||
245 | <arg value="./bin/OpenSim.Data.SQLite.Tests.dll" /> | ||
246 | </exec> | ||
247 | <delete dir="./cov/OpenSim.Data.SQLite" /> | ||
248 | <exec program="monocov"> | ||
249 | <arg value="--export-html=./cov/OpenSim.Data.SQLite ./cov/OpenSim.Data.SQLite.cov" /> | ||
250 | </exec> | ||
251 | |||
252 | <exec program="mono"> | ||
253 | <arg value="--debug" /> | ||
254 | <arg value="--profile=monocov:outfile=./cov/OpenSim.Data.MySQL.cov,+[OpenSim.Data.MySQL.Tests]" /> | ||
255 | <arg value="/usr/lib/nunit/nunit-console.exe" /> | ||
256 | <arg value="./bin/OpenSim.Data.MySQL.Tests.dll" /> | ||
257 | </exec> | ||
258 | <delete dir="./cov/OpenSim.Data.MySQL" /> | ||
259 | <exec program="monocov"> | ||
260 | <arg value="--export-html=./cov/OpenSim.Data.MySQL ./cov/OpenSim.Data.MySQL.cov" /> | ||
261 | </exec> | ||
262 | |||
263 | <delete file="C:\NUnitPrimaryTrace.txt" failonerror="false" /> | ||
264 | <delete file="TestResult.xml" failonerror="false" /> | ||
265 | |||
266 | </target> | 112 | </target> |
267 | 113 | ||
268 | <target name="find-nunit"> | 114 | <target name="find-nunit"> |
@@ -275,15 +121,12 @@ | |||
275 | if="${int::parse(hasnunit2)==0}" /> | 121 | if="${int::parse(hasnunit2)==0}" /> |
276 | <property name="nunitcmd" value="nunit-console" | 122 | <property name="nunitcmd" value="nunit-console" |
277 | if="${int::parse(hasnunit2)==1}" /> | 123 | if="${int::parse(hasnunit2)==1}" /> |
278 | |||
279 | </target> | 124 | </target> |
280 | 125 | ||
281 | <!-- this is used for panda test execution --> | 126 | <!-- this is used for panda test execution --> |
282 | <!-- work in progress --> | 127 | <!-- work in progress --> |
283 | 128 | ||
284 | <target name="test-xml" depends="build, find-nunit"> | 129 | <target name="test-xml" depends="build, find-nunit"> |
285 | |||
286 | |||
287 | <mkdir dir="test-results" failonerror="false" /> | 130 | <mkdir dir="test-results" failonerror="false" /> |
288 | <!-- Unit Test Assembly --> | 131 | <!-- Unit Test Assembly --> |
289 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.tests"> | 132 | <exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.tests"> |
@@ -356,36 +199,7 @@ | |||
356 | <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.framework.tests)==0}" /> | 199 | <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.framework.tests)==0}" /> |
357 | <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.tests)==0}" /> | 200 | <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.tests)==0}" /> |
358 | <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.capabilities.handlers.tests)==0}" /> | 201 | <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.capabilities.handlers.tests)==0}" /> |
359 | |||
360 | </target> | 202 | </target> |
361 | <!-- <exec program="nunit-console.exe" failonerror="false" resultproperty="testresult.acceptancetestassembly"> --> | ||
362 | <!-- <arg value="AcceptanceTestAssembly.dll" /> --> | ||
363 | <!-- <arg value="/xml=AcceptanceTestAssembly-Results.xml" /> --> | ||
364 | <!-- </exec> --> | ||
365 | |||
366 | <!-- <fail message="Failures reported in unit tests." unless="${int::parse(testresult.unittestassembly)==0}" /> --> | ||
367 | <!-- <fail message="Failures reported in acceptance tests." unless="${int::parse(testresult.acceptancetestassembly)==0}" /> --> | ||
368 | <!-- </target> --> | ||
369 | |||
370 | |||
371 | |||
372 | <!-- <nunit2 failonerror="true" verbose="true"> --> | ||
373 | <!-- <formatter type="Xml" usefile="true" extension=".xml" outputdir="./test-results" /> --> | ||
374 | <!-- <test> --> | ||
375 | <!-- <assemblies> --> | ||
376 | <!-- <include name="./bin/OpenSim.Framework.Tests.dll" /> --> | ||
377 | <!-- <include name="./bin/OpenSim.Framework.Servers.Tests.dll" /> --> | ||
378 | <!-- <include name="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" /> --> | ||
379 | <!-- <include name="./bin/OpenSim.Region.ScriptEngine.Tests.dll" /> --> | ||
380 | <!-- <include name="./bin/OpenSim.Region.CoreModules.Tests.dll" /> --> | ||
381 | <!-- <include name="./bin/OpenSim.Region.OptionalModules.Tests.dll" /> --> | ||
382 | <!-- <include name="./bin/OpenSim.Region.Framework.Tests.dll" /> --> | ||
383 | <!-- <include name="./bin/OpenSim.Data.SQLite.Tests.dll" /> --> | ||
384 | <!-- <include name="./bin/OpenSim.Data.MySQL.Tests.dll" /> --> | ||
385 | <!-- </assemblies> --> | ||
386 | <!-- </test> --> | ||
387 | <!-- </nunit2> --> | ||
388 | <!-- </target> --> | ||
389 | 203 | ||
390 | <target name="doxygen"> | 204 | <target name="doxygen"> |
391 | <exec program="doxygen" workingdir="doc" commandline="doxygen.conf" /> | 205 | <exec program="doxygen" workingdir="doc" commandline="doxygen.conf" /> |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 258b3eb..29a69c3 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -1074,7 +1074,15 @@ namespace OpenSim.Framework | |||
1074 | void SendWindData(Vector2[] windSpeeds); | 1074 | void SendWindData(Vector2[] windSpeeds); |
1075 | void SendCloudData(float[] cloudCover); | 1075 | void SendCloudData(float[] cloudCover); |
1076 | 1076 | ||
1077 | /// <summary> | ||
1078 | /// Sent when an agent completes its movement into a region. | ||
1079 | /// </summary> | ||
1080 | /// <remarks> | ||
1081 | /// This packet marks completion of the arrival of a root avatar in a region, whether through login, region | ||
1082 | /// crossing or direct teleport. | ||
1083 | /// </remarks> | ||
1077 | void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look); | 1084 | void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look); |
1085 | |||
1078 | void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint); | 1086 | void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint); |
1079 | 1087 | ||
1080 | /// <summary> | 1088 | /// <summary> |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 1e72aa2..4ba441e 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -762,9 +762,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
762 | OutPacket(handshake, ThrottleOutPacketType.Task); | 762 | OutPacket(handshake, ThrottleOutPacketType.Task); |
763 | } | 763 | } |
764 | 764 | ||
765 | /// <summary> | ||
766 | /// | ||
767 | /// </summary> | ||
768 | public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) | 765 | public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) |
769 | { | 766 | { |
770 | AgentMovementCompletePacket mov = (AgentMovementCompletePacket)PacketPool.Instance.GetPacket(PacketType.AgentMovementComplete); | 767 | AgentMovementCompletePacket mov = (AgentMovementCompletePacket)PacketPool.Instance.GetPacket(PacketType.AgentMovementComplete); |
@@ -3480,6 +3477,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3480 | 3477 | ||
3481 | public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) | 3478 | public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) |
3482 | { | 3479 | { |
3480 | // m_log.DebugFormat( | ||
3481 | // "[LLCLIENTVIEW]: Sending avatar appearance for {0} with {1} bytes to {2} {3}", | ||
3482 | // agentID, textureEntry.Length, Name, AgentId); | ||
3483 | |||
3483 | AvatarAppearancePacket avp = (AvatarAppearancePacket)PacketPool.Instance.GetPacket(PacketType.AvatarAppearance); | 3484 | AvatarAppearancePacket avp = (AvatarAppearancePacket)PacketPool.Instance.GetPacket(PacketType.AvatarAppearance); |
3484 | // TODO: don't create new blocks if recycling an old packet | 3485 | // TODO: don't create new blocks if recycling an old packet |
3485 | avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[218]; | 3486 | avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[218]; |
@@ -3501,7 +3502,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3501 | 3502 | ||
3502 | public void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) | 3503 | public void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) |
3503 | { | 3504 | { |
3504 | //m_log.DebugFormat("[CLIENT]: Sending animations to {0}", Name); | 3505 | // m_log.DebugFormat("[LLCLIENTVIEW]: Sending animations for {0} to {1}", sourceAgentId, Name); |
3505 | 3506 | ||
3506 | AvatarAnimationPacket ani = (AvatarAnimationPacket)PacketPool.Instance.GetPacket(PacketType.AvatarAnimation); | 3507 | AvatarAnimationPacket ani = (AvatarAnimationPacket)PacketPool.Instance.GetPacket(PacketType.AvatarAnimation); |
3507 | // TODO: don't create new blocks if recycling an old packet | 3508 | // TODO: don't create new blocks if recycling an old packet |
@@ -3536,6 +3537,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3536 | /// </summary> | 3537 | /// </summary> |
3537 | public void SendAvatarDataImmediate(ISceneEntity avatar) | 3538 | public void SendAvatarDataImmediate(ISceneEntity avatar) |
3538 | { | 3539 | { |
3540 | // m_log.DebugFormat( | ||
3541 | // "[LLCLIENTVIEW]: Sending immediate object update for avatar {0} {1} to {2} {3}", | ||
3542 | // avatar.Name, avatar.UUID, Name, AgentId); | ||
3543 | |||
3539 | ScenePresence presence = avatar as ScenePresence; | 3544 | ScenePresence presence = avatar as ScenePresence; |
3540 | if (presence == null) | 3545 | if (presence == null) |
3541 | return; | 3546 | return; |
@@ -3545,7 +3550,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3545 | 3550 | ||
3546 | objupdate.RegionData.RegionHandle = presence.RegionHandle; | 3551 | objupdate.RegionData.RegionHandle = presence.RegionHandle; |
3547 | objupdate.RegionData.TimeDilation = ushort.MaxValue; | 3552 | objupdate.RegionData.TimeDilation = ushort.MaxValue; |
3548 | 3553 | ||
3549 | objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; | 3554 | objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; |
3550 | objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); | 3555 | objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); |
3551 | 3556 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs index 985acec..90fe69e 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs | |||
@@ -171,6 +171,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
171 | { | 171 | { |
172 | return m_GridUserService.GetGridUserInfo(userID); | 172 | return m_GridUserService.GetGridUserInfo(userID); |
173 | } | 173 | } |
174 | public GridUserInfo[] GetGridUserInfo(string[] userID) | ||
175 | { | ||
176 | return m_GridUserService.GetGridUserInfo(userID); | ||
177 | } | ||
174 | 178 | ||
175 | #endregion | 179 | #endregion |
176 | 180 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs index 95b3591..badb552 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs | |||
@@ -147,6 +147,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
147 | return m_RemoteConnector.GetGridUserInfo(userID); | 147 | return m_RemoteConnector.GetGridUserInfo(userID); |
148 | } | 148 | } |
149 | 149 | ||
150 | public GridUserInfo[] GetGridUserInfo(string[] userID) | ||
151 | { | ||
152 | return m_RemoteConnector.GetGridUserInfo(userID); | ||
153 | } | ||
154 | |||
150 | #endregion | 155 | #endregion |
151 | 156 | ||
152 | } | 157 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 3c9bde8..c66f30e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1212,7 +1212,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1212 | m_callbackURI = null; | 1212 | m_callbackURI = null; |
1213 | } | 1213 | } |
1214 | 1214 | ||
1215 | //m_log.DebugFormat("[SCENE PRESENCE] Completed movement"); | 1215 | // m_log.DebugFormat("[SCENE PRESENCE] Completed movement"); |
1216 | 1216 | ||
1217 | ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look); | 1217 | ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look); |
1218 | ValidateAndSendAppearanceAndAgentData(); | 1218 | ValidateAndSendAppearanceAndAgentData(); |
diff --git a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs index 4c0d52e..bf21255 100644 --- a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs +++ b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs | |||
@@ -88,6 +88,8 @@ namespace OpenSim.Server.Handlers.GridUser | |||
88 | return SetPosition(request); | 88 | return SetPosition(request); |
89 | case "getgriduserinfo": | 89 | case "getgriduserinfo": |
90 | return GetGridUserInfo(request); | 90 | return GetGridUserInfo(request); |
91 | case "getgriduserinfos": | ||
92 | return GetGridUserInfos(request); | ||
91 | } | 93 | } |
92 | m_log.DebugFormat("[GRID USER HANDLER]: unknown method request: {0}", method); | 94 | m_log.DebugFormat("[GRID USER HANDLER]: unknown method request: {0}", method); |
93 | } | 95 | } |
@@ -193,6 +195,46 @@ namespace OpenSim.Server.Handlers.GridUser | |||
193 | 195 | ||
194 | } | 196 | } |
195 | 197 | ||
198 | byte[] GetGridUserInfos(Dictionary<string, object> request) | ||
199 | { | ||
200 | |||
201 | string[] userIDs; | ||
202 | |||
203 | if (!request.ContainsKey("AgentIDs")) | ||
204 | { | ||
205 | m_log.DebugFormat("[GRID USER HANDLER]: GetGridUserInfos called without required uuids argument"); | ||
206 | return FailureResult(); | ||
207 | } | ||
208 | |||
209 | if (!(request["AgentIDs"] is List<string>)) | ||
210 | { | ||
211 | m_log.DebugFormat("[GRID USER HANDLER]: GetGridUserInfos input argument was of unexpected type {0}", request["uuids"].GetType().ToString()); | ||
212 | return FailureResult(); | ||
213 | } | ||
214 | |||
215 | userIDs = ((List<string>)request["AgentIDs"]).ToArray(); | ||
216 | |||
217 | GridUserInfo[] pinfos = m_GridUserService.GetGridUserInfo(userIDs); | ||
218 | |||
219 | Dictionary<string, object> result = new Dictionary<string, object>(); | ||
220 | if ((pinfos == null) || ((pinfos != null) && (pinfos.Length == 0))) | ||
221 | result["result"] = "null"; | ||
222 | else | ||
223 | { | ||
224 | int i = 0; | ||
225 | foreach (GridUserInfo pinfo in pinfos) | ||
226 | { | ||
227 | Dictionary<string, object> rinfoDict = pinfo.ToKeyValuePairs(); | ||
228 | result["griduser" + i] = rinfoDict; | ||
229 | i++; | ||
230 | } | ||
231 | } | ||
232 | |||
233 | string xmlString = ServerUtils.BuildXmlResponse(result); | ||
234 | UTF8Encoding encoding = new UTF8Encoding(); | ||
235 | return encoding.GetBytes(xmlString); | ||
236 | } | ||
237 | |||
196 | private bool UnpackArgs(Dictionary<string, object> request, out string user, out UUID region, out Vector3 position, out Vector3 lookAt) | 238 | private bool UnpackArgs(Dictionary<string, object> request, out string user, out UUID region, out Vector3 position, out Vector3 lookAt) |
197 | { | 239 | { |
198 | user = string.Empty; | 240 | user = string.Empty; |
diff --git a/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs b/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs index 738cc06..aa98b5d 100644 --- a/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs +++ b/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs | |||
@@ -223,5 +223,65 @@ namespace OpenSim.Services.Connectors | |||
223 | 223 | ||
224 | } | 224 | } |
225 | 225 | ||
226 | public GridUserInfo[] GetGridUserInfo(string[] userIDs) | ||
227 | { | ||
228 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | ||
229 | //sendData["SCOPEID"] = scopeID.ToString(); | ||
230 | sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString(); | ||
231 | sendData["VERSIONMAX"] = ProtocolVersions.ClientProtocolVersionMax.ToString(); | ||
232 | sendData["METHOD"] = "getgriduserinfos"; | ||
233 | |||
234 | sendData["AgentIDs"] = new List<string>(userIDs); | ||
235 | |||
236 | string reply = string.Empty; | ||
237 | string reqString = ServerUtils.BuildQueryString(sendData); | ||
238 | //m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); | ||
239 | try | ||
240 | { | ||
241 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | ||
242 | m_ServerURI + "/griduser", | ||
243 | reqString); | ||
244 | if (reply == null || (reply != null && reply == string.Empty)) | ||
245 | { | ||
246 | m_log.DebugFormat("[GRID USER CONNECTOR]: GetGridUserInfo received null or empty reply"); | ||
247 | return null; | ||
248 | } | ||
249 | } | ||
250 | catch (Exception e) | ||
251 | { | ||
252 | m_log.DebugFormat("[GRID USER CONNECTOR]: Exception when contacting grid user server: {0}", e.Message); | ||
253 | } | ||
254 | |||
255 | List<GridUserInfo> rinfos = new List<GridUserInfo>(); | ||
256 | |||
257 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | ||
258 | |||
259 | if (replyData != null) | ||
260 | { | ||
261 | if (replyData.ContainsKey("result") && | ||
262 | (replyData["result"].ToString() == "null" || replyData["result"].ToString() == "Failure")) | ||
263 | { | ||
264 | return new GridUserInfo[0]; | ||
265 | } | ||
266 | |||
267 | Dictionary<string, object>.ValueCollection pinfosList = replyData.Values; | ||
268 | //m_log.DebugFormat("[PRESENCE CONNECTOR]: GetAgents returned {0} elements", pinfosList.Count); | ||
269 | foreach (object griduser in pinfosList) | ||
270 | { | ||
271 | if (griduser is Dictionary<string, object>) | ||
272 | { | ||
273 | GridUserInfo pinfo = new GridUserInfo((Dictionary<string, object>)griduser); | ||
274 | rinfos.Add(pinfo); | ||
275 | } | ||
276 | else | ||
277 | m_log.DebugFormat("[GRID USER CONNECTOR]: GetGridUserInfo received invalid response type {0}", | ||
278 | griduser.GetType()); | ||
279 | } | ||
280 | } | ||
281 | else | ||
282 | m_log.DebugFormat("[GRID USER CONNECTOR]: GetGridUserInfo received null response"); | ||
283 | |||
284 | return rinfos.ToArray(); | ||
285 | } | ||
226 | } | 286 | } |
227 | } | 287 | } |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index 678f738..ca1b64f 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs | |||
@@ -472,6 +472,10 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
472 | return false; | 472 | return false; |
473 | } | 473 | } |
474 | 474 | ||
475 | public GridUserInfo[] GetGridUserInfo(string[] userIDs) | ||
476 | { | ||
477 | return new GridUserInfo[0]; | ||
478 | } | ||
475 | #endregion Helpers | 479 | #endregion Helpers |
476 | } | 480 | } |
477 | } | 481 | } |
diff --git a/OpenSim/Services/Interfaces/IGridUserService.cs b/OpenSim/Services/Interfaces/IGridUserService.cs index 6613ae7..0a52bfa 100644 --- a/OpenSim/Services/Interfaces/IGridUserService.cs +++ b/OpenSim/Services/Interfaces/IGridUserService.cs | |||
@@ -131,5 +131,6 @@ namespace OpenSim.Services.Interfaces | |||
131 | bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt); | 131 | bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt); |
132 | 132 | ||
133 | GridUserInfo GetGridUserInfo(string userID); | 133 | GridUserInfo GetGridUserInfo(string userID); |
134 | GridUserInfo[] GetGridUserInfo(string[] userID); | ||
134 | } | 135 | } |
135 | } \ No newline at end of file | 136 | } |
diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs index 9b18915..ac3d8fd 100644 --- a/OpenSim/Services/UserAccountService/GridUserService.cs +++ b/OpenSim/Services/UserAccountService/GridUserService.cs | |||
@@ -73,6 +73,16 @@ namespace OpenSim.Services.UserAccountService | |||
73 | return info; | 73 | return info; |
74 | } | 74 | } |
75 | 75 | ||
76 | public GridUserInfo[] GetGridUserInfo(string[] userIDs) | ||
77 | { | ||
78 | List<GridUserInfo> ret = new List<GridUserInfo>(); | ||
79 | |||
80 | foreach (string id in userIDs) | ||
81 | ret.Add(GetGridUserInfo(id)); | ||
82 | |||
83 | return ret.ToArray(); | ||
84 | } | ||
85 | |||
76 | public GridUserInfo LoggedIn(string userID) | 86 | public GridUserInfo LoggedIn(string userID) |
77 | { | 87 | { |
78 | m_log.DebugFormat("[GRID USER SERVICE]: User {0} is online", userID); | 88 | m_log.DebugFormat("[GRID USER SERVICE]: User {0} is online", userID); |
@@ -156,4 +166,4 @@ namespace OpenSim.Services.UserAccountService | |||
156 | return m_Database.Store(d); | 166 | return m_Database.Store(d); |
157 | } | 167 | } |
158 | } | 168 | } |
159 | } \ No newline at end of file | 169 | } |