diff options
Diffstat (limited to 'OpenSim/Framework')
18 files changed, 379 insertions, 111 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index a6be157..5bf0b7b 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -1143,7 +1143,17 @@ namespace OpenSim.Framework | |||
1143 | void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, | 1143 | void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, |
1144 | uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner); | 1144 | uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner); |
1145 | 1145 | ||
1146 | void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, | 1146 | /// <summary> |
1147 | /// Send land properties to the client. | ||
1148 | /// </summary> | ||
1149 | /// <param name="sequence_id"></param> | ||
1150 | /// <param name="snap_selection"></param> | ||
1151 | /// <param name="request_result"></param> | ||
1152 | /// <param name="lo"></param></param> | ||
1153 | /// <param name="parcelObjectCapacity">/param> | ||
1154 | /// <param name="simObjectCapacity"></param> | ||
1155 | /// <param name="regionFlags"></param> | ||
1156 | void SendLandProperties(int sequence_id, bool snap_selection, int request_result, ILandObject lo, | ||
1147 | float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, | 1157 | float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, |
1148 | uint regionFlags); | 1158 | uint regionFlags); |
1149 | 1159 | ||
diff --git a/OpenSim/Framework/ILandChannel.cs b/OpenSim/Framework/ILandChannel.cs new file mode 100644 index 0000000..869d4c8 --- /dev/null +++ b/OpenSim/Framework/ILandChannel.cs | |||
@@ -0,0 +1,90 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System.Collections.Generic; | ||
29 | using OpenMetaverse; | ||
30 | using OpenSim.Framework; | ||
31 | |||
32 | namespace OpenSim.Region.Framework.Interfaces | ||
33 | { | ||
34 | public interface ILandChannel | ||
35 | { | ||
36 | /// <summary> | ||
37 | /// Get all parcels | ||
38 | /// </summary> | ||
39 | /// <returns></returns> | ||
40 | List<ILandObject> AllParcels(); | ||
41 | |||
42 | /// <summary> | ||
43 | /// Get the parcel at the specified point | ||
44 | /// </summary> | ||
45 | /// <param name="x">Value between 0 - 256 on the x axis of the point</param> | ||
46 | /// <param name="y">Value between 0 - 256 on the y axis of the point</param> | ||
47 | /// <returns>Land object at the point supplied</returns> | ||
48 | ILandObject GetLandObject(int x, int y); | ||
49 | |||
50 | /// <summary> | ||
51 | /// Get the parcel at the specified point | ||
52 | /// </summary> | ||
53 | /// <param name="x">Value between 0 - 256 on the x axis of the point</param> | ||
54 | /// <param name="y">Value between 0 - 256 on the y axis of the point</param> | ||
55 | /// <returns>Land object at the point supplied</returns> | ||
56 | ILandObject GetLandObject(float x, float y); | ||
57 | |||
58 | /// <summary> | ||
59 | /// Get the parcels near the specified point | ||
60 | /// </summary> | ||
61 | /// <param name="position"></param> | ||
62 | /// <returns></returns> | ||
63 | List<ILandObject> ParcelsNearPoint(Vector3 position); | ||
64 | |||
65 | /// <summary> | ||
66 | /// Get the parcel given the land's local id. | ||
67 | /// </summary> | ||
68 | /// <param name="localID"></param> | ||
69 | /// <returns></returns> | ||
70 | ILandObject GetLandObject(int localID); | ||
71 | |||
72 | /// <summary> | ||
73 | /// Clear the land channel of all parcels. | ||
74 | /// </summary> | ||
75 | /// <param name="setupDefaultParcel"> | ||
76 | /// If true, set up a default parcel covering the whole region owned by the estate owner. | ||
77 | /// </param> | ||
78 | void Clear(bool setupDefaultParcel); | ||
79 | |||
80 | bool IsForcefulBansAllowed(); | ||
81 | void UpdateLandObject(int localID, LandData data); | ||
82 | void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient); | ||
83 | void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel); | ||
84 | void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel); | ||
85 | void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime); | ||
86 | |||
87 | void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id); | ||
88 | void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id); | ||
89 | } | ||
90 | } | ||
diff --git a/OpenSim/Framework/ILandObject.cs b/OpenSim/Framework/ILandObject.cs new file mode 100644 index 0000000..5a55b02 --- /dev/null +++ b/OpenSim/Framework/ILandObject.cs | |||
@@ -0,0 +1,134 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System.Collections.Generic; | ||
29 | using OpenMetaverse; | ||
30 | |||
31 | namespace OpenSim.Framework | ||
32 | { | ||
33 | public delegate int overrideParcelMaxPrimCountDelegate(ILandObject obj); | ||
34 | public delegate int overrideSimulatorMaxPrimCountDelegate(ILandObject obj); | ||
35 | |||
36 | public interface ILandObject | ||
37 | { | ||
38 | int GetParcelMaxPrimCount(ILandObject thisObject); | ||
39 | int GetSimulatorMaxPrimCount(ILandObject thisObject); | ||
40 | int GetPrimsFree(); | ||
41 | |||
42 | LandData LandData { get; set; } | ||
43 | bool[,] LandBitmap { get; set; } | ||
44 | UUID RegionUUID { get; } | ||
45 | |||
46 | /// <summary> | ||
47 | /// Prim counts for this land object. | ||
48 | /// </summary> | ||
49 | IPrimCounts PrimCounts { get; set; } | ||
50 | |||
51 | /// <summary> | ||
52 | /// The start point for the land object. This is the western-most point as one scans land working from | ||
53 | /// north to south. | ||
54 | /// </summary> | ||
55 | Vector3 StartPoint { get; } | ||
56 | |||
57 | /// <summary> | ||
58 | /// The end point for the land object. This is the eastern-most point as one scans land working from | ||
59 | /// south to north. | ||
60 | /// </summary> | ||
61 | Vector3 EndPoint { get; } | ||
62 | |||
63 | bool ContainsPoint(int x, int y); | ||
64 | |||
65 | ILandObject Copy(); | ||
66 | |||
67 | void SendLandUpdateToAvatarsOverMe(); | ||
68 | |||
69 | void SendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client); | ||
70 | void UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client); | ||
71 | bool IsEitherBannedOrRestricted(UUID avatar); | ||
72 | bool IsBannedFromLand(UUID avatar); | ||
73 | bool IsRestrictedFromLand(UUID avatar); | ||
74 | void SendLandUpdateToClient(IClientAPI remote_client); | ||
75 | void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client); | ||
76 | List<UUID> CreateAccessListArrayByFlag(AccessList flag); | ||
77 | void SendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client); | ||
78 | void UpdateAccessList(uint flags, UUID transactionID, int sequenceID, int sections, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client); | ||
79 | void UpdateLandBitmapByteArray(); | ||
80 | void SetLandBitmapFromByteArray(); | ||
81 | bool[,] GetLandBitmap(); | ||
82 | void ForceUpdateLandInfo(); | ||
83 | void SetLandBitmap(bool[,] bitmap); | ||
84 | |||
85 | /// <summary> | ||
86 | /// Get a land bitmap that would cover an entire region. | ||
87 | /// </summary> | ||
88 | /// <returns>The bitmap created.</returns> | ||
89 | bool[,] BasicFullRegionLandBitmap(); | ||
90 | |||
91 | /// <summary> | ||
92 | /// Create a square land bitmap. | ||
93 | /// </summary> | ||
94 | /// <remarks> | ||
95 | /// Land co-ordinates are zero indexed. The inputs are treated as points. So if you want to create a bitmap | ||
96 | /// that covers an entire 256 x 256m region apart from a strip of land on the east, then you would need to | ||
97 | /// specify start_x = 0, start_y = 0, end_x = 252 (or anything up to 255), end_y = 256. | ||
98 | /// | ||
99 | /// At the moment, the smallest parcel of land is 4m x 4m, so if the | ||
100 | /// region is 256 x 256m (the SL size), the bitmap returned will start at (0,0) and end at (63,63). | ||
101 | /// </remarks> | ||
102 | /// <param name="start_x"></param> | ||
103 | /// <param name="start_y"></param> | ||
104 | /// <param name="end_x"></param> | ||
105 | /// <param name="end_y"></param> | ||
106 | /// <returns>The bitmap created.</returns> | ||
107 | bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y); | ||
108 | |||
109 | bool[,] ModifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value); | ||
110 | bool[,] MergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add); | ||
111 | void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client); | ||
112 | void SendLandObjectOwners(IClientAPI remote_client); | ||
113 | void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client); | ||
114 | void ResetOverMeRecord(); | ||
115 | void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area); | ||
116 | |||
117 | void DeedToGroup(UUID groupID); | ||
118 | |||
119 | void SetParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel); | ||
120 | void SetSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel); | ||
121 | |||
122 | /// <summary> | ||
123 | /// Set the media url for this land parcel | ||
124 | /// </summary> | ||
125 | /// <param name="url"></param> | ||
126 | void SetMediaUrl(string url); | ||
127 | |||
128 | /// <summary> | ||
129 | /// Set the music url for this land parcel | ||
130 | /// </summary> | ||
131 | /// <param name="url"></param> | ||
132 | void SetMusicUrl(string url); | ||
133 | } | ||
134 | } | ||
diff --git a/OpenSim/Framework/IPrimCounts.cs b/OpenSim/Framework/IPrimCounts.cs new file mode 100644 index 0000000..3e12348 --- /dev/null +++ b/OpenSim/Framework/IPrimCounts.cs | |||
@@ -0,0 +1,74 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using OpenMetaverse; | ||
29 | |||
30 | namespace OpenSim.Framework | ||
31 | { | ||
32 | public interface IPrimCounts | ||
33 | { | ||
34 | /// <summary> | ||
35 | /// Parcel owner owned prims | ||
36 | /// </summary> | ||
37 | int Owner { get; } | ||
38 | |||
39 | /// <summary> | ||
40 | /// Parcel group owned prims | ||
41 | /// </summary> | ||
42 | int Group { get; } | ||
43 | |||
44 | /// <summary> | ||
45 | /// Prims owned by others (not parcel owner or parcel group). | ||
46 | /// </summary> | ||
47 | int Others { get; } | ||
48 | |||
49 | /// <summary> | ||
50 | /// Selected prims | ||
51 | /// </summary> | ||
52 | int Selected { get; } | ||
53 | |||
54 | /// <summary> | ||
55 | /// Total prims on the parcel. | ||
56 | /// </summary> | ||
57 | int Total { get; } | ||
58 | |||
59 | /// <summary> | ||
60 | /// Prims on the simulator that are owned by the parcel owner, even if they are in other parcels. | ||
61 | /// </summary> | ||
62 | int Simulator { get; } | ||
63 | |||
64 | /// <summary> | ||
65 | /// Prims per individual users. | ||
66 | /// </summary> | ||
67 | IUserPrimCounts Users { get; } | ||
68 | } | ||
69 | |||
70 | public interface IUserPrimCounts | ||
71 | { | ||
72 | int this[UUID agentID] { get; } | ||
73 | } | ||
74 | } \ No newline at end of file | ||
diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs index a9a493d..c107143 100644 --- a/OpenSim/Framework/LandData.cs +++ b/OpenSim/Framework/LandData.cs | |||
@@ -54,12 +54,10 @@ namespace OpenSim.Framework | |||
54 | private int _claimPrice = 0; //Unemplemented | 54 | private int _claimPrice = 0; //Unemplemented |
55 | private UUID _globalID = UUID.Zero; | 55 | private UUID _globalID = UUID.Zero; |
56 | private UUID _groupID = UUID.Zero; | 56 | private UUID _groupID = UUID.Zero; |
57 | private int _groupPrims = 0; | ||
58 | private bool _isGroupOwned = false; | 57 | private bool _isGroupOwned = false; |
59 | private byte[] _bitmap = new byte[512]; | 58 | private byte[] _bitmap = new byte[512]; |
60 | private string _description = String.Empty; | 59 | private string _description = String.Empty; |
61 | 60 | ||
62 | |||
63 | private uint _flags = (uint) ParcelFlags.AllowFly | (uint) ParcelFlags.AllowLandmark | | 61 | private uint _flags = (uint) ParcelFlags.AllowFly | (uint) ParcelFlags.AllowLandmark | |
64 | (uint) ParcelFlags.AllowAPrimitiveEntry | | 62 | (uint) ParcelFlags.AllowAPrimitiveEntry | |
65 | (uint) ParcelFlags.AllowDeedToGroup | (uint) ParcelFlags.AllowTerraform | | 63 | (uint) ParcelFlags.AllowDeedToGroup | (uint) ParcelFlags.AllowTerraform | |
@@ -72,17 +70,13 @@ namespace OpenSim.Framework | |||
72 | private int _localID = 0; | 70 | private int _localID = 0; |
73 | private byte _mediaAutoScale = 0; | 71 | private byte _mediaAutoScale = 0; |
74 | private UUID _mediaID = UUID.Zero; | 72 | private UUID _mediaID = UUID.Zero; |
75 | |||
76 | private string _mediaURL = String.Empty; | 73 | private string _mediaURL = String.Empty; |
77 | private string _musicURL = String.Empty; | 74 | private string _musicURL = String.Empty; |
78 | private int _otherPrims = 0; | ||
79 | private UUID _ownerID = UUID.Zero; | 75 | private UUID _ownerID = UUID.Zero; |
80 | private int _ownerPrims = 0; | ||
81 | private List<ParcelManager.ParcelAccessEntry> _parcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); | 76 | private List<ParcelManager.ParcelAccessEntry> _parcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); |
82 | private float _passHours = 0; | 77 | private float _passHours = 0; |
83 | private int _passPrice = 0; | 78 | private int _passPrice = 0; |
84 | private int _salePrice = 0; //Unemeplemented. Parcels price. | 79 | private int _salePrice = 0; //Unemeplemented. Parcels price. |
85 | private int _selectedPrims = 0; | ||
86 | private int _simwideArea = 0; | 80 | private int _simwideArea = 0; |
87 | private int _simwidePrims = 0; | 81 | private int _simwidePrims = 0; |
88 | private UUID _snapshotID = UUID.Zero; | 82 | private UUID _snapshotID = UUID.Zero; |
@@ -284,19 +278,6 @@ namespace OpenSim.Framework | |||
284 | } | 278 | } |
285 | 279 | ||
286 | /// <summary> | 280 | /// <summary> |
287 | /// Number of SceneObjectPart that are owned by a Group | ||
288 | /// </summary> | ||
289 | [XmlIgnore] | ||
290 | public int GroupPrims { | ||
291 | get { | ||
292 | return _groupPrims; | ||
293 | } | ||
294 | set { | ||
295 | _groupPrims = value; | ||
296 | } | ||
297 | } | ||
298 | |||
299 | /// <summary> | ||
300 | /// Returns true if the Land Parcel is owned by a group | 281 | /// Returns true if the Land Parcel is owned by a group |
301 | /// </summary> | 282 | /// </summary> |
302 | public bool IsGroupOwned { | 283 | public bool IsGroupOwned { |
@@ -454,20 +435,6 @@ namespace OpenSim.Framework | |||
454 | } | 435 | } |
455 | 436 | ||
456 | /// <summary> | 437 | /// <summary> |
457 | /// Number of SceneObjectPart that are owned by users who do not own the parcel | ||
458 | /// and don't have the 'group. These are elegable for AutoReturn collection | ||
459 | /// </summary> | ||
460 | [XmlIgnore] | ||
461 | public int OtherPrims { | ||
462 | get { | ||
463 | return _otherPrims; | ||
464 | } | ||
465 | set { | ||
466 | _otherPrims = value; | ||
467 | } | ||
468 | } | ||
469 | |||
470 | /// <summary> | ||
471 | /// Owner Avatar or Group of the parcel. Naturally, all land masses must be | 438 | /// Owner Avatar or Group of the parcel. Naturally, all land masses must be |
472 | /// owned by someone | 439 | /// owned by someone |
473 | /// </summary> | 440 | /// </summary> |
@@ -481,19 +448,6 @@ namespace OpenSim.Framework | |||
481 | } | 448 | } |
482 | 449 | ||
483 | /// <summary> | 450 | /// <summary> |
484 | /// Number of SceneObjectPart that are owned by the owner of the parcel | ||
485 | /// </summary> | ||
486 | [XmlIgnore] | ||
487 | public int OwnerPrims { | ||
488 | get { | ||
489 | return _ownerPrims; | ||
490 | } | ||
491 | set { | ||
492 | _ownerPrims = value; | ||
493 | } | ||
494 | } | ||
495 | |||
496 | /// <summary> | ||
497 | /// List of access data for the parcel. User data, some bitflags, and a time | 451 | /// List of access data for the parcel. User data, some bitflags, and a time |
498 | /// </summary> | 452 | /// </summary> |
499 | public List<ParcelManager.ParcelAccessEntry> ParcelAccessList { | 453 | public List<ParcelManager.ParcelAccessEntry> ParcelAccessList { |
@@ -542,19 +496,6 @@ namespace OpenSim.Framework | |||
542 | } | 496 | } |
543 | 497 | ||
544 | /// <summary> | 498 | /// <summary> |
545 | /// Number of SceneObjectPart that are currently selected by avatar | ||
546 | /// </summary> | ||
547 | [XmlIgnore] | ||
548 | public int SelectedPrims { | ||
549 | get { | ||
550 | return _selectedPrims; | ||
551 | } | ||
552 | set { | ||
553 | _selectedPrims = value; | ||
554 | } | ||
555 | } | ||
556 | |||
557 | /// <summary> | ||
558 | /// Number of meters^2 in the Simulator | 499 | /// Number of meters^2 in the Simulator |
559 | /// </summary> | 500 | /// </summary> |
560 | [XmlIgnore] | 501 | [XmlIgnore] |
@@ -619,7 +560,7 @@ namespace OpenSim.Framework | |||
619 | } | 560 | } |
620 | 561 | ||
621 | /// <summary> | 562 | /// <summary> |
622 | /// Number of minutes to return SceneObjectGroup that are owned by someone who doesn't own | 563 | /// Autoreturn number of minutes to return SceneObjectGroup that are owned by someone who doesn't own |
623 | /// the parcel and isn't set to the same 'group' as the parcel. | 564 | /// the parcel and isn't set to the same 'group' as the parcel. |
624 | /// </summary> | 565 | /// </summary> |
625 | public int OtherCleanTime { | 566 | public int OtherCleanTime { |
@@ -666,10 +607,6 @@ namespace OpenSim.Framework | |||
666 | landData._claimPrice = _claimPrice; | 607 | landData._claimPrice = _claimPrice; |
667 | landData._globalID = _globalID; | 608 | landData._globalID = _globalID; |
668 | landData._groupID = _groupID; | 609 | landData._groupID = _groupID; |
669 | landData._groupPrims = _groupPrims; | ||
670 | landData._otherPrims = _otherPrims; | ||
671 | landData._ownerPrims = _ownerPrims; | ||
672 | landData._selectedPrims = _selectedPrims; | ||
673 | landData._isGroupOwned = _isGroupOwned; | 610 | landData._isGroupOwned = _isGroupOwned; |
674 | landData._localID = _localID; | 611 | landData._localID = _localID; |
675 | landData._landingType = _landingType; | 612 | landData._landingType = _landingType; |
@@ -731,4 +668,4 @@ namespace OpenSim.Framework | |||
731 | return land; | 668 | return land; |
732 | } | 669 | } |
733 | } | 670 | } |
734 | } | 671 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index 927415e..7b5fb2e 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs | |||
@@ -250,7 +250,7 @@ namespace OpenSim.Framework | |||
250 | { | 250 | { |
251 | get | 251 | get |
252 | { | 252 | { |
253 | //m_log.DebugFormat("[SHAPE]: get m_textureEntry length {0}", m_textureEntry.Length); | 253 | // m_log.DebugFormat("[SHAPE]: get m_textureEntry length {0}", m_textureEntry.Length); |
254 | try { return new Primitive.TextureEntry(m_textureEntry, 0, m_textureEntry.Length); } | 254 | try { return new Primitive.TextureEntry(m_textureEntry, 0, m_textureEntry.Length); } |
255 | catch { } | 255 | catch { } |
256 | 256 | ||
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 680e702..daf0a25 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -347,7 +347,6 @@ namespace OpenSim.Framework | |||
347 | 347 | ||
348 | public bool commFailTF = false; | 348 | public bool commFailTF = false; |
349 | public ConfigurationMember configMember; | 349 | public ConfigurationMember configMember; |
350 | public string DataStore = String.Empty; | ||
351 | public string RegionFile = String.Empty; | 350 | public string RegionFile = String.Empty; |
352 | public bool isSandbox = false; | 351 | public bool isSandbox = false; |
353 | public bool Persistent = true; | 352 | public bool Persistent = true; |
@@ -746,10 +745,6 @@ namespace OpenSim.Framework | |||
746 | m_regionLocX = Convert.ToUInt32(locationElements[0]); | 745 | m_regionLocX = Convert.ToUInt32(locationElements[0]); |
747 | m_regionLocY = Convert.ToUInt32(locationElements[1]); | 746 | m_regionLocY = Convert.ToUInt32(locationElements[1]); |
748 | 747 | ||
749 | |||
750 | // Datastore (is this implemented? Omitted from example!) | ||
751 | DataStore = config.GetString("Datastore", String.Empty); | ||
752 | |||
753 | // Internal IP | 748 | // Internal IP |
754 | IPAddress address; | 749 | IPAddress address; |
755 | 750 | ||
@@ -846,9 +841,6 @@ namespace OpenSim.Framework | |||
846 | string location = String.Format("{0},{1}", m_regionLocX, m_regionLocY); | 841 | string location = String.Format("{0},{1}", m_regionLocX, m_regionLocY); |
847 | config.Set("Location", location); | 842 | config.Set("Location", location); |
848 | 843 | ||
849 | if (DataStore != String.Empty) | ||
850 | config.Set("Datastore", DataStore); | ||
851 | |||
852 | config.Set("InternalAddress", m_internalEndPoint.Address.ToString()); | 844 | config.Set("InternalAddress", m_internalEndPoint.Address.ToString()); |
853 | config.Set("InternalPort", m_internalEndPoint.Port); | 845 | config.Set("InternalPort", m_internalEndPoint.Port); |
854 | 846 | ||
@@ -1025,9 +1017,6 @@ namespace OpenSim.Framework | |||
1025 | case "sim_location_y": | 1017 | case "sim_location_y": |
1026 | m_regionLocY = (uint) configuration_result; | 1018 | m_regionLocY = (uint) configuration_result; |
1027 | break; | 1019 | break; |
1028 | case "datastore": | ||
1029 | DataStore = (string) configuration_result; | ||
1030 | break; | ||
1031 | case "internal_ip_address": | 1020 | case "internal_ip_address": |
1032 | IPAddress address = (IPAddress) configuration_result; | 1021 | IPAddress address = (IPAddress) configuration_result; |
1033 | m_internalEndPoint = new IPEndPoint(address, 0); | 1022 | m_internalEndPoint = new IPEndPoint(address, 0); |
@@ -1175,11 +1164,6 @@ namespace OpenSim.Framework | |||
1175 | return regionInfo; | 1164 | return regionInfo; |
1176 | } | 1165 | } |
1177 | 1166 | ||
1178 | public int getInternalEndPointPort() | ||
1179 | { | ||
1180 | return m_internalEndPoint.Port; | ||
1181 | } | ||
1182 | |||
1183 | public Dictionary<string, object> ToKeyValuePairs() | 1167 | public Dictionary<string, object> ToKeyValuePairs() |
1184 | { | 1168 | { |
1185 | Dictionary<string, object> kvp = new Dictionary<string, object>(); | 1169 | Dictionary<string, object> kvp = new Dictionary<string, object>(); |
@@ -1198,4 +1182,4 @@ namespace OpenSim.Framework | |||
1198 | return kvp; | 1182 | return kvp; |
1199 | } | 1183 | } |
1200 | } | 1184 | } |
1201 | } | 1185 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs index 63e09ae..0aae4ff 100644 --- a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs +++ b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs | |||
@@ -25,15 +25,19 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using log4net; | ||
28 | using System; | 29 | using System; |
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using System.IO; | 31 | using System.IO; |
32 | using System.Reflection; | ||
31 | using Nini.Config; | 33 | using Nini.Config; |
32 | 34 | ||
33 | namespace OpenSim.Framework.RegionLoader.Filesystem | 35 | namespace OpenSim.Framework.RegionLoader.Filesystem |
34 | { | 36 | { |
35 | public class RegionLoaderFileSystem : IRegionLoader | 37 | public class RegionLoaderFileSystem : IRegionLoader |
36 | { | 38 | { |
39 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
37 | private IConfigSource m_configSource; | 41 | private IConfigSource m_configSource; |
38 | 42 | ||
39 | public void SetIniConfigSource(IConfigSource configSource) | 43 | public void SetIniConfigSource(IConfigSource configSource) |
@@ -63,36 +67,48 @@ namespace OpenSim.Framework.RegionLoader.Filesystem | |||
63 | string[] configFiles = Directory.GetFiles(regionConfigPath, "*.xml"); | 67 | string[] configFiles = Directory.GetFiles(regionConfigPath, "*.xml"); |
64 | string[] iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); | 68 | string[] iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); |
65 | 69 | ||
70 | // Create an empty Regions.ini if there are no existing config files. | ||
66 | if (configFiles.Length == 0 && iniFiles.Length == 0) | 71 | if (configFiles.Length == 0 && iniFiles.Length == 0) |
67 | { | 72 | { |
68 | new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "Regions.ini"), false, m_configSource); | 73 | new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "Regions.ini"), false, m_configSource); |
69 | iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); | 74 | iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); |
70 | } | 75 | } |
76 | |||
77 | m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config files from {0}", regionConfigPath); | ||
71 | 78 | ||
72 | List<RegionInfo> regionInfos = new List<RegionInfo>(); | 79 | List<RegionInfo> regionInfos = new List<RegionInfo>(); |
73 | 80 | ||
74 | int i = 0; | 81 | int i = 0; |
75 | foreach (string file in iniFiles) | 82 | foreach (string file in iniFiles) |
76 | { | 83 | { |
84 | m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config file {0}", file); | ||
85 | |||
77 | IConfigSource source = new IniConfigSource(file); | 86 | IConfigSource source = new IniConfigSource(file); |
78 | 87 | ||
79 | foreach (IConfig config in source.Configs) | 88 | foreach (IConfig config in source.Configs) |
80 | { | 89 | { |
81 | //m_log.Info("[REGIONLOADERFILESYSTEM]: Creating RegionInfo for " + config.Name); | ||
82 | RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), file, false, m_configSource, config.Name); | 90 | RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), file, false, m_configSource, config.Name); |
83 | regionInfos.Add(regionInfo); | 91 | regionInfos.Add(regionInfo); |
92 | |||
93 | m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loaded config for region {0}", regionInfo.RegionName); | ||
94 | |||
84 | i++; | 95 | i++; |
85 | } | 96 | } |
86 | } | 97 | } |
87 | 98 | ||
88 | foreach (string file in configFiles) | 99 | foreach (string file in configFiles) |
89 | { | 100 | { |
101 | m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config file {0}", file); | ||
102 | |||
90 | RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), file, false, m_configSource); | 103 | RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), file, false, m_configSource); |
91 | regionInfos.Add(regionInfo); | 104 | regionInfos.Add(regionInfo); |
105 | |||
106 | m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loaded config for region {0}", regionInfo.RegionName); | ||
107 | |||
92 | i++; | 108 | i++; |
93 | } | 109 | } |
94 | 110 | ||
95 | return regionInfos.ToArray(); | 111 | return regionInfos.ToArray(); |
96 | } | 112 | } |
97 | } | 113 | } |
98 | } | 114 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs index 0ec4af5..de4898a 100644 --- a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs +++ b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs | |||
@@ -66,9 +66,9 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
66 | { | 66 | { |
67 | HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url); | 67 | HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url); |
68 | webRequest.Timeout = 30000; //30 Second Timeout | 68 | webRequest.Timeout = 30000; //30 Second Timeout |
69 | m_log.Debug("[WEBLOADER]: Sending Download Request..."); | 69 | m_log.DebugFormat("[WEBLOADER]: Sending download request to {0}", url); |
70 | HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse(); | 70 | HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse(); |
71 | m_log.Debug("[WEBLOADER]: Downloading Region Information From Remote Server..."); | 71 | m_log.Debug("[WEBLOADER]: Downloading region information..."); |
72 | StreamReader reader = new StreamReader(webResponse.GetResponseStream()); | 72 | StreamReader reader = new StreamReader(webResponse.GetResponseStream()); |
73 | string xmlSource = String.Empty; | 73 | string xmlSource = String.Empty; |
74 | string tempStr = reader.ReadLine(); | 74 | string tempStr = reader.ReadLine(); |
diff --git a/OpenSim/Framework/Serialization/External/OspResolver.cs b/OpenSim/Framework/Serialization/External/OspResolver.cs index 7e3dd1b..d31d27c 100644 --- a/OpenSim/Framework/Serialization/External/OspResolver.cs +++ b/OpenSim/Framework/Serialization/External/OspResolver.cs | |||
@@ -66,6 +66,8 @@ namespace OpenSim.Framework.Serialization | |||
66 | UserAccount account = userService.GetUserAccount(UUID.Zero, userId); | 66 | UserAccount account = userService.GetUserAccount(UUID.Zero, userId); |
67 | if (account != null) | 67 | if (account != null) |
68 | return MakeOspa(account.FirstName, account.LastName); | 68 | return MakeOspa(account.FirstName, account.LastName); |
69 | // else | ||
70 | // m_log.WarnFormat("[OSP RESOLVER]: No user account for {0}", userId); | ||
69 | 71 | ||
70 | return null; | 72 | return null; |
71 | } | 73 | } |
@@ -77,6 +79,8 @@ namespace OpenSim.Framework.Serialization | |||
77 | /// <returns></returns> | 79 | /// <returns></returns> |
78 | public static string MakeOspa(string firstName, string lastName) | 80 | public static string MakeOspa(string firstName, string lastName) |
79 | { | 81 | { |
82 | // m_log.DebugFormat("[OSP RESOLVER]: Making OSPA for {0} {1}", firstName, lastName); | ||
83 | |||
80 | return | 84 | return |
81 | OSPA_PREFIX + OSPA_NAME_KEY + OSPA_PAIR_SEPARATOR + firstName + OSPA_NAME_VALUE_SEPARATOR + lastName; | 85 | OSPA_PREFIX + OSPA_NAME_KEY + OSPA_PAIR_SEPARATOR + firstName + OSPA_NAME_VALUE_SEPARATOR + lastName; |
82 | } | 86 | } |
@@ -97,7 +101,10 @@ namespace OpenSim.Framework.Serialization | |||
97 | public static UUID ResolveOspa(string ospa, IUserAccountService userService) | 101 | public static UUID ResolveOspa(string ospa, IUserAccountService userService) |
98 | { | 102 | { |
99 | if (!ospa.StartsWith(OSPA_PREFIX)) | 103 | if (!ospa.StartsWith(OSPA_PREFIX)) |
100 | return UUID.Zero; | 104 | { |
105 | // m_log.DebugFormat("[OSP RESOLVER]: ResolveOspa() got unrecognized format [{0}]", ospa); | ||
106 | return UUID.Zero; | ||
107 | } | ||
101 | 108 | ||
102 | // m_log.DebugFormat("[OSP RESOLVER]: Resolving {0}", ospa); | 109 | // m_log.DebugFormat("[OSP RESOLVER]: Resolving {0}", ospa); |
103 | 110 | ||
@@ -161,7 +168,17 @@ namespace OpenSim.Framework.Serialization | |||
161 | 168 | ||
162 | UserAccount account = userService.GetUserAccount(UUID.Zero, firstName, lastName); | 169 | UserAccount account = userService.GetUserAccount(UUID.Zero, firstName, lastName); |
163 | if (account != null) | 170 | if (account != null) |
171 | { | ||
172 | // m_log.DebugFormat( | ||
173 | // "[OSP RESOLVER]: Found user account with uuid {0} for {1} {2}", | ||
174 | // account.PrincipalID, firstName, lastName); | ||
175 | |||
164 | return account.PrincipalID; | 176 | return account.PrincipalID; |
177 | } | ||
178 | // else | ||
179 | // { | ||
180 | // m_log.DebugFormat("[OSP RESOLVER]: No resolved OSPA user account for {0}", name); | ||
181 | // } | ||
165 | 182 | ||
166 | // XXX: Disable temporary user profile creation for now as implementation is incomplete - justincc | 183 | // XXX: Disable temporary user profile creation for now as implementation is incomplete - justincc |
167 | /* | 184 | /* |
diff --git a/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs index 70e87b3..c69c89d 100644 --- a/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs +++ b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs | |||
@@ -42,10 +42,7 @@ namespace OpenSim.Framework.Serialization.Tests | |||
42 | private LandData landWithParcelAccessList; | 42 | private LandData landWithParcelAccessList; |
43 | 43 | ||
44 | private static string preSerialized = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList />\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation><0, 0, 0></UserLocation>\n <UserLookAt><0, 0, 0></UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>"; | 44 | private static string preSerialized = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList />\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation><0, 0, 0></UserLocation>\n <UserLookAt><0, 0, 0></UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>"; |
45 | private static string preSerializedWithParcelAccessList = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList>\n <ParcelAccessEntry>\n <AgentID>62d65d45-c91a-4f77-862c-46557d978b6c</AgentID>\n <Time>2009-10-01T00:00:00</Time>\n <AccessList>2</AccessList>\n </ParcelAccessEntry>\n <ParcelAccessEntry>\n <AgentID>ec2a8d18-2378-4fe0-8b68-2a31b57c481e</AgentID>\n <Time>2010-10-20T00:00:00</Time>\n <AccessList>1</AccessList>\n </ParcelAccessEntry>\n </ParcelAccessList>\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation><0, 0, 0></UserLocation>\n <UserLookAt><0, 0, 0></UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>"; | 45 | private static string preSerializedWithParcelAccessList = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList>\n <ParcelAccessEntry>\n <AgentID>62d65d45-c91a-4f77-862c-46557d978b6c</AgentID>\n <Time>2009-10-01T00:00:00</Time>\n <AccessList>2</AccessList>\n </ParcelAccessEntry>\n <ParcelAccessEntry>\n <AgentID>ec2a8d18-2378-4fe0-8b68-2a31b57c481e</AgentID>\n <Time>2010-10-20T00:00:00</Time>\n <AccessList>1</AccessList>\n </ParcelAccessEntry>\n </ParcelAccessList>\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation><0, 0, 0></UserLocation>\n <UserLookAt><0, 0, 0></UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>"; |
46 | |||
47 | |||
48 | |||
49 | 46 | ||
50 | [SetUp] | 47 | [SetUp] |
51 | public void setup() | 48 | public void setup() |
@@ -62,7 +59,6 @@ namespace OpenSim.Framework.Serialization.Tests | |||
62 | this.land.ClaimPrice = 0; | 59 | this.land.ClaimPrice = 0; |
63 | this.land.GlobalID = new UUID("54ff9641-dd40-4a2c-b1f1-47dd3af24e50"); | 60 | this.land.GlobalID = new UUID("54ff9641-dd40-4a2c-b1f1-47dd3af24e50"); |
64 | this.land.GroupID = new UUID("d740204e-bbbf-44aa-949d-02c7d739f6a5"); | 61 | this.land.GroupID = new UUID("d740204e-bbbf-44aa-949d-02c7d739f6a5"); |
65 | this.land.GroupPrims = 0; | ||
66 | this.land.Description = "land data to test LandDataSerializer"; | 62 | this.land.Description = "land data to test LandDataSerializer"; |
67 | this.land.Flags = (uint)(ParcelFlags.AllowDamage | ParcelFlags.AllowVoiceChat); | 63 | this.land.Flags = (uint)(ParcelFlags.AllowDamage | ParcelFlags.AllowVoiceChat); |
68 | this.land.LandingType = (byte)LandingType.Direct; | 64 | this.land.LandingType = (byte)LandingType.Direct; |
@@ -132,4 +128,4 @@ namespace OpenSim.Framework.Serialization.Tests | |||
132 | "Reified LandData.Name != original LandData.Name (pre-serialized with parcel access list)"); | 128 | "Reified LandData.Name != original LandData.Name (pre-serialized with parcel access list)"); |
133 | } | 129 | } |
134 | } | 130 | } |
135 | } | 131 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 1d05b02..ccec9b7 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -378,6 +378,22 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
378 | /// <param name="response"></param> | 378 | /// <param name="response"></param> |
379 | public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response) | 379 | public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response) |
380 | { | 380 | { |
381 | if (request.HttpMethod == String.Empty) // Can't handle empty requests, not wasting a thread | ||
382 | { | ||
383 | try | ||
384 | { | ||
385 | SendHTML500(response); | ||
386 | } | ||
387 | catch | ||
388 | { | ||
389 | } | ||
390 | |||
391 | return; | ||
392 | } | ||
393 | |||
394 | string requestMethod = request.HttpMethod; | ||
395 | string uriString = request.RawUrl; | ||
396 | |||
381 | string reqnum = "unknown"; | 397 | string reqnum = "unknown"; |
382 | int tickstart = Environment.TickCount; | 398 | int tickstart = Environment.TickCount; |
383 | 399 | ||
@@ -495,7 +511,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
495 | 511 | ||
496 | request.InputStream.Close(); | 512 | request.InputStream.Close(); |
497 | 513 | ||
498 | // HTTP IN support. The script engine taes it from here | 514 | // HTTP IN support. The script engine takes it from here |
499 | // Nothing to worry about for us. | 515 | // Nothing to worry about for us. |
500 | // | 516 | // |
501 | if (buffer == null) | 517 | if (buffer == null) |
@@ -609,19 +625,19 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
609 | { | 625 | { |
610 | m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw ", e); | 626 | m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw ", e); |
611 | } | 627 | } |
612 | catch (InvalidOperationException e) | 628 | catch (Exception e) |
613 | { | 629 | { |
614 | m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw {0}", e); | 630 | m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw " + e.ToString()); |
615 | SendHTML500(response); | 631 | SendHTML500(response); |
616 | } | 632 | } |
617 | finally | 633 | finally |
618 | { | 634 | { |
619 | // Every month or so this will wrap and give bad numbers, not really a problem | 635 | // Every month or so this will wrap and give bad numbers, not really a problem |
620 | // since its just for reporting, 200ms limit can be adjusted | 636 | // since its just for reporting, tickdiff limit can be adjusted |
621 | int tickdiff = Environment.TickCount - tickstart; | 637 | int tickdiff = Environment.TickCount - tickstart; |
622 | if (tickdiff > 500) | 638 | if (tickdiff > 3000) |
623 | m_log.InfoFormat( | 639 | m_log.InfoFormat( |
624 | "[BASE HTTP SERVER]: slow request <{0}> for {1} took {2} ms", reqnum, request.RawUrl, tickdiff); | 640 | "[BASE HTTP SERVER]: slow {0} request for {1} from {2} took {3} ms", requestMethod, uriString, request.RemoteIPEndPoint.ToString(), tickdiff); |
625 | } | 641 | } |
626 | } | 642 | } |
627 | 643 | ||
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpHandler.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpHandler.cs index 129a544..2c2b47d 100644 --- a/OpenSim/Framework/Servers/HttpServer/OSHttpHandler.cs +++ b/OpenSim/Framework/Servers/HttpServer/OSHttpHandler.cs | |||
@@ -83,7 +83,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
83 | /// <summary> | 83 | /// <summary> |
84 | /// Regular expression used to match against path of the | 84 | /// Regular expression used to match against path of the |
85 | /// incoming HTTP request. If you want to match any string | 85 | /// incoming HTTP request. If you want to match any string |
86 | /// either use '.*' or null. To match on the emtpy string use | 86 | /// either use '.*' or null. To match on the empty string use |
87 | /// '^$'. | 87 | /// '^$'. |
88 | /// </summary> | 88 | /// </summary> |
89 | public virtual Regex Path | 89 | public virtual Regex Path |
diff --git a/OpenSim/Framework/Servers/Tests/OSHttpTests.cs b/OpenSim/Framework/Servers/Tests/OSHttpTests.cs index e62407a..dc4eb8f 100644 --- a/OpenSim/Framework/Servers/Tests/OSHttpTests.cs +++ b/OpenSim/Framework/Servers/Tests/OSHttpTests.cs | |||
@@ -34,7 +34,6 @@ using System.Text; | |||
34 | using HttpServer; | 34 | using HttpServer; |
35 | using HttpServer.FormDecoders; | 35 | using HttpServer.FormDecoders; |
36 | using NUnit.Framework; | 36 | using NUnit.Framework; |
37 | using NUnit.Framework.SyntaxHelpers; | ||
38 | using OpenSim.Framework.Servers.HttpServer; | 37 | using OpenSim.Framework.Servers.HttpServer; |
39 | 38 | ||
40 | namespace OpenSim.Framework.Servers.Tests | 39 | namespace OpenSim.Framework.Servers.Tests |
diff --git a/OpenSim/Framework/Tests/AnimationTests.cs b/OpenSim/Framework/Tests/AnimationTests.cs index 719ddce..9aa95af 100644 --- a/OpenSim/Framework/Tests/AnimationTests.cs +++ b/OpenSim/Framework/Tests/AnimationTests.cs | |||
@@ -28,7 +28,6 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using NUnit.Framework; | 30 | using NUnit.Framework; |
31 | using NUnit.Framework.SyntaxHelpers; | ||
32 | using OpenMetaverse; | 31 | using OpenMetaverse; |
33 | using OpenMetaverse.StructuredData; | 32 | using OpenMetaverse.StructuredData; |
34 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
diff --git a/OpenSim/Framework/Tests/PrimeNumberHelperTests.cs b/OpenSim/Framework/Tests/PrimeNumberHelperTests.cs index d741f91..36bc6e7 100644 --- a/OpenSim/Framework/Tests/PrimeNumberHelperTests.cs +++ b/OpenSim/Framework/Tests/PrimeNumberHelperTests.cs | |||
@@ -28,7 +28,6 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using NUnit.Framework; | 30 | using NUnit.Framework; |
31 | using NUnit.Framework.SyntaxHelpers; | ||
32 | using OpenMetaverse; | 31 | using OpenMetaverse; |
33 | using OpenMetaverse.StructuredData; | 32 | using OpenMetaverse.StructuredData; |
34 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
@@ -38,8 +37,6 @@ namespace OpenSim.Framework.Tests | |||
38 | [TestFixture] | 37 | [TestFixture] |
39 | public class PrimeNumberHelperTests | 38 | public class PrimeNumberHelperTests |
40 | { | 39 | { |
41 | |||
42 | |||
43 | [Test] | 40 | [Test] |
44 | public void TestGetPrime() | 41 | public void TestGetPrime() |
45 | { | 42 | { |
diff --git a/OpenSim/Framework/Tests/UtilTest.cs b/OpenSim/Framework/Tests/UtilTest.cs index 89f5c0c..5eac411 100644 --- a/OpenSim/Framework/Tests/UtilTest.cs +++ b/OpenSim/Framework/Tests/UtilTest.cs | |||
@@ -27,7 +27,6 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using NUnit.Framework; | 29 | using NUnit.Framework; |
30 | using NUnit.Framework.SyntaxHelpers; | ||
31 | using OpenMetaverse; | 30 | using OpenMetaverse; |
32 | using OpenSim.Tests.Common; | 31 | using OpenSim.Tests.Common; |
33 | 32 | ||
diff --git a/OpenSim/Framework/UndoStack.cs b/OpenSim/Framework/UndoStack.cs index 4d800ae..fde63b1 100644 --- a/OpenSim/Framework/UndoStack.cs +++ b/OpenSim/Framework/UndoStack.cs | |||
@@ -90,7 +90,7 @@ namespace OpenSim.Framework | |||
90 | return deleted; | 90 | return deleted; |
91 | } | 91 | } |
92 | else | 92 | else |
93 | throw new InvalidOperationException("Cannot pop from emtpy stack"); | 93 | throw new InvalidOperationException("Cannot pop from empty stack"); |
94 | } | 94 | } |
95 | 95 | ||
96 | public T Peek() | 96 | public T Peek() |