aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorTom2011-09-04 07:06:36 -0700
committerTom2011-09-04 07:06:36 -0700
commit66dec3b8742eff04fbbcc6e3249fe4ba87986500 (patch)
tree76cc708a821d35fac5cdbbce2de304b47064e732 /OpenSim/Services
parentGuard another nullref (diff)
parentFixed BulletSim config files for Linux *.so libraries. (diff)
downloadopensim-SC_OLD-66dec3b8742eff04fbbcc6e3249fe4ba87986500.zip
opensim-SC_OLD-66dec3b8742eff04fbbcc6e3249fe4ba87986500.tar.gz
opensim-SC_OLD-66dec3b8742eff04fbbcc6e3249fe4ba87986500.tar.bz2
opensim-SC_OLD-66dec3b8742eff04fbbcc6e3249fe4ba87986500.tar.xz
Resolve merge commits, stage 1
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/AssetService/AssetService.cs17
-rw-r--r--OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs4
-rw-r--r--OpenSim/Services/AuthorizationService/AuthorizationService.cs5
-rw-r--r--OpenSim/Services/AvatarService/AvatarService.cs30
-rw-r--r--OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs56
-rw-r--r--OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs71
-rw-r--r--OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs1
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs2
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs4
-rw-r--r--OpenSim/Services/GridService/GridService.cs38
-rw-r--r--OpenSim/Services/HypergridService/HGInstantMessageService.cs17
-rw-r--r--OpenSim/Services/Interfaces/IAssetService.cs8
-rw-r--r--OpenSim/Services/Interfaces/IAuthorizationService.cs32
-rw-r--r--OpenSim/Services/Interfaces/IAvatarService.cs4
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs6
-rw-r--r--OpenSim/Services/InventoryService/LibraryService.cs9
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginResponse.cs19
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs8
19 files changed, 230 insertions, 103 deletions
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs
index ffdaa60..0feb59d 100644
--- a/OpenSim/Services/AssetService/AssetService.cs
+++ b/OpenSim/Services/AssetService/AssetService.cs
@@ -83,7 +83,7 @@ namespace OpenSim.Services.AssetService
83 83
84 if (assetLoaderEnabled) 84 if (assetLoaderEnabled)
85 { 85 {
86 m_log.InfoFormat("[ASSET]: Loading default asset set from {0}", loaderArgs); 86 m_log.DebugFormat("[ASSET]: Loading default asset set from {0}", loaderArgs);
87 87
88 m_AssetLoader.ForEachDefaultXmlAsset( 88 m_AssetLoader.ForEachDefaultXmlAsset(
89 loaderArgs, 89 loaderArgs,
@@ -100,7 +100,7 @@ namespace OpenSim.Services.AssetService
100 }); 100 });
101 } 101 }
102 102
103 m_log.Info("[ASSET SERVICE]: Local asset service enabled"); 103 m_log.Debug("[ASSET SERVICE]: Local asset service enabled");
104 } 104 }
105 } 105 }
106 } 106 }
@@ -174,11 +174,20 @@ namespace OpenSim.Services.AssetService
174 174
175 public virtual string Store(AssetBase asset) 175 public virtual string Store(AssetBase asset)
176 { 176 {
177 //m_log.DebugFormat("[ASSET SERVICE]: Store asset {0} {1}", asset.Name, asset.ID); 177 if (!m_Database.ExistsAsset(asset.FullID))
178 if (!m_Database.StoreAsset(asset))
179 { 178 {
179// m_log.DebugFormat(
180// "[ASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.FullID, asset.Data.Length);
181 if (!m_Database.StoreAsset(asset))
182 {
180 return UUID.Zero.ToString(); 183 return UUID.Zero.ToString();
184 }
181 } 185 }
186// else
187// {
188// m_log.DebugFormat(
189// "[ASSET SERVICE]: Not storing asset {0} {1}, bytes {2} as it already exists", asset.Name, asset.FullID, asset.Data.Length);
190// }
182 191
183 return asset.ID; 192 return asset.ID;
184 } 193 }
diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
index 3590e12..2c6cebd 100644
--- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
@@ -42,15 +42,13 @@ namespace OpenSim.Services.AuthenticationService
42 public class WebkeyOrPasswordAuthenticationService : AuthenticationServiceBase, IAuthenticationService 42 public class WebkeyOrPasswordAuthenticationService : AuthenticationServiceBase, IAuthenticationService
43 { 43 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 private IConfigSource m_config;
47 private Dictionary<string, IAuthenticationService> m_svcChecks 46 private Dictionary<string, IAuthenticationService> m_svcChecks
48 = new Dictionary<string, IAuthenticationService>(); 47 = new Dictionary<string, IAuthenticationService>();
49 48
50 public WebkeyOrPasswordAuthenticationService(IConfigSource config) 49 public WebkeyOrPasswordAuthenticationService(IConfigSource config)
51 : base(config) 50 : base(config)
52 { 51 {
53 this.m_config = config;
54 m_svcChecks["web_login_key"] = new WebkeyAuthenticationService(config); 52 m_svcChecks["web_login_key"] = new WebkeyAuthenticationService(config);
55 m_svcChecks["password"] = new PasswordAuthenticationService(config); 53 m_svcChecks["password"] = new PasswordAuthenticationService(config);
56 } 54 }
diff --git a/OpenSim/Services/AuthorizationService/AuthorizationService.cs b/OpenSim/Services/AuthorizationService/AuthorizationService.cs
index d658368..03da6e1 100644
--- a/OpenSim/Services/AuthorizationService/AuthorizationService.cs
+++ b/OpenSim/Services/AuthorizationService/AuthorizationService.cs
@@ -48,10 +48,11 @@ namespace OpenSim.Services.AuthorizationService
48 m_log.Info("[AUTHORIZATION CONNECTOR]: Local Authorization service enabled"); 48 m_log.Info("[AUTHORIZATION CONNECTOR]: Local Authorization service enabled");
49 } 49 }
50 50
51 public bool IsAuthorizedForRegion(string userID, string regionID, out string message) 51 public bool IsAuthorizedForRegion(
52 string userID, string firstName, string lastName, string regionID, out string message)
52 { 53 {
53 message = "Authorized"; 54 message = "Authorized";
54 return true; 55 return true;
55 } 56 }
56 } 57 }
57} 58} \ No newline at end of file
diff --git a/OpenSim/Services/AvatarService/AvatarService.cs b/OpenSim/Services/AvatarService/AvatarService.cs
index 53ca7c8..c59a9e0 100644
--- a/OpenSim/Services/AvatarService/AvatarService.cs
+++ b/OpenSim/Services/AvatarService/AvatarService.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Services.AvatarService
54 public AvatarAppearance GetAppearance(UUID principalID) 54 public AvatarAppearance GetAppearance(UUID principalID)
55 { 55 {
56 AvatarData avatar = GetAvatar(principalID); 56 AvatarData avatar = GetAvatar(principalID);
57 return avatar.ToAvatarAppearance(principalID); 57 return avatar.ToAvatarAppearance();
58 } 58 }
59 59
60 public bool SetAppearance(UUID principalID, AvatarAppearance appearance) 60 public bool SetAppearance(UUID principalID, AvatarAppearance appearance)
@@ -109,7 +109,33 @@ namespace OpenSim.Services.AvatarService
109 foreach (KeyValuePair<string,string> kvp in avatar.Data) 109 foreach (KeyValuePair<string,string> kvp in avatar.Data)
110 { 110 {
111 av.Data["Name"] = kvp.Key; 111 av.Data["Name"] = kvp.Key;
112 av.Data["Value"] = kvp.Value; 112
113 // justincc 20110730. Yes, this is a hack to get around the fact that a bug in OpenSim is causing
114 // various simulators on osgrid to inject bad values. Since these simulators might be around for a
115 // long time, we are going to manually police the value.
116 //
117 // It should be possible to remove this in half a year if we don't want to police values server side.
118 if (kvp.Key == "AvatarHeight")
119 {
120 float height;
121 if (!float.TryParse(kvp.Value, out height) || height < 0 || height > 10)
122 {
123 string rawHeight = kvp.Value.Replace(",", ".");
124
125 if (!float.TryParse(rawHeight, out height) || height < 0 || height > 10)
126 height = 1.771488f;
127
128 m_log.DebugFormat(
129 "[AVATAR SERVICE]: Rectifying height of avatar {0} from {1} to {2}",
130 principalID, kvp.Value, height);
131 }
132
133 av.Data["Value"] = height.ToString();
134 }
135 else
136 {
137 av.Data["Value"] = kvp.Value;
138 }
113 139
114 if (!m_Database.Store(av)) 140 if (!m_Database.Store(av))
115 { 141 {
diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
index 565e4f2..2bfa597 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
@@ -51,6 +51,13 @@ namespace OpenSim.Services.Connectors
51 private int m_retryCounter; 51 private int m_retryCounter;
52 private Dictionary<int, List<AssetBase>> m_retryQueue = new Dictionary<int, List<AssetBase>>(); 52 private Dictionary<int, List<AssetBase>> m_retryQueue = new Dictionary<int, List<AssetBase>>();
53 private Timer m_retryTimer; 53 private Timer m_retryTimer;
54 private delegate void AssetRetrievedEx(AssetBase asset);
55
56 // Keeps track of concurrent requests for the same asset, so that it's only loaded once.
57 // Maps: Asset ID -> Handlers which will be called when the asset has been loaded
58 private Dictionary<string, AssetRetrievedEx> m_AssetHandlers = new Dictionary<string, AssetRetrievedEx>();
59
60
54 public AssetServicesConnector() 61 public AssetServicesConnector()
55 { 62 {
56 } 63 }
@@ -230,23 +237,56 @@ namespace OpenSim.Services.Connectors
230 237
231 if (asset == null || asset.Data == null || asset.Data.Length == 0) 238 if (asset == null || asset.Data == null || asset.Data.Length == 0)
232 { 239 {
233 bool result = false; 240 lock (m_AssetHandlers)
241 {
242 AssetRetrievedEx handlerEx = new AssetRetrievedEx(delegate(AssetBase _asset) { handler(id, sender, _asset); });
243
244 AssetRetrievedEx handlers;
245 if (m_AssetHandlers.TryGetValue(id, out handlers))
246 {
247 // Someone else is already loading this asset. It will notify our handler when done.
248 handlers += handlerEx;
249 return true;
250 }
251
252 // Load the asset ourselves
253 handlers += handlerEx;
254 m_AssetHandlers.Add(id, handlers);
255 }
234 256
235 AsynchronousRestObjectRequester. 257 bool success = false;
236 MakeRequest<int, AssetBase>("GET", uri, 0, 258 try
259 {
260 AsynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0,
237 delegate(AssetBase a) 261 delegate(AssetBase a)
238 { 262 {
239 if (m_Cache != null) 263 if (m_Cache != null)
240 m_Cache.Cache(a); 264 m_Cache.Cache(a);
241 handler(id, sender, a);
242 result = true;
243 });
244 265
245 return result; 266 AssetRetrievedEx handlers;
267 lock (m_AssetHandlers)
268 {
269 handlers = m_AssetHandlers[id];
270 m_AssetHandlers.Remove(id);
271 }
272 handlers.Invoke(a);
273 });
274
275 success = true;
276 }
277 finally
278 {
279 if (!success)
280 {
281 lock (m_AssetHandlers)
282 {
283 m_AssetHandlers.Remove(id);
284 }
285 }
286 }
246 } 287 }
247 else 288 else
248 { 289 {
249 //Util.FireAndForget(delegate { handler(id, sender, asset); });
250 handler(id, sender, asset); 290 handler(id, sender, asset);
251 } 291 }
252 292
diff --git a/OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs b/OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs
index 1a93ae7..8fdb4d0 100644
--- a/OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs
@@ -89,7 +89,7 @@ namespace OpenSim.Services.Connectors
89 public AvatarAppearance GetAppearance(UUID userID) 89 public AvatarAppearance GetAppearance(UUID userID)
90 { 90 {
91 AvatarData avatar = GetAvatar(userID); 91 AvatarData avatar = GetAvatar(userID);
92 return avatar.ToAvatarAppearance(userID); 92 return avatar.ToAvatarAppearance();
93 } 93 }
94 94
95 public bool SetAppearance(UUID userID, AvatarAppearance appearance) 95 public bool SetAppearance(UUID userID, AvatarAppearance appearance)
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
index 4ce406c..9c1f158 100644
--- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
@@ -242,6 +242,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
242 { 242 {
243 m_log.Debug("[USER AGENT CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message); 243 m_log.Debug("[USER AGENT CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message);
244 } 244 }
245
245 // Add the input arguments 246 // Add the input arguments
246 args["gatekeeper_serveruri"] = OSD.FromString(gatekeeper.ServerURI); 247 args["gatekeeper_serveruri"] = OSD.FromString(gatekeeper.ServerURI);
247 args["gatekeeper_host"] = OSD.FromString(gatekeeper.ExternalHostName); 248 args["gatekeeper_host"] = OSD.FromString(gatekeeper.ExternalHostName);
@@ -427,7 +428,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
427 paramList.Add(hash); 428 paramList.Add(hash);
428 429
429 XmlRpcRequest request = new XmlRpcRequest("status_notification", paramList); 430 XmlRpcRequest request = new XmlRpcRequest("status_notification", paramList);
430 string reason = string.Empty; 431// string reason = string.Empty;
431 432
432 // Send and get reply 433 // Send and get reply
433 List<UUID> friendsOnline = new List<UUID>(); 434 List<UUID> friendsOnline = new List<UUID>();
@@ -436,17 +437,17 @@ namespace OpenSim.Services.Connectors.Hypergrid
436 { 437 {
437 response = request.Send(m_ServerURL, 6000); 438 response = request.Send(m_ServerURL, 6000);
438 } 439 }
439 catch (Exception e) 440 catch
440 { 441 {
441 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0}", m_ServerURL); 442 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0}", m_ServerURL);
442 reason = "Exception: " + e.Message; 443// reason = "Exception: " + e.Message;
443 return friendsOnline; 444 return friendsOnline;
444 } 445 }
445 446
446 if (response.IsFault) 447 if (response.IsFault)
447 { 448 {
448 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString); 449 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString);
449 reason = "XMLRPC Fault"; 450// reason = "XMLRPC Fault";
450 return friendsOnline; 451 return friendsOnline;
451 } 452 }
452 453
@@ -458,7 +459,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
458 if (hash == null) 459 if (hash == null)
459 { 460 {
460 m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetOnlineFriends Got null response from {0}! THIS IS BAAAAD", m_ServerURL); 461 m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetOnlineFriends Got null response from {0}! THIS IS BAAAAD", m_ServerURL);
461 reason = "Internal error 1"; 462// reason = "Internal error 1";
462 return friendsOnline; 463 return friendsOnline;
463 } 464 }
464 465
@@ -474,10 +475,10 @@ namespace OpenSim.Services.Connectors.Hypergrid
474 } 475 }
475 476
476 } 477 }
477 catch (Exception e) 478 catch
478 { 479 {
479 m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on GetOnlineFriends response."); 480 m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on GetOnlineFriends response.");
480 reason = "Exception: " + e.Message; 481// reason = "Exception: " + e.Message;
481 } 482 }
482 483
483 return friendsOnline; 484 return friendsOnline;
@@ -498,7 +499,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
498 paramList.Add(hash); 499 paramList.Add(hash);
499 500
500 XmlRpcRequest request = new XmlRpcRequest("get_online_friends", paramList); 501 XmlRpcRequest request = new XmlRpcRequest("get_online_friends", paramList);
501 string reason = string.Empty; 502// string reason = string.Empty;
502 503
503 // Send and get reply 504 // Send and get reply
504 List<UUID> online = new List<UUID>(); 505 List<UUID> online = new List<UUID>();
@@ -507,17 +508,17 @@ namespace OpenSim.Services.Connectors.Hypergrid
507 { 508 {
508 response = request.Send(m_ServerURL, 10000); 509 response = request.Send(m_ServerURL, 10000);
509 } 510 }
510 catch (Exception e) 511 catch
511 { 512 {
512 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0}", m_ServerURL); 513 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0}", m_ServerURL);
513 reason = "Exception: " + e.Message; 514// reason = "Exception: " + e.Message;
514 return online; 515 return online;
515 } 516 }
516 517
517 if (response.IsFault) 518 if (response.IsFault)
518 { 519 {
519 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString); 520 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString);
520 reason = "XMLRPC Fault"; 521// reason = "XMLRPC Fault";
521 return online; 522 return online;
522 } 523 }
523 524
@@ -529,7 +530,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
529 if (hash == null) 530 if (hash == null)
530 { 531 {
531 m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetOnlineFriends Got null response from {0}! THIS IS BAAAAD", m_ServerURL); 532 m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetOnlineFriends Got null response from {0}! THIS IS BAAAAD", m_ServerURL);
532 reason = "Internal error 1"; 533// reason = "Internal error 1";
533 return online; 534 return online;
534 } 535 }
535 536
@@ -545,10 +546,10 @@ namespace OpenSim.Services.Connectors.Hypergrid
545 } 546 }
546 547
547 } 548 }
548 catch (Exception e) 549 catch
549 { 550 {
550 m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on GetOnlineFriends response."); 551 m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on GetOnlineFriends response.");
551 reason = "Exception: " + e.Message; 552// reason = "Exception: " + e.Message;
552 } 553 }
553 554
554 return online; 555 return online;
@@ -563,7 +564,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
563 paramList.Add(hash); 564 paramList.Add(hash);
564 565
565 XmlRpcRequest request = new XmlRpcRequest("get_server_urls", paramList); 566 XmlRpcRequest request = new XmlRpcRequest("get_server_urls", paramList);
566 string reason = string.Empty; 567// string reason = string.Empty;
567 568
568 // Send and get reply 569 // Send and get reply
569 Dictionary<string, object> serverURLs = new Dictionary<string,object>(); 570 Dictionary<string, object> serverURLs = new Dictionary<string,object>();
@@ -572,17 +573,17 @@ namespace OpenSim.Services.Connectors.Hypergrid
572 { 573 {
573 response = request.Send(m_ServerURL, 10000); 574 response = request.Send(m_ServerURL, 10000);
574 } 575 }
575 catch (Exception e) 576 catch
576 { 577 {
577 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0}", m_ServerURL); 578 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0}", m_ServerURL);
578 reason = "Exception: " + e.Message; 579// reason = "Exception: " + e.Message;
579 return serverURLs; 580 return serverURLs;
580 } 581 }
581 582
582 if (response.IsFault) 583 if (response.IsFault)
583 { 584 {
584 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString); 585 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString);
585 reason = "XMLRPC Fault"; 586// reason = "XMLRPC Fault";
586 return serverURLs; 587 return serverURLs;
587 } 588 }
588 589
@@ -594,7 +595,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
594 if (hash == null) 595 if (hash == null)
595 { 596 {
596 m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetServerURLs Got null response from {0}! THIS IS BAAAAD", m_ServerURL); 597 m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetServerURLs Got null response from {0}! THIS IS BAAAAD", m_ServerURL);
597 reason = "Internal error 1"; 598// reason = "Internal error 1";
598 return serverURLs; 599 return serverURLs;
599 } 600 }
600 601
@@ -609,10 +610,10 @@ namespace OpenSim.Services.Connectors.Hypergrid
609 } 610 }
610 611
611 } 612 }
612 catch (Exception e) 613 catch
613 { 614 {
614 m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on GetOnlineFriends response."); 615 m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on GetOnlineFriends response.");
615 reason = "Exception: " + e.Message; 616// reason = "Exception: " + e.Message;
616 } 617 }
617 618
618 return serverURLs; 619 return serverURLs;
@@ -627,7 +628,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
627 paramList.Add(hash); 628 paramList.Add(hash);
628 629
629 XmlRpcRequest request = new XmlRpcRequest("locate_user", paramList); 630 XmlRpcRequest request = new XmlRpcRequest("locate_user", paramList);
630 string reason = string.Empty; 631// string reason = string.Empty;
631 632
632 // Send and get reply 633 // Send and get reply
633 string url = string.Empty; 634 string url = string.Empty;
@@ -636,17 +637,17 @@ namespace OpenSim.Services.Connectors.Hypergrid
636 { 637 {
637 response = request.Send(m_ServerURL, 10000); 638 response = request.Send(m_ServerURL, 10000);
638 } 639 }
639 catch (Exception e) 640 catch
640 { 641 {
641 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0}", m_ServerURL); 642 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0}", m_ServerURL);
642 reason = "Exception: " + e.Message; 643// reason = "Exception: " + e.Message;
643 return url; 644 return url;
644 } 645 }
645 646
646 if (response.IsFault) 647 if (response.IsFault)
647 { 648 {
648 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString); 649 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString);
649 reason = "XMLRPC Fault"; 650// reason = "XMLRPC Fault";
650 return url; 651 return url;
651 } 652 }
652 653
@@ -658,7 +659,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
658 if (hash == null) 659 if (hash == null)
659 { 660 {
660 m_log.ErrorFormat("[USER AGENT CONNECTOR]: LocateUser Got null response from {0}! THIS IS BAAAAD", m_ServerURL); 661 m_log.ErrorFormat("[USER AGENT CONNECTOR]: LocateUser Got null response from {0}! THIS IS BAAAAD", m_ServerURL);
661 reason = "Internal error 1"; 662// reason = "Internal error 1";
662 return url; 663 return url;
663 } 664 }
664 665
@@ -667,10 +668,10 @@ namespace OpenSim.Services.Connectors.Hypergrid
667 url = hash["URL"].ToString(); 668 url = hash["URL"].ToString();
668 669
669 } 670 }
670 catch (Exception e) 671 catch
671 { 672 {
672 m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on LocateUser response."); 673 m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on LocateUser response.");
673 reason = "Exception: " + e.Message; 674// reason = "Exception: " + e.Message;
674 } 675 }
675 676
676 return url; 677 return url;
@@ -686,7 +687,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
686 paramList.Add(hash); 687 paramList.Add(hash);
687 688
688 XmlRpcRequest request = new XmlRpcRequest("get_uui", paramList); 689 XmlRpcRequest request = new XmlRpcRequest("get_uui", paramList);
689 string reason = string.Empty; 690// string reason = string.Empty;
690 691
691 // Send and get reply 692 // Send and get reply
692 string uui = string.Empty; 693 string uui = string.Empty;
@@ -695,17 +696,17 @@ namespace OpenSim.Services.Connectors.Hypergrid
695 { 696 {
696 response = request.Send(m_ServerURL, 10000); 697 response = request.Send(m_ServerURL, 10000);
697 } 698 }
698 catch (Exception e) 699 catch
699 { 700 {
700 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0}", m_ServerURL); 701 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0}", m_ServerURL);
701 reason = "Exception: " + e.Message; 702// reason = "Exception: " + e.Message;
702 return uui; 703 return uui;
703 } 704 }
704 705
705 if (response.IsFault) 706 if (response.IsFault)
706 { 707 {
707 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString); 708 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString);
708 reason = "XMLRPC Fault"; 709// reason = "XMLRPC Fault";
709 return uui; 710 return uui;
710 } 711 }
711 712
@@ -717,7 +718,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
717 if (hash == null) 718 if (hash == null)
718 { 719 {
719 m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetUUI Got null response from {0}! THIS IS BAAAAD", m_ServerURL); 720 m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetUUI Got null response from {0}! THIS IS BAAAAD", m_ServerURL);
720 reason = "Internal error 1"; 721// reason = "Internal error 1";
721 return uui; 722 return uui;
722 } 723 }
723 724
@@ -726,10 +727,10 @@ namespace OpenSim.Services.Connectors.Hypergrid
726 uui = hash["UUI"].ToString(); 727 uui = hash["UUI"].ToString();
727 728
728 } 729 }
729 catch (Exception e) 730 catch
730 { 731 {
731 m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on LocateUser response."); 732 m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on LocateUser response.");
732 reason = "Exception: " + e.Message; 733// reason = "Exception: " + e.Message;
733 } 734 }
734 735
735 return uui; 736 return uui;
diff --git a/OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs b/OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs
index 520d639..69e2d17 100644
--- a/OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs
+++ b/OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs
@@ -50,7 +50,6 @@ namespace OpenSim.Services.Connectors
50 MethodBase.GetCurrentMethod().DeclaringType); 50 MethodBase.GetCurrentMethod().DeclaringType);
51 51
52 private string m_ServerURI = String.Empty; 52 private string m_ServerURI = String.Empty;
53 private IImprovedAssetCache m_Cache = null;
54 53
55 public MapImageServicesConnector() 54 public MapImageServicesConnector()
56 { 55 {
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs
index b8703c6..2267325 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs
@@ -97,7 +97,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
97 } 97 }
98 } 98 }
99 99
100 m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); 100// m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName);
101 m_GridUserService.LoggedOut(client.AgentId.ToString(), client.SessionId, client.Scene.RegionInfo.RegionID, position, lookat); 101 m_GridUserService.LoggedOut(client.AgentId.ToString(), client.SessionId, client.Scene.RegionInfo.RegionID, position, lookat);
102 } 102 }
103 } 103 }
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
index 810399c..360f0dd 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
@@ -213,7 +213,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
213 wearables[11] = new AvatarWearable(map["UnderpantsItem"].AsUUID(), map["UnderpantsAsset"].AsUUID()); 213 wearables[11] = new AvatarWearable(map["UnderpantsItem"].AsUUID(), map["UnderpantsAsset"].AsUUID());
214 wearables[12] = new AvatarWearable(map["SkirtItem"].AsUUID(), map["SkirtAsset"].AsUUID()); 214 wearables[12] = new AvatarWearable(map["SkirtItem"].AsUUID(), map["SkirtAsset"].AsUUID());
215 215
216 AvatarAppearance appearance = new AvatarAppearance(userID); 216 AvatarAppearance appearance = new AvatarAppearance();
217 appearance.Wearables = wearables; 217 appearance.Wearables = wearables;
218 appearance.AvatarHeight = (float)map["Height"].AsReal(); 218 appearance.AvatarHeight = (float)map["Height"].AsReal();
219 219
@@ -257,7 +257,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
257 257
258 if (avatar.AvatarType == 1) // LLAvatar 258 if (avatar.AvatarType == 1) // LLAvatar
259 { 259 {
260 AvatarAppearance appearance = avatar.ToAvatarAppearance(userID); 260 AvatarAppearance appearance = avatar.ToAvatarAppearance();
261 261
262 OSDMap map = new OSDMap(); 262 OSDMap map = new OSDMap();
263 263
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 985d77b..0a4372a 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -320,18 +320,25 @@ namespace OpenSim.Services.GridService
320 return null; 320 return null;
321 } 321 }
322 322
323 public GridRegion GetRegionByName(UUID scopeID, string regionName) 323 public GridRegion GetRegionByName(UUID scopeID, string name)
324 { 324 {
325 List<RegionData> rdatas = m_Database.Get(regionName + "%", scopeID); 325 List<RegionData> rdatas = m_Database.Get(name, scopeID);
326 if ((rdatas != null) && (rdatas.Count > 0)) 326 if ((rdatas != null) && (rdatas.Count > 0))
327 return RegionData2RegionInfo(rdatas[0]); // get the first 327 return RegionData2RegionInfo(rdatas[0]); // get the first
328 328
329 if (m_AllowHypergridMapSearch)
330 {
331 GridRegion r = GetHypergridRegionByName(scopeID, name);
332 if (r != null)
333 return r;
334 }
335
329 return null; 336 return null;
330 } 337 }
331 338
332 public List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber) 339 public List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
333 { 340 {
334 m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name); 341// m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name);
335 342
336 List<RegionData> rdatas = m_Database.Get(name + "%", scopeID); 343 List<RegionData> rdatas = m_Database.Get(name + "%", scopeID);
337 344
@@ -340,7 +347,7 @@ namespace OpenSim.Services.GridService
340 347
341 if (rdatas != null) 348 if (rdatas != null)
342 { 349 {
343 m_log.DebugFormat("[GRID SERVICE]: Found {0} regions", rdatas.Count); 350// m_log.DebugFormat("[GRID SERVICE]: Found {0} regions", rdatas.Count);
344 foreach (RegionData rdata in rdatas) 351 foreach (RegionData rdata in rdatas)
345 { 352 {
346 if (count++ < maxNumber) 353 if (count++ < maxNumber)
@@ -348,9 +355,9 @@ namespace OpenSim.Services.GridService
348 } 355 }
349 } 356 }
350 357
351 if (m_AllowHypergridMapSearch && (rdatas == null || (rdatas != null && rdatas.Count == 0)) && name.Contains(".")) 358 if (m_AllowHypergridMapSearch && (rdatas == null || (rdatas != null && rdatas.Count == 0)))
352 { 359 {
353 GridRegion r = m_HypergridLinker.LinkRegion(scopeID, name); 360 GridRegion r = GetHypergridRegionByName(scopeID, name);
354 if (r != null) 361 if (r != null)
355 rinfos.Add(r); 362 rinfos.Add(r);
356 } 363 }
@@ -358,6 +365,20 @@ namespace OpenSim.Services.GridService
358 return rinfos; 365 return rinfos;
359 } 366 }
360 367
368 /// <summary>
369 /// Get a hypergrid region.
370 /// </summary>
371 /// <param name="scopeID"></param>
372 /// <param name="name"></param>
373 /// <returns>null if no hypergrid region could be found.</returns>
374 protected GridRegion GetHypergridRegionByName(UUID scopeID, string name)
375 {
376 if (name.Contains("."))
377 return m_HypergridLinker.LinkRegion(scopeID, name);
378 else
379 return null;
380 }
381
361 public List<GridRegion> GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax) 382 public List<GridRegion> GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax)
362 { 383 {
363 int xminSnap = (int)(xmin / Constants.RegionSize) * (int)Constants.RegionSize; 384 int xminSnap = (int)(xmin / Constants.RegionSize) * (int)Constants.RegionSize;
@@ -489,8 +510,9 @@ namespace OpenSim.Services.GridService
489 OpenSim.Data.RegionFlags flags = (OpenSim.Data.RegionFlags)Convert.ToInt32(r.Data["flags"]); 510 OpenSim.Data.RegionFlags flags = (OpenSim.Data.RegionFlags)Convert.ToInt32(r.Data["flags"]);
490 MainConsole.Instance.Output(String.Format("{0,-20} {1}\n{2,-20} {3}\n{4,-39} {5}\n\n", 511 MainConsole.Instance.Output(String.Format("{0,-20} {1}\n{2,-20} {3}\n{4,-39} {5}\n\n",
491 r.RegionName, r.RegionID, 512 r.RegionName, r.RegionID,
492 String.Format("{0},{1}", r.posX, r.posY), r.Data["serverURI"], 513 String.Format("{0},{1}", r.posX / Constants.RegionSize, r.posY / Constants.RegionSize),
493 r.Data["owner_uuid"].ToString(), flags.ToString())); 514 r.Data["serverURI"],
515 r.Data["owner_uuid"], flags));
494 } 516 }
495 return; 517 return;
496 } 518 }
diff --git a/OpenSim/Services/HypergridService/HGInstantMessageService.cs b/OpenSim/Services/HypergridService/HGInstantMessageService.cs
index ded589d..0c9cfd3 100644
--- a/OpenSim/Services/HypergridService/HGInstantMessageService.cs
+++ b/OpenSim/Services/HypergridService/HGInstantMessageService.cs
@@ -95,7 +95,6 @@ namespace OpenSim.Services.HypergridService
95 m_InGatekeeper = serverConfig.GetBoolean("InGatekeeper", false); 95 m_InGatekeeper = serverConfig.GetBoolean("InGatekeeper", false);
96 m_log.DebugFormat("[HG IM SERVICE]: Starting... InRobust? {0}", m_InGatekeeper); 96 m_log.DebugFormat("[HG IM SERVICE]: Starting... InRobust? {0}", m_InGatekeeper);
97 97
98
99 if (gridService == string.Empty || presenceService == string.Empty) 98 if (gridService == string.Empty || presenceService == string.Empty)
100 throw new Exception(String.Format("Incomplete specifications, InstantMessage Service cannot function.")); 99 throw new Exception(String.Format("Incomplete specifications, InstantMessage Service cannot function."));
101 100
@@ -120,8 +119,8 @@ namespace OpenSim.Services.HypergridService
120 119
121 public bool IncomingInstantMessage(GridInstantMessage im) 120 public bool IncomingInstantMessage(GridInstantMessage im)
122 { 121 {
123 m_log.DebugFormat("[HG IM SERVICE]: Received message from {0} to {1}", im.fromAgentID, im.toAgentID); 122// m_log.DebugFormat("[HG IM SERVICE]: Received message from {0} to {1}", im.fromAgentID, im.toAgentID);
124 UUID toAgentID = new UUID(im.toAgentID); 123// UUID toAgentID = new UUID(im.toAgentID);
125 124
126 bool success = false; 125 bool success = false;
127 if (m_IMSimConnector != null) 126 if (m_IMSimConnector != null)
@@ -142,7 +141,7 @@ namespace OpenSim.Services.HypergridService
142 141
143 public bool OutgoingInstantMessage(GridInstantMessage im, string url, bool foreigner) 142 public bool OutgoingInstantMessage(GridInstantMessage im, string url, bool foreigner)
144 { 143 {
145 m_log.DebugFormat("[HG IM SERVICE]: Sending message from {0} to {1}@{2}", im.fromAgentID, im.toAgentID, url); 144// m_log.DebugFormat("[HG IM SERVICE]: Sending message from {0} to {1}@{2}", im.fromAgentID, im.toAgentID, url);
146 if (url != string.Empty) 145 if (url != string.Empty)
147 return TrySendInstantMessage(im, url, true, foreigner); 146 return TrySendInstantMessage(im, url, true, foreigner);
148 else 147 else
@@ -326,7 +325,6 @@ namespace OpenSim.Services.HypergridService
326 // This is recursive!!!!! 325 // This is recursive!!!!!
327 return TrySendInstantMessage(im, url, false, foreigner); 326 return TrySendInstantMessage(im, url, false, foreigner);
328 } 327 }
329
330 } 328 }
331 329
332 private bool UndeliveredMessage(GridInstantMessage im) 330 private bool UndeliveredMessage(GridInstantMessage im)
@@ -334,16 +332,15 @@ namespace OpenSim.Services.HypergridService
334 if (m_RestURL != string.Empty && (im.offline != 0) 332 if (m_RestURL != string.Empty && (im.offline != 0)
335 && (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages))) 333 && (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages)))
336 { 334 {
337 m_log.DebugFormat("[HG IM SERVICE]: Message saved"); 335// m_log.DebugFormat("[HG IM SERVICE]: Message saved");
338 return SynchronousRestObjectPoster.BeginPostObject<GridInstantMessage, bool>(
339 "POST", m_RestURL + "/SaveMessage/", im);
340 336
337 return SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>(
338 "POST", m_RestURL + "/SaveMessage/", im);
341 } 339 }
342
343 else 340 else
344 { 341 {
345 return false; 342 return false;
346 } 343 }
347 } 344 }
348 } 345 }
349} 346} \ No newline at end of file
diff --git a/OpenSim/Services/Interfaces/IAssetService.cs b/OpenSim/Services/Interfaces/IAssetService.cs
index 1ac1cec..80494f1 100644
--- a/OpenSim/Services/Interfaces/IAssetService.cs
+++ b/OpenSim/Services/Interfaces/IAssetService.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Services.Interfaces
56 byte[] GetData(string id); 56 byte[] GetData(string id);
57 57
58 /// <summary> 58 /// <summary>
59 /// Synchronously fetches an asset from the local cache only 59 /// Synchronously fetches an asset from the local cache only.
60 /// </summary> 60 /// </summary>
61 /// <param name="id">Asset ID</param> 61 /// <param name="id">Asset ID</param>
62 /// <returns>The fetched asset, or null if it did not exist in the local cache</returns> 62 /// <returns>The fetched asset, or null if it did not exist in the local cache</returns>
@@ -75,7 +75,9 @@ namespace OpenSim.Services.Interfaces
75 /// <summary> 75 /// <summary>
76 /// Creates a new asset 76 /// Creates a new asset
77 /// </summary> 77 /// </summary>
78 /// Returns a random ID if none is passed into it 78 /// <remarks>
79 /// Returns a random ID if none is passed via the asset argument.
80 /// </remarks>
79 /// <param name="asset"></param> 81 /// <param name="asset"></param>
80 /// <returns></returns> 82 /// <returns></returns>
81 string Store(AssetBase asset); 83 string Store(AssetBase asset);
@@ -83,7 +85,9 @@ namespace OpenSim.Services.Interfaces
83 /// <summary> 85 /// <summary>
84 /// Update an asset's content 86 /// Update an asset's content
85 /// </summary> 87 /// </summary>
88 /// <remarks>
86 /// Attachments and bare scripts need this!! 89 /// Attachments and bare scripts need this!!
90 /// </remarks>
87 /// <param name="id"> </param> 91 /// <param name="id"> </param>
88 /// <param name="data"></param> 92 /// <param name="data"></param>
89 /// <returns></returns> 93 /// <returns></returns>
diff --git a/OpenSim/Services/Interfaces/IAuthorizationService.cs b/OpenSim/Services/Interfaces/IAuthorizationService.cs
index c5d577a..e5c68f6 100644
--- a/OpenSim/Services/Interfaces/IAuthorizationService.cs
+++ b/OpenSim/Services/Interfaces/IAuthorizationService.cs
@@ -34,14 +34,21 @@ namespace OpenSim.Services.Interfaces
34 34
35 public interface IAuthorizationService 35 public interface IAuthorizationService
36 { 36 {
37 ////////////////////////////////////////////////////// 37 /// <summary>
38 // Authorized 38 /// Check whether the user should be given access to the region.
39 // 39 /// </summary>
40 // This method returns a simple true false indicating 40 /// <remarks>
41 // whether or not a user has access to the region 41 /// We also supply user first name and last name for situations where the user does not have an account
42 // 42 /// on the region (e.g. they're a visitor via Hypergrid).
43 bool IsAuthorizedForRegion(string userID, string regionID, out string message); 43 /// </remarks>
44 44 /// <param name="userID"></param>
45 /// <param name="firstName">/param>
46 /// <param name="lastName"></param>
47 /// <param name="regionID"></param>
48 /// <param name="message"></param>
49 /// <returns></returns>
50 bool IsAuthorizedForRegion(
51 string userID, string firstName, string lastName, string regionID, out string message);
45 } 52 }
46 53
47 public class AuthorizationRequest 54 public class AuthorizationRequest
@@ -63,7 +70,8 @@ namespace OpenSim.Services.Interfaces
63 m_regionID = RegionID; 70 m_regionID = RegionID;
64 } 71 }
65 72
66 public AuthorizationRequest(string ID,string FirstName, string SurName, string Email, string RegionName, string RegionID) 73 public AuthorizationRequest(
74 string ID, string FirstName, string SurName, string Email, string RegionName, string RegionID)
67 { 75 {
68 m_userID = ID; 76 m_userID = ID;
69 m_firstname = FirstName; 77 m_firstname = FirstName;
@@ -108,9 +116,6 @@ namespace OpenSim.Services.Interfaces
108 get { return m_regionID; } 116 get { return m_regionID; }
109 set { m_regionID = value; } 117 set { m_regionID = value; }
110 } 118 }
111
112
113
114 } 119 }
115 120
116 public class AuthorizationResponse 121 public class AuthorizationResponse
@@ -126,7 +131,6 @@ namespace OpenSim.Services.Interfaces
126 { 131 {
127 m_isAuthorized = isAuthorized; 132 m_isAuthorized = isAuthorized;
128 m_message = message; 133 m_message = message;
129
130 } 134 }
131 135
132 public bool IsAuthorized 136 public bool IsAuthorized
@@ -141,4 +145,4 @@ namespace OpenSim.Services.Interfaces
141 set { m_message = value; } 145 set { m_message = value; }
142 } 146 }
143 } 147 }
144} 148} \ No newline at end of file
diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs
index d7af562..0d5ab7d 100644
--- a/OpenSim/Services/Interfaces/IAvatarService.cs
+++ b/OpenSim/Services/Interfaces/IAvatarService.cs
@@ -180,9 +180,9 @@ namespace OpenSim.Services.Interfaces
180 } 180 }
181 } 181 }
182 182
183 public AvatarAppearance ToAvatarAppearance(UUID owner) 183 public AvatarAppearance ToAvatarAppearance()
184 { 184 {
185 AvatarAppearance appearance = new AvatarAppearance(owner); 185 AvatarAppearance appearance = new AvatarAppearance();
186 186
187 if (Data.Count == 0) 187 if (Data.Count == 0)
188 return appearance; 188 return appearance;
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index f569fc8..a084309 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -71,6 +71,12 @@ namespace OpenSim.Services.Interfaces
71 /// <returns></returns> 71 /// <returns></returns>
72 GridRegion GetRegionByPosition(UUID scopeID, int x, int y); 72 GridRegion GetRegionByPosition(UUID scopeID, int x, int y);
73 73
74 /// <summary>
75 /// Get information about a region which exactly matches the name given.
76 /// </summary>
77 /// <param name="scopeID"></param>
78 /// <param name="regionName"></param>
79 /// <returns>Returns the region information if the name matched. Null otherwise.</returns>
74 GridRegion GetRegionByName(UUID scopeID, string regionName); 80 GridRegion GetRegionByName(UUID scopeID, string regionName);
75 81
76 /// <summary> 82 /// <summary>
diff --git a/OpenSim/Services/InventoryService/LibraryService.cs b/OpenSim/Services/InventoryService/LibraryService.cs
index 383f311..f90895b 100644
--- a/OpenSim/Services/InventoryService/LibraryService.cs
+++ b/OpenSim/Services/InventoryService/LibraryService.cs
@@ -193,10 +193,11 @@ namespace OpenSim.Services.InventoryService
193 item.Description = config.GetString("description", item.Name); 193 item.Description = config.GetString("description", item.Name);
194 item.InvType = config.GetInt("inventoryType", 0); 194 item.InvType = config.GetInt("inventoryType", 0);
195 item.AssetType = config.GetInt("assetType", item.InvType); 195 item.AssetType = config.GetInt("assetType", item.InvType);
196 item.CurrentPermissions = (uint)config.GetLong("currentPermissions", 0x7FFFFFFF); 196 item.CurrentPermissions = (uint)config.GetLong("currentPermissions", (uint)PermissionMask.All);
197 item.NextPermissions = (uint)config.GetLong("nextPermissions", 0x7FFFFFFF); 197 item.NextPermissions = (uint)config.GetLong("nextPermissions", (uint)PermissionMask.All);
198 item.EveryOnePermissions = (uint)config.GetLong("everyonePermissions", 0x7FFFFFFF); 198 item.EveryOnePermissions
199 item.BasePermissions = (uint)config.GetLong("basePermissions", 0x7FFFFFFF); 199 = (uint)config.GetLong("everyonePermissions", (uint)PermissionMask.All - (uint)PermissionMask.Modify);
200 item.BasePermissions = (uint)config.GetLong("basePermissions", (uint)PermissionMask.All);
200 item.Flags = (uint)config.GetInt("flags", 0); 201 item.Flags = (uint)config.GetInt("flags", 0);
201 202
202 if (libraryFolders.ContainsKey(item.Folder)) 203 if (libraryFolders.ContainsKey(item.Folder))
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
index 82acfbc..de05f28 100644
--- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
@@ -188,6 +188,8 @@ namespace OpenSim.Services.LLLoginService
188 188
189 private BuddyList m_buddyList = null; 189 private BuddyList m_buddyList = null;
190 190
191 private string currency;
192
191 static LLLoginResponse() 193 static LLLoginResponse()
192 { 194 {
193 // This is being set, but it's not used 195 // This is being set, but it's not used
@@ -223,7 +225,7 @@ namespace OpenSim.Services.LLLoginService
223 public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo, 225 public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo,
224 GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService, 226 GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService,
225 string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message, 227 string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message,
226 GridRegion home, IPEndPoint clientIP, string mapTileURL, string searchURL) 228 GridRegion home, IPEndPoint clientIP, string mapTileURL, string searchURL, string currency)
227 : this() 229 : this()
228 { 230 {
229 FillOutInventoryData(invSkel, libService); 231 FillOutInventoryData(invSkel, libService);
@@ -241,6 +243,7 @@ namespace OpenSim.Services.LLLoginService
241 StartLocation = where; 243 StartLocation = where;
242 MapTileURL = mapTileURL; 244 MapTileURL = mapTileURL;
243 SearchURL = searchURL; 245 SearchURL = searchURL;
246 Currency = currency;
244 247
245 FillOutHomeData(pinfo, home); 248 FillOutHomeData(pinfo, home);
246 LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z); 249 LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z);
@@ -388,6 +391,8 @@ namespace OpenSim.Services.LLLoginService
388 initialOutfit.Add(InitialOutfitHash); 391 initialOutfit.Add(InitialOutfitHash);
389 mapTileURL = String.Empty; 392 mapTileURL = String.Empty;
390 searchURL = String.Empty; 393 searchURL = String.Empty;
394
395 currency = String.Empty;
391 } 396 }
392 397
393 398
@@ -462,6 +467,12 @@ namespace OpenSim.Services.LLLoginService
462 responseData["buddy-list"] = m_buddyList.ToArray(); 467 responseData["buddy-list"] = m_buddyList.ToArray();
463 } 468 }
464 469
470 if (currency != String.Empty)
471 {
472 // responseData["real_currency"] = currency;
473 responseData["currency"] = currency;
474 }
475
465 responseData["login"] = "true"; 476 responseData["login"] = "true";
466 477
467 return responseData; 478 return responseData;
@@ -946,6 +957,12 @@ namespace OpenSim.Services.LLLoginService
946 set { m_buddyList = value; } 957 set { m_buddyList = value; }
947 } 958 }
948 959
960 public string Currency
961 {
962 get { return currency; }
963 set { currency = value; }
964 }
965
949 #endregion 966 #endregion
950 967
951 public class UserInfo 968 public class UserInfo
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index e7dd15e..d8a2054 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -75,6 +75,7 @@ namespace OpenSim.Services.LLLoginService
75 protected bool m_AllowRemoteSetLoginLevel; 75 protected bool m_AllowRemoteSetLoginLevel;
76 protected string m_MapTileURL; 76 protected string m_MapTileURL;
77 protected string m_SearchURL; 77 protected string m_SearchURL;
78 protected string m_Currency;
78 79
79 protected string m_AllowedClients; 80 protected string m_AllowedClients;
80 protected string m_DeniedClients; 81 protected string m_DeniedClients;
@@ -108,6 +109,7 @@ namespace OpenSim.Services.LLLoginService
108 m_GatekeeperURL = m_LoginServerConfig.GetString("GatekeeperURI", string.Empty); 109 m_GatekeeperURL = m_LoginServerConfig.GetString("GatekeeperURI", string.Empty);
109 m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty); 110 m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty);
110 m_SearchURL = m_LoginServerConfig.GetString("SearchURL", string.Empty); 111 m_SearchURL = m_LoginServerConfig.GetString("SearchURL", string.Empty);
112 m_Currency = m_LoginServerConfig.GetString("Currency", string.Empty);
111 113
112 m_AllowedClients = m_LoginServerConfig.GetString("AllowedClients", string.Empty); 114 m_AllowedClients = m_LoginServerConfig.GetString("AllowedClients", string.Empty);
113 m_DeniedClients = m_LoginServerConfig.GetString("DeniedClients", string.Empty); 115 m_DeniedClients = m_LoginServerConfig.GetString("DeniedClients", string.Empty);
@@ -408,14 +410,14 @@ namespace OpenSim.Services.LLLoginService
408 if (m_FriendsService != null) 410 if (m_FriendsService != null)
409 { 411 {
410 friendsList = m_FriendsService.GetFriends(account.PrincipalID); 412 friendsList = m_FriendsService.GetFriends(account.PrincipalID);
411 m_log.DebugFormat("[LLOGIN SERVICE]: Retrieved {0} friends", friendsList.Length); 413// m_log.DebugFormat("[LLOGIN SERVICE]: Retrieved {0} friends", friendsList.Length);
412 } 414 }
413 415
414 // 416 //
415 // Finally, fill out the response and return it 417 // Finally, fill out the response and return it
416 // 418 //
417 LLLoginResponse response = new LLLoginResponse(account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, 419 LLLoginResponse response = new LLLoginResponse(account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService,
418 where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, m_MapTileURL, m_SearchURL); 420 where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, m_MapTileURL, m_SearchURL, m_Currency);
419 421
420 m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client."); 422 m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client.");
421 return response; 423 return response;
@@ -792,7 +794,7 @@ namespace OpenSim.Services.LLLoginService
792 if (avatar != null) 794 if (avatar != null)
793 aCircuit.Appearance = new AvatarAppearance(avatar); 795 aCircuit.Appearance = new AvatarAppearance(avatar);
794 else 796 else
795 aCircuit.Appearance = new AvatarAppearance(account.PrincipalID); 797 aCircuit.Appearance = new AvatarAppearance();
796 798
797 //aCircuit.BaseFolder = irrelevant 799 //aCircuit.BaseFolder = irrelevant
798 aCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); 800 aCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath();