aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2010-10-23 00:20:18 +0200
committerMelanie2010-10-23 00:20:18 +0200
commit9fa915bdef9371ec5953f6ba6496b11bec5803a9 (patch)
tree7af2d700c41ea33993b9eafd1b9d1f7e62306ca5 /OpenSim/Region
parentPrevent database lookups on every avatar movement when land is set to group (diff)
parentChange some exception to use ToString(). e.Message is not sufficient to fix (diff)
downloadopensim-SC-9fa915bdef9371ec5953f6ba6496b11bec5803a9.zip
opensim-SC-9fa915bdef9371ec5953f6ba6496b11bec5803a9.tar.gz
opensim-SC-9fa915bdef9371ec5953f6ba6496b11bec5803a9.tar.bz2
opensim-SC-9fa915bdef9371ec5953f6ba6496b11bec5803a9.tar.xz
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/SimStatsReporter.cs10
-rw-r--r--OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs64
5 files changed, 49 insertions, 37 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index fff4300..e5cf0dc 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3453,7 +3453,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3453 3453
3454 avp.Sender.IsTrial = false; 3454 avp.Sender.IsTrial = false;
3455 avp.Sender.ID = agentID; 3455 avp.Sender.ID = agentID;
3456 m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString()); 3456 //m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString());
3457 OutPacket(avp, ThrottleOutPacketType.Task); 3457 OutPacket(avp, ThrottleOutPacketType.Task);
3458 } 3458 }
3459 3459
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 48ae4ca..5428e5d 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -617,8 +617,6 @@ namespace OpenSim.Region.Framework.Scenes
617 StatsReporter.OnSendStatsResult += SendSimStatsPackets; 617 StatsReporter.OnSendStatsResult += SendSimStatsPackets;
618 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; 618 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
619 619
620 StatsReporter.SetObjectCapacity(RegionInfo.ObjectCapacity);
621
622 // Old 620 // Old
623 /* 621 /*
624 m_simulatorVersion = simulatorVersion 622 m_simulatorVersion = simulatorVersion
@@ -2468,7 +2466,7 @@ namespace OpenSim.Region.Framework.Scenes
2468 } 2466 }
2469 catch (Exception e) 2467 catch (Exception e)
2470 { 2468 {
2471 m_log.WarnFormat("[SCENE]: Problem casting object: {0}", e.Message); 2469 m_log.WarnFormat("[SCENE]: Problem casting object: " + e.ToString());
2472 return false; 2470 return false;
2473 } 2471 }
2474 2472
@@ -3466,7 +3464,7 @@ namespace OpenSim.Region.Framework.Scenes
3466 } 3464 }
3467 catch (Exception e) 3465 catch (Exception e)
3468 { 3466 {
3469 m_log.DebugFormat("[CONNECTION BEGIN]: Exception verifying presence {0}", e.Message); 3467 m_log.ErrorFormat("[CONNECTION BEGIN]: Exception verifying presence " + e.ToString());
3470 return false; 3468 return false;
3471 } 3469 }
3472 3470
@@ -3477,7 +3475,7 @@ namespace OpenSim.Region.Framework.Scenes
3477 } 3475 }
3478 catch (Exception e) 3476 catch (Exception e)
3479 { 3477 {
3480 m_log.DebugFormat("[CONNECTION BEGIN]: Exception authorizing user {0}", e.Message); 3478 m_log.ErrorFormat("[CONNECTION BEGIN]: Exception authorizing user " + e.ToString());
3481 return false; 3479 return false;
3482 } 3480 }
3483 3481
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
index fd23294..87dcdee 100644
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Framework.Scenes
108 private int m_activeScripts = 0; 108 private int m_activeScripts = 0;
109 private int m_scriptLinesPerSecond = 0; 109 private int m_scriptLinesPerSecond = 0;
110 110
111 private int objectCapacity = 45000; 111 private int m_objectCapacity = 45000;
112 112
113 private Scene m_scene; 113 private Scene m_scene;
114 114
@@ -124,6 +124,7 @@ namespace OpenSim.Region.Framework.Scenes
124 m_scene = scene; 124 m_scene = scene;
125 ReportingRegion = scene.RegionInfo; 125 ReportingRegion = scene.RegionInfo;
126 126
127 m_objectCapacity = scene.RegionInfo.ObjectCapacity;
127 m_report.AutoReset = true; 128 m_report.AutoReset = true;
128 m_report.Interval = statsUpdatesEveryMS; 129 m_report.Interval = statsUpdatesEveryMS;
129 m_report.Elapsed += new ElapsedEventHandler(statsHeartBeat); 130 m_report.Elapsed += new ElapsedEventHandler(statsHeartBeat);
@@ -271,7 +272,7 @@ namespace OpenSim.Region.Framework.Scenes
271 272
272 SimStats simStats 273 SimStats simStats
273 = new SimStats( 274 = new SimStats(
274 ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)objectCapacity, rb, sb, m_scene.RegionInfo.originRegionID); 275 ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)m_objectCapacity, rb, sb, m_scene.RegionInfo.originRegionID);
275 276
276 handlerSendStatResult = OnSendStatsResult; 277 handlerSendStatResult = OnSendStatsResult;
277 if (handlerSendStatResult != null) 278 if (handlerSendStatResult != null)
@@ -435,11 +436,6 @@ namespace OpenSim.Region.Framework.Scenes
435 m_activeScripts = count; 436 m_activeScripts = count;
436 } 437 }
437 438
438 public void SetObjectCapacity(int objects)
439 {
440 objectCapacity = objects;
441 }
442
443 /// <summary> 439 /// <summary>
444 /// This is for llGetRegionFPS 440 /// This is for llGetRegionFPS
445 /// </summary> 441 /// </summary>
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
index 7e1b5ac..b84a34d 100644
--- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
+++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
@@ -83,7 +83,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
83 83
84 // private int m_stipend = 1000; 84 // private int m_stipend = 1000;
85 85
86// private int ObjectCapacity = 45000;
87 private int ObjectCount = 0; 86 private int ObjectCount = 0;
88 private int PriceEnergyUnit = 0; 87 private int PriceEnergyUnit = 0;
89 private int PriceGroupCreate = 0; 88 private int PriceGroupCreate = 0;
@@ -135,7 +134,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
135 134
136 public void AddRegion(Scene scene) 135 public void AddRegion(Scene scene)
137 { 136 {
138 // Send ObjectCapacity to Scene.. Which sends it to the SimStatsReporter.
139 if (m_enabled) 137 if (m_enabled)
140 { 138 {
141 scene.RegisterModuleInterface<IMoneyModule>(this); 139 scene.RegisterModuleInterface<IMoneyModule>(this);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e94790f..f55bd12 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3824,7 +3824,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3824 3824
3825 if (targetPart != null) 3825 if (targetPart != null)
3826 { 3826 {
3827 if (parent != 0) { 3827 if (parent != 0)
3828 {
3828 parentPrim = m_host.ParentGroup; 3829 parentPrim = m_host.ParentGroup;
3829 childPrim = targetPart.ParentGroup; 3830 childPrim = targetPart.ParentGroup;
3830 } 3831 }
@@ -5426,7 +5427,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5426 } 5427 }
5427 } 5428 }
5428 } 5429 }
5429 else { 5430 else
5431 {
5430 object[] array = new object[src.Length]; 5432 object[] array = new object[src.Length];
5431 Array.Copy(src.Data, 0, array, 0, src.Length); 5433 Array.Copy(src.Data, 0, array, 0, src.Length);
5432 result = new LSL_List(array); 5434 result = new LSL_List(array);
@@ -6271,7 +6273,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6271 SetParticleSystem(m_host, rules); 6273 SetParticleSystem(m_host, rules);
6272 } 6274 }
6273 6275
6274 private void SetParticleSystem(SceneObjectPart part, LSL_List rules) { 6276 private void SetParticleSystem(SceneObjectPart part, LSL_List rules)
6277 {
6275 6278
6276 6279
6277 if (rules.Length == 0) 6280 if (rules.Length == 0)
@@ -7248,7 +7251,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7248 7251
7249 public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules) 7252 public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules)
7250 { 7253 {
7251 m_host.AddScriptLPS(1); 7254 m_host.AddScriptLPS(1);
7252 7255
7253 List<SceneObjectPart> parts = GetLinkParts(linknumber); 7256 List<SceneObjectPart> parts = GetLinkParts(linknumber);
7254 List<ScenePresence> avatars = GetLinkAvatars(linknumber); 7257 List<ScenePresence> avatars = GetLinkAvatars(linknumber);
@@ -7315,7 +7318,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7315 break; 7318 break;
7316 } 7319 }
7317 } 7320 }
7318
7319 } 7321 }
7320 7322
7321 protected void SetPrimParams(SceneObjectPart part, LSL_List rules) 7323 protected void SetPrimParams(SceneObjectPart part, LSL_List rules)
@@ -8965,17 +8967,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8965 * Convert separator and spacer lists to C# strings. 8967 * Convert separator and spacer lists to C# strings.
8966 * Also filter out null strings so we don't hang. 8968 * Also filter out null strings so we don't hang.
8967 */ 8969 */
8968 for (i = 0; i < seplen; i ++) { 8970 for (i = 0; i < seplen; i ++)
8971 {
8969 d = separray[i].ToString(); 8972 d = separray[i].ToString();
8970 if (d.Length > 0) { 8973 if (d.Length > 0)
8974 {
8971 delarray[dellen++] = d; 8975 delarray[dellen++] = d;
8972 } 8976 }
8973 } 8977 }
8974 seplen = dellen; 8978 seplen = dellen;
8975 8979
8976 for (i = 0; i < spclen; i ++) { 8980 for (i = 0; i < spclen; i ++)
8981 {
8977 d = spcarray[i].ToString(); 8982 d = spcarray[i].ToString();
8978 if (d.Length > 0) { 8983 if (d.Length > 0)
8984 {
8979 delarray[dellen++] = d; 8985 delarray[dellen++] = d;
8980 } 8986 }
8981 } 8987 }
@@ -8983,7 +8989,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8983 /* 8989 /*
8984 * Scan through source string from beginning to end. 8990 * Scan through source string from beginning to end.
8985 */ 8991 */
8986 for (i = 0;;) { 8992 for (i = 0;;)
8993 {
8987 8994
8988 /* 8995 /*
8989 * Find earliest delimeter in src starting at i (if any). 8996 * Find earliest delimeter in src starting at i (if any).
@@ -8991,13 +8998,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8991 int earliestDel = -1; 8998 int earliestDel = -1;
8992 int earliestSrc = srclen; 8999 int earliestSrc = srclen;
8993 string earliestStr = null; 9000 string earliestStr = null;
8994 for (j = 0; j < dellen; j ++) { 9001 for (j = 0; j < dellen; j ++)
9002 {
8995 d = delarray[j]; 9003 d = delarray[j];
8996 if (d != null) { 9004 if (d != null)
9005 {
8997 int index = src.IndexOf(d, i); 9006 int index = src.IndexOf(d, i);
8998 if (index < 0) { 9007 if (index < 0)
9008 {
8999 delarray[j] = null; // delim nowhere in src, don't check it anymore 9009 delarray[j] = null; // delim nowhere in src, don't check it anymore
9000 } else if (index < earliestSrc) { 9010 }
9011 else if (index < earliestSrc)
9012 {
9001 earliestSrc = index; // where delimeter starts in source string 9013 earliestSrc = index; // where delimeter starts in source string
9002 earliestDel = j; // where delimeter is in delarray[] 9014 earliestDel = j; // where delimeter is in delarray[]
9003 earliestStr = d; // the delimeter string from delarray[] 9015 earliestStr = d; // the delimeter string from delarray[]
@@ -9009,7 +9021,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9009 /* 9021 /*
9010 * Output source string starting at i through start of earliest delimeter. 9022 * Output source string starting at i through start of earliest delimeter.
9011 */ 9023 */
9012 if (keepNulls || (earliestSrc > i)) { 9024 if (keepNulls || (earliestSrc > i))
9025 {
9013 outarray[outlen++] = src.Substring(i, earliestSrc - i); 9026 outarray[outlen++] = src.Substring(i, earliestSrc - i);
9014 } 9027 }
9015 9028
@@ -9021,7 +9034,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9021 /* 9034 /*
9022 * If delimeter was a spacer, output the spacer. 9035 * If delimeter was a spacer, output the spacer.
9023 */ 9036 */
9024 if (earliestDel >= seplen) { 9037 if (earliestDel >= seplen)
9038 {
9025 outarray[outlen++] = earliestStr; 9039 outarray[outlen++] = earliestStr;
9026 } 9040 }
9027 9041
@@ -9035,7 +9049,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9035 * Make up an exact-sized output array suitable for an LSL_List object. 9049 * Make up an exact-sized output array suitable for an LSL_List object.
9036 */ 9050 */
9037 object[] outlist = new object[outlen]; 9051 object[] outlist = new object[outlen];
9038 for (i = 0; i < outlen; i ++) { 9052 for (i = 0; i < outlen; i ++)
9053 {
9039 outlist[i] = new LSL_String(outarray[i]); 9054 outlist[i] = new LSL_String(outarray[i]);
9040 } 9055 }
9041 return new LSL_List(outlist); 9056 return new LSL_List(outlist);
@@ -10002,12 +10017,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10002 10017
10003 SortedDictionary<int, float> parameters = new SortedDictionary<int, float>(); 10018 SortedDictionary<int, float> parameters = new SortedDictionary<int, float>();
10004 object[] data = rules.Data; 10019 object[] data = rules.Data;
10005 for (int i = 0; i < data.Length; ++i) { 10020 for (int i = 0; i < data.Length; ++i)
10021 {
10006 int type = Convert.ToInt32(data[i++].ToString()); 10022 int type = Convert.ToInt32(data[i++].ToString());
10007 if (i >= data.Length) break; // odd number of entries => ignore the last 10023 if (i >= data.Length) break; // odd number of entries => ignore the last
10008 10024
10009 // some special cases: Vector parameters are split into 3 float parameters (with type+1, type+2, type+3) 10025 // some special cases: Vector parameters are split into 3 float parameters (with type+1, type+2, type+3)
10010 switch (type) { 10026 switch (type)
10027 {
10011 case ScriptBaseClass.CAMERA_FOCUS: 10028 case ScriptBaseClass.CAMERA_FOCUS:
10012 case ScriptBaseClass.CAMERA_FOCUS_OFFSET: 10029 case ScriptBaseClass.CAMERA_FOCUS_OFFSET:
10013 case ScriptBaseClass.CAMERA_POSITION: 10030 case ScriptBaseClass.CAMERA_POSITION:
@@ -10213,12 +10230,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10213 Regex r = new Regex(authregex); 10230 Regex r = new Regex(authregex);
10214 int[] gnums = r.GetGroupNumbers(); 10231 int[] gnums = r.GetGroupNumbers();
10215 Match m = r.Match(url); 10232 Match m = r.Match(url);
10216 if (m.Success) { 10233 if (m.Success)
10217 for (int i = 1; i < gnums.Length; i++) { 10234 {
10235 for (int i = 1; i < gnums.Length; i++)
10236 {
10218 //System.Text.RegularExpressions.Group g = m.Groups[gnums[i]]; 10237 //System.Text.RegularExpressions.Group g = m.Groups[gnums[i]];
10219 //CaptureCollection cc = g.Captures; 10238 //CaptureCollection cc = g.Captures;
10220 } 10239 }
10221 if (m.Groups.Count == 5) { 10240 if (m.Groups.Count == 5)
10241 {
10222 httpHeaders["Authorization"] = String.Format("Basic {0}", Convert.ToBase64String(System.Text.ASCIIEncoding.ASCII.GetBytes(m.Groups[2].ToString() + ":" + m.Groups[3].ToString()))); 10242 httpHeaders["Authorization"] = String.Format("Basic {0}", Convert.ToBase64String(System.Text.ASCIIEncoding.ASCII.GetBytes(m.Groups[2].ToString() + ":" + m.Groups[3].ToString())));
10223 url = m.Groups[1].ToString() + m.Groups[4].ToString(); 10243 url = m.Groups[1].ToString() + m.Groups[4].ToString();
10224 } 10244 }