aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDan Lake2012-01-19 02:52:05 -0800
committerDan Lake2012-01-19 02:52:05 -0800
commitf8079bcd72a0b830bcd22788b4313880bbf81783 (patch)
treec494c6283be55eb2d108271837a0c0cfa4d78f2a /OpenSim
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-f8079bcd72a0b830bcd22788b4313880bbf81783.zip
opensim-SC_OLD-f8079bcd72a0b830bcd22788b4313880bbf81783.tar.gz
opensim-SC_OLD-f8079bcd72a0b830bcd22788b4313880bbf81783.tar.bz2
opensim-SC_OLD-f8079bcd72a0b830bcd22788b4313880bbf81783.tar.xz
Fixed bugs in earlier commit on custom user parameters in Regions.ini
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/RegionInfo.cs45
1 files changed, 25 insertions, 20 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 169b951..0889d92 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -447,14 +447,18 @@ namespace OpenSim.Framework
447 447
448 public string GetOtherSetting(string key) 448 public string GetOtherSetting(string key)
449 { 449 {
450 string val; 450 string val;
451 m_otherSettings.TryGetValue(key, out val); 451 string keylower = key.ToLower();
452 return val; 452 if (m_otherSettings.TryGetValue(keylower, out val))
453 return val;
454 m_log.DebugFormat("[RegionInfo] Could not locate value for parameter {0}", key);
455 return null;
453 } 456 }
454 457
455 public void SetOtherSetting(string key, string value) 458 public void SetOtherSetting(string key, string value)
456 { 459 {
457 m_otherSettings[key] = value; 460 string keylower = key.ToLower();
461 m_otherSettings[keylower] = value;
458 } 462 }
459 463
460 private void ReadNiniConfig(IConfigSource source, string name) 464 private void ReadNiniConfig(IConfigSource source, string name)
@@ -496,12 +500,12 @@ namespace OpenSim.Framework
496 HashSet<String> allKeys = new HashSet<String>(); 500 HashSet<String> allKeys = new HashSet<String>();
497 foreach (string s in config.GetKeys()) 501 foreach (string s in config.GetKeys())
498 { 502 {
499 allKeys.Add(s.ToLower()); 503 allKeys.Add(s);
500 } 504 }
501 505
502 // RegionUUID 506 // RegionUUID
503 // 507 //
504 allKeys.Remove(("RegionUUID").ToLower()); 508 allKeys.Remove("RegionUUID");
505 string regionUUID = config.GetString("RegionUUID", string.Empty); 509 string regionUUID = config.GetString("RegionUUID", string.Empty);
506 if (regionUUID == String.Empty) 510 if (regionUUID == String.Empty)
507 { 511 {
@@ -516,7 +520,7 @@ namespace OpenSim.Framework
516 520
517 // Location 521 // Location
518 // 522 //
519 allKeys.Remove(("Location").ToLower()); 523 allKeys.Remove("Location");
520 string location = config.GetString("Location", String.Empty); 524 string location = config.GetString("Location", String.Empty);
521 if (location == String.Empty) 525 if (location == String.Empty)
522 { 526 {
@@ -532,7 +536,7 @@ namespace OpenSim.Framework
532 // InternalAddress 536 // InternalAddress
533 // 537 //
534 IPAddress address; 538 IPAddress address;
535 allKeys.Remove(("InternalAddress").ToLower()); 539 allKeys.Remove("InternalAddress");
536 if (config.Contains("InternalAddress")) 540 if (config.Contains("InternalAddress"))
537 { 541 {
538 address = IPAddress.Parse(config.GetString("InternalAddress", String.Empty)); 542 address = IPAddress.Parse(config.GetString("InternalAddress", String.Empty));
@@ -546,7 +550,7 @@ namespace OpenSim.Framework
546 // InternalPort 550 // InternalPort
547 // 551 //
548 int port; 552 int port;
549 allKeys.Remove(("InternalPort").ToLower()); 553 allKeys.Remove("InternalPort");
550 if (config.Contains("InternalPort")) 554 if (config.Contains("InternalPort"))
551 { 555 {
552 port = config.GetInt("InternalPort", 9000); 556 port = config.GetInt("InternalPort", 9000);
@@ -560,7 +564,7 @@ namespace OpenSim.Framework
560 564
561 // AllowAlternatePorts 565 // AllowAlternatePorts
562 // 566 //
563 allKeys.Remove(("AllowAlternatePorts").ToLower()); 567 allKeys.Remove("AllowAlternatePorts");
564 if (config.Contains("AllowAlternatePorts")) 568 if (config.Contains("AllowAlternatePorts"))
565 { 569 {
566 m_allow_alternate_ports = config.GetBoolean("AllowAlternatePorts", true); 570 m_allow_alternate_ports = config.GetBoolean("AllowAlternatePorts", true);
@@ -574,7 +578,7 @@ namespace OpenSim.Framework
574 578
575 // ExternalHostName 579 // ExternalHostName
576 // 580 //
577 allKeys.Remove(("ExternalHostName").ToLower()); 581 allKeys.Remove("ExternalHostName");
578 string externalName; 582 string externalName;
579 if (config.Contains("ExternalHostName")) 583 if (config.Contains("ExternalHostName"))
580 { 584 {
@@ -599,29 +603,30 @@ namespace OpenSim.Framework
599 603
600 // RegionType 604 // RegionType
601 m_regionType = config.GetString("RegionType", String.Empty); 605 m_regionType = config.GetString("RegionType", String.Empty);
602 allKeys.Remove(("RegionType").ToLower()); 606 allKeys.Remove("RegionType");
603 607
604 // Prim stuff 608 // Prim stuff
605 // 609 //
606 m_nonphysPrimMax = config.GetInt("NonphysicalPrimMax", 256); 610 m_nonphysPrimMax = config.GetInt("NonphysicalPrimMax", 256);
607 allKeys.Remove(("NonphysicalPrimMax").ToLower()); 611 allKeys.Remove("NonphysicalPrimMax");
608 m_physPrimMax = config.GetInt("PhysicalPrimMax", 10); 612 m_physPrimMax = config.GetInt("PhysicalPrimMax", 10);
609 allKeys.Remove(("PhysicalPrimMax").ToLower()); 613 allKeys.Remove("PhysicalPrimMax");
610 m_clampPrimSize = config.GetBoolean("ClampPrimSize", false); 614 m_clampPrimSize = config.GetBoolean("ClampPrimSize", false);
611 allKeys.Remove(("ClampPrimSize").ToLower()); 615 allKeys.Remove("ClampPrimSize");
612 m_objectCapacity = config.GetInt("MaxPrims", 15000); 616 m_objectCapacity = config.GetInt("MaxPrims", 15000);
613 allKeys.Remove(("MaxPrims").ToLower()); 617 allKeys.Remove("MaxPrims");
614 m_agentCapacity = config.GetInt("MaxAgents", 100); 618 m_agentCapacity = config.GetInt("MaxAgents", 100);
615 allKeys.Remove(("MaxAgents").ToLower()); 619 allKeys.Remove("MaxAgents");
616 620
617 // Multi-tenancy 621 // Multi-tenancy
618 // 622 //
619 ScopeID = new UUID(config.GetString("ScopeID", UUID.Zero.ToString())); 623 ScopeID = new UUID(config.GetString("ScopeID", UUID.Zero.ToString()));
620 allKeys.Remove(("ScopeID").ToLower()); 624 allKeys.Remove("ScopeID");
621 625
622 foreach (String s in allKeys) 626 foreach (String s in allKeys)
623 { 627 {
624 m_otherSettings.Add(s, config.GetString(s)); 628 string val = config.GetString(s);
629 SetOtherSetting(s, config.GetString(s));
625 } 630 }
626 } 631 }
627 632