diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/AssetBase.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Monitoring/JobEngine.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/RegionInfo.cs | 58 | ||||
-rw-r--r-- | OpenSim/Framework/RestClient.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/WebUtil.cs | 15 |
5 files changed, 67 insertions, 15 deletions
diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs index 33be612..87fd04a 100644 --- a/OpenSim/Framework/AssetBase.cs +++ b/OpenSim/Framework/AssetBase.cs | |||
@@ -155,7 +155,7 @@ namespace OpenSim.Framework | |||
155 | } | 155 | } |
156 | } | 156 | } |
157 | 157 | ||
158 | public virtual byte[] Data | 158 | public byte[] Data |
159 | { | 159 | { |
160 | get { return m_data; } | 160 | get { return m_data; } |
161 | set { m_data = value; } | 161 | set { m_data = value; } |
diff --git a/OpenSim/Framework/Monitoring/JobEngine.cs b/OpenSim/Framework/Monitoring/JobEngine.cs index 7709f62..df6b806 100644 --- a/OpenSim/Framework/Monitoring/JobEngine.cs +++ b/OpenSim/Framework/Monitoring/JobEngine.cs | |||
@@ -136,7 +136,8 @@ namespace OpenSim.Framework.Monitoring | |||
136 | if(m_jobQueue.Count <= 0) | 136 | if(m_jobQueue.Count <= 0) |
137 | m_cancelSource.Cancel(); | 137 | m_cancelSource.Cancel(); |
138 | 138 | ||
139 | m_finishedProcessingAfterStop.WaitOne(RequestProcessTimeoutOnStop); | 139 | if(m_finishedProcessingAfterStop.WaitOne(RequestProcessTimeoutOnStop)) |
140 | m_finishedProcessingAfterStop.Close(); | ||
140 | } | 141 | } |
141 | finally | 142 | finally |
142 | { | 143 | { |
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index ac77352..ca17793 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -176,6 +176,9 @@ namespace OpenSim.Framework | |||
176 | /// </remarks> | 176 | /// </remarks> |
177 | public uint RegionSizeZ = Constants.RegionHeight; | 177 | public uint RegionSizeZ = Constants.RegionHeight; |
178 | 178 | ||
179 | // If entering avatar has no specific coords, this is where they land | ||
180 | public Vector3 DefaultLandingPoint = new Vector3(128, 128, 30); | ||
181 | |||
179 | private Dictionary<String, String> m_extraSettings = new Dictionary<string, string>(); | 182 | private Dictionary<String, String> m_extraSettings = new Dictionary<string, string>(); |
180 | 183 | ||
181 | // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. | 184 | // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. |
@@ -712,6 +715,19 @@ namespace OpenSim.Framework | |||
712 | m_regionType = config.GetString("RegionType", String.Empty); | 715 | m_regionType = config.GetString("RegionType", String.Empty); |
713 | allKeys.Remove("RegionType"); | 716 | allKeys.Remove("RegionType"); |
714 | 717 | ||
718 | // Get Default Landing Location (Defaults to 128,128) | ||
719 | string temp_location = config.GetString("DefaultLanding", "<128, 128, 30>"); | ||
720 | Vector3 temp_vector; | ||
721 | |||
722 | if (Vector3.TryParse(temp_location, out temp_vector)) | ||
723 | DefaultLandingPoint = temp_vector; | ||
724 | else | ||
725 | m_log.ErrorFormat("[RegionInfo]: Unable to parse DefaultLanding for '{0}'. The value given was '{1}'", RegionName, temp_location); | ||
726 | |||
727 | allKeys.Remove("DefaultLanding"); | ||
728 | |||
729 | DoDefaultLandingSanityChecks(); | ||
730 | |||
715 | #region Prim and map stuff | 731 | #region Prim and map stuff |
716 | 732 | ||
717 | m_nonphysPrimMin = config.GetFloat("NonPhysicalPrimMin", 0); | 733 | m_nonphysPrimMin = config.GetFloat("NonPhysicalPrimMin", 0); |
@@ -764,6 +780,48 @@ namespace OpenSim.Framework | |||
764 | } | 780 | } |
765 | } | 781 | } |
766 | 782 | ||
783 | // Make sure DefaultLanding is within region borders with a buffer zone 5 meters from borders | ||
784 | private void DoDefaultLandingSanityChecks() | ||
785 | { | ||
786 | // Sanity Check Default Landing | ||
787 | float buffer_zone = 5f; | ||
788 | |||
789 | bool ValuesCapped = false; | ||
790 | |||
791 | // Minimum Positions | ||
792 | if (DefaultLandingPoint.X < buffer_zone) | ||
793 | { | ||
794 | DefaultLandingPoint.X = buffer_zone; | ||
795 | ValuesCapped = true; | ||
796 | } | ||
797 | |||
798 | if (DefaultLandingPoint.Y < buffer_zone) | ||
799 | { | ||
800 | DefaultLandingPoint.Y = buffer_zone; | ||
801 | ValuesCapped = true; | ||
802 | } | ||
803 | |||
804 | // Maximum Positions | ||
805 | if (DefaultLandingPoint.X > RegionSizeX - buffer_zone) | ||
806 | { | ||
807 | DefaultLandingPoint.X = RegionSizeX - buffer_zone; | ||
808 | ValuesCapped = true; | ||
809 | } | ||
810 | |||
811 | if (DefaultLandingPoint.Y > RegionSizeY - buffer_zone) | ||
812 | { | ||
813 | DefaultLandingPoint.Y = RegionSizeY - buffer_zone; | ||
814 | ValuesCapped = true; | ||
815 | } | ||
816 | |||
817 | // Height | ||
818 | if (DefaultLandingPoint.Z < 0f) | ||
819 | DefaultLandingPoint.Z = 0f; | ||
820 | |||
821 | if (ValuesCapped == true) | ||
822 | m_log.WarnFormat("[RegionInfo]: The default landing location for {0} has been capped to {1}", RegionName, DefaultLandingPoint); | ||
823 | } | ||
824 | |||
767 | // Make sure user specified region sizes are sane. | 825 | // Make sure user specified region sizes are sane. |
768 | // Must be multiples of legacy region size (256). | 826 | // Must be multiples of legacy region size (256). |
769 | private void DoRegionSizeSanityChecks() | 827 | private void DoRegionSizeSanityChecks() |
diff --git a/OpenSim/Framework/RestClient.cs b/OpenSim/Framework/RestClient.cs index ca19392..26237de 100644 --- a/OpenSim/Framework/RestClient.cs +++ b/OpenSim/Framework/RestClient.cs | |||
@@ -430,11 +430,11 @@ namespace OpenSim.Framework | |||
430 | 430 | ||
431 | using (Stream dst = _request.GetRequestStream()) | 431 | using (Stream dst = _request.GetRequestStream()) |
432 | { | 432 | { |
433 | m_log.Info("[REST]: GetRequestStream is ok"); | 433 | m_log.Debug("[REST]: GetRequestStream is ok"); |
434 | 434 | ||
435 | byte[] buf = new byte[1024]; | 435 | byte[] buf = new byte[1024]; |
436 | int length = src.Read(buf, 0, 1024); | 436 | int length = src.Read(buf, 0, 1024); |
437 | m_log.Info("[REST]: First Read is ok"); | 437 | m_log.Debug("[REST]: First Read is ok"); |
438 | while (length > 0) | 438 | while (length > 0) |
439 | { | 439 | { |
440 | dst.Write(buf, 0, length); | 440 | dst.Write(buf, 0, length); |
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 2bbf785..f927e69 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs | |||
@@ -1019,7 +1019,8 @@ namespace OpenSim.Framework | |||
1019 | /// | 1019 | /// |
1020 | /// <exception cref="System.Net.WebException">Thrown if we encounter a network issue while posting | 1020 | /// <exception cref="System.Net.WebException">Thrown if we encounter a network issue while posting |
1021 | /// the request. You'll want to make sure you deal with this as they're not uncommon</exception> | 1021 | /// the request. You'll want to make sure you deal with this as they're not uncommon</exception> |
1022 | public static string MakeRequest(string verb, string requestUrl, string obj, int timeoutsecs, IServiceAuth auth) | 1022 | public static string MakeRequest(string verb, string requestUrl, string obj, int timeoutsecs = -1, |
1023 | IServiceAuth auth = null, bool keepalive = true) | ||
1023 | { | 1024 | { |
1024 | int reqnum = WebUtil.RequestNumber++; | 1025 | int reqnum = WebUtil.RequestNumber++; |
1025 | 1026 | ||
@@ -1034,6 +1035,8 @@ namespace OpenSim.Framework | |||
1034 | request.Method = verb; | 1035 | request.Method = verb; |
1035 | if (timeoutsecs > 0) | 1036 | if (timeoutsecs > 0) |
1036 | request.Timeout = timeoutsecs * 1000; | 1037 | request.Timeout = timeoutsecs * 1000; |
1038 | if(!keepalive && request is HttpWebRequest) | ||
1039 | ((HttpWebRequest)request).KeepAlive = false; | ||
1037 | 1040 | ||
1038 | if (auth != null) | 1041 | if (auth != null) |
1039 | auth.AddAuthorization(request.Headers); | 1042 | auth.AddAuthorization(request.Headers); |
@@ -1125,16 +1128,6 @@ namespace OpenSim.Framework | |||
1125 | return respstring; | 1128 | return respstring; |
1126 | } | 1129 | } |
1127 | 1130 | ||
1128 | public static string MakeRequest(string verb, string requestUrl, string obj, int timeoutsecs) | ||
1129 | { | ||
1130 | return MakeRequest(verb, requestUrl, obj, timeoutsecs, null); | ||
1131 | } | ||
1132 | |||
1133 | public static string MakeRequest(string verb, string requestUrl, string obj) | ||
1134 | { | ||
1135 | return MakeRequest(verb, requestUrl, obj, -1); | ||
1136 | } | ||
1137 | |||
1138 | public static string MakeRequest(string verb, string requestUrl, string obj, IServiceAuth auth) | 1131 | public static string MakeRequest(string verb, string requestUrl, string obj, IServiceAuth auth) |
1139 | { | 1132 | { |
1140 | return MakeRequest(verb, requestUrl, obj, -1, auth); | 1133 | return MakeRequest(verb, requestUrl, obj, -1, auth); |