aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Connectors/Grid/GridServicesConnector.cs6
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs2
-rwxr-xr-xOpenSim/Services/GridService/GridService.cs36
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs4
-rw-r--r--OpenSim/Services/Interfaces/ILoginService.cs2
-rwxr-xr-xOpenSim/Services/LLLoginService/LLLoginService.cs53
6 files changed, 38 insertions, 65 deletions
diff --git a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs
index e863718..ded7806 100644
--- a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs
@@ -330,12 +330,6 @@ namespace OpenSim.Services.Connectors
330 return rinfo; 330 return rinfo;
331 } 331 }
332 332
333 public GridRegion GetRegionByNameSpecific(UUID scopeID, string regionName)
334 {
335
336 return null;
337 }
338
339 public GridRegion GetRegionByName(UUID scopeID, string regionName) 333 public GridRegion GetRegionByName(UUID scopeID, string regionName)
340 { 334 {
341 Dictionary<string, object> sendData = new Dictionary<string, object>(); 335 Dictionary<string, object> sendData = new Dictionary<string, object>();
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
index 04de4d7..a155a60 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
@@ -100,8 +100,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
100 100
101 #region IGridService 101 #region IGridService
102 102
103
104
105 public string RegisterRegion(UUID scopeID, GridRegion regionInfo) 103 public string RegisterRegion(UUID scopeID, GridRegion regionInfo)
106 { 104 {
107 IPEndPoint ext = regionInfo.ExternalEndPoint; 105 IPEndPoint ext = regionInfo.ExternalEndPoint;
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index b672e8c..d8f3720 100755
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -476,9 +476,9 @@ namespace OpenSim.Services.GridService
476 476
477 public GridRegion GetRegionByName(UUID scopeID, string name) 477 public GridRegion GetRegionByName(UUID scopeID, string name)
478 { 478 {
479 List<RegionData> rdatas = m_Database.Get(Util.EscapeForLike(name), scopeID); 479 RegionData rdata = m_Database.GetSpecific(name, scopeID);
480 if ((rdatas != null) && (rdatas.Count > 0)) 480 if (rdata != null)
481 return RegionData2RegionInfo(rdatas[0]); // get the first 481 return RegionData2RegionInfo(rdata);
482 482
483 if (m_AllowHypergridMapSearch) 483 if (m_AllowHypergridMapSearch)
484 { 484 {
@@ -490,18 +490,7 @@ namespace OpenSim.Services.GridService
490 return null; 490 return null;
491 } 491 }
492 492
493 //BA MOD.... 493 public List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
494 public GridRegion GetRegionByNameSpecific(UUID scopeID, string name)
495 {
496 RegionData rdata = m_Database.GetSpecific(name, scopeID);
497 if (rdata != null)
498 {
499 return RegionData2RegionInfo(rdata);
500 }
501 return null;
502 }
503
504 public List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
505 { 494 {
506// m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name); 495// m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name);
507 496
@@ -510,7 +499,7 @@ namespace OpenSim.Services.GridService
510 int count = 0; 499 int count = 0;
511 List<GridRegion> rinfos = new List<GridRegion>(); 500 List<GridRegion> rinfos = new List<GridRegion>();
512 501
513 if (count < maxNumber && m_AllowHypergridMapSearch && name.Contains(".")) 502 if (m_AllowHypergridMapSearch && name.Contains("."))
514 { 503 {
515 string regionURI = ""; 504 string regionURI = "";
516 string regionHost = ""; 505 string regionHost = "";
@@ -538,7 +527,7 @@ namespace OpenSim.Services.GridService
538 { 527 {
539 if (count++ < maxNumber) 528 if (count++ < maxNumber)
540 rinfos.Add(RegionData2RegionInfo(rdata)); 529 rinfos.Add(RegionData2RegionInfo(rdata));
541 if(rdata.RegionName == mapname) 530 if(mapname.Equals(rdata.RegionName,StringComparison.InvariantCultureIgnoreCase))
542 { 531 {
543 haveMatch = true; 532 haveMatch = true;
544 if(count == maxNumber) 533 if(count == maxNumber)
@@ -560,7 +549,7 @@ namespace OpenSim.Services.GridService
560 { 549 {
561 if (count++ < maxNumber) 550 if (count++ < maxNumber)
562 rinfos.Add(RegionData2RegionInfo(rdata)); 551 rinfos.Add(RegionData2RegionInfo(rdata));
563 if(rdata.RegionName == mapname) 552 if (mapname.Equals(rdata.RegionName, StringComparison.InvariantCultureIgnoreCase))
564 { 553 {
565 haveMatch = true; 554 haveMatch = true;
566 if(count == maxNumber) 555 if(count == maxNumber)
@@ -588,11 +577,20 @@ namespace OpenSim.Services.GridService
588 } 577 }
589 else if (rdatas != null && (rdatas.Count > 0)) 578 else if (rdatas != null && (rdatas.Count > 0))
590 { 579 {
591// m_log.DebugFormat("[GRID SERVICE]: Found {0} regions", rdatas.Count); 580 //m_log.DebugFormat("[GRID SERVICE]: Found {0} regions", rdatas.Count);
592 foreach (RegionData rdata in rdatas) 581 foreach (RegionData rdata in rdatas)
593 { 582 {
594 if (count++ < maxNumber) 583 if (count++ < maxNumber)
595 rinfos.Add(RegionData2RegionInfo(rdata)); 584 rinfos.Add(RegionData2RegionInfo(rdata));
585 if (name.Equals(rdata.RegionName, StringComparison.InvariantCultureIgnoreCase))
586 {
587 if (count == maxNumber)
588 {
589 rinfos.RemoveAt(count - 1);
590 rinfos.Add(RegionData2RegionInfo(rdata));
591 break;
592 }
593 }
596 } 594 }
597 } 595 }
598 596
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index f832d1d..ead5d3c 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -84,10 +84,6 @@ namespace OpenSim.Services.Interfaces
84 /// <returns>Returns the region information if the name matched. Null otherwise.</returns> 84 /// <returns>Returns the region information if the name matched. Null otherwise.</returns>
85 GridRegion GetRegionByName(UUID scopeID, string regionName); 85 GridRegion GetRegionByName(UUID scopeID, string regionName);
86 86
87
88 //BA MOD.....
89 GridRegion GetRegionByNameSpecific(UUID scopeID, string regionName);
90
91 /// <summary> 87 /// <summary>
92 /// Get information about regions starting with the provided name. 88 /// Get information about regions starting with the provided name.
93 /// </summary> 89 /// </summary>
diff --git a/OpenSim/Services/Interfaces/ILoginService.cs b/OpenSim/Services/Interfaces/ILoginService.cs
index 7c44cd8..c37e666 100644
--- a/OpenSim/Services/Interfaces/ILoginService.cs
+++ b/OpenSim/Services/Interfaces/ILoginService.cs
@@ -48,7 +48,7 @@ namespace OpenSim.Services.Interfaces
48 public interface ILoginService 48 public interface ILoginService
49 { 49 {
50 LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, 50 LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID,
51 string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP, bool LibOMVclient); 51 string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP);
52 Hashtable SetLevel(string firstName, string lastName, string passwd, int level, IPEndPoint clientIP); 52 Hashtable SetLevel(string firstName, string lastName, string passwd, int level, IPEndPoint clientIP);
53 } 53 }
54 54
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 8baaccb..d4ec0e5 100755
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -285,18 +285,15 @@ namespace OpenSim.Services.LLLoginService
285 } 285 }
286 286
287 public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, 287 public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID,
288 string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP, bool LibOMVclient) 288 string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP)
289 { 289 {
290 bool success = false; 290 bool success = false;
291 UUID session = UUID.Random(); 291 UUID session = UUID.Random();
292 292
293 string processedMessage; 293 string processedMessage;
294 294
295 if (clientVersion.Contains("Radegast"))
296 LibOMVclient = false;
297
298 m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}, Possible LibOMVGridProxy: {8} ", 295 m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}, Possible LibOMVGridProxy: {8} ",
299 firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0, LibOMVclient.ToString()); 296 firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0);
300 297
301 string curMac = mac.ToString(); 298 string curMac = mac.ToString();
302 299
@@ -699,7 +696,6 @@ namespace OpenSim.Services.LLLoginService
699 where = "safe"; 696 where = "safe";
700 } 697 }
701 } 698 }
702
703 } 699 }
704 else 700 else
705 { 701 {
@@ -735,41 +731,32 @@ namespace OpenSim.Services.LLLoginService
735 { 731 {
736 if (!regionName.Contains("@")) 732 if (!regionName.Contains("@"))
737 { 733 {
738 List<GridRegion> regions = m_GridService.GetRegionsByName(scopeID, regionName, 1); 734 region = m_GridService.GetRegionByName (scopeID, regionName);
739 if ((regions == null) || (regions != null && regions.Count == 0)) 735 if(region != null)
736 return region;
737
738 m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, can't locate region {1}. Trying defaults.", startLocation, regionName);
739 List<GridRegion> regions = m_GridService.GetDefaultRegions(scopeID);
740 if (regions != null && regions.Count > 0)
740 { 741 {
741 m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, can't locate region {1}. Trying defaults.", startLocation, regionName); 742 where = "safe";
742 regions = m_GridService.GetDefaultRegions(scopeID); 743 return regions[0];
743 if (regions != null && regions.Count > 0) 744 }
745 else
746 {
747 m_log.Info("[LLOGIN SERVICE]: Last Region Not Found Attempting to find random region");
748 region = FindAlternativeRegion(scopeID);
749 if (region != null)
744 { 750 {
745 where = "safe"; 751 where = "safe";
746 return regions[0]; 752 return region;
747 } 753 }
748 else 754 else
749 { 755 {
750 m_log.Info("[LLOGIN SERVICE]: Last Region Not Found Attempting to find random region"); 756 m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, Grid does not provide default regions and no alternative found.", startLocation);
751 region = FindAlternativeRegion(scopeID); 757 return null;
752 if (region != null)
753 {
754 where = "safe";
755 return region;
756 }
757 else
758 {
759 m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, Grid does not provide default regions and no alternative found.", startLocation);
760 return null;
761 }
762 } 758 }
763 } 759 }
764
765 //find a exact match
766 foreach(GridRegion r in regions)
767 {
768 if(string.Equals(regionName, r.RegionName, StringComparison.InvariantCultureIgnoreCase))
769 return r;
770 }
771 // else, whatever
772 return regions[0];
773 } 760 }
774 else 761 else
775 { 762 {