From 8f345d36d83cb9c3ebf97e7bcc69fa31d5441c78 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Fri, 11 Apr 2008 19:04:33 +0000
Subject: * Minor refactoring in OGS1InventoryService
---
.../Communications/OGS1/OGS1InventoryService.cs | 47 +++++++++-------------
1 file changed, 20 insertions(+), 27 deletions(-)
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
index 8f293f9..41ca4fb 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
@@ -58,35 +58,28 @@ namespace OpenSim.Region.Communications.OGS1
{
InventoryRequest request = new InventoryRequest(userID, callback);
m_RequestingInventory.Add(userID, request);
- RequestInventory(userID);
- }
- }
-
- ///
- /// Request the entire user's inventory (folders and items) from the inventory server.
- ///
- /// XXX May want to change this so that we don't end up shuffling over data which might prove
- /// entirely unnecessary.
- ///
- ///
- private void RequestInventory(LLUUID userID)
- {
- try
- {
- m_log.InfoFormat(
- "[OGS1 INVENTORY SERVICE]: Requesting inventory from {0}/GetInventory/ for user {1}",
- _inventoryServerUrl, userID);
-
- RestObjectPosterResponse requester
- = new RestObjectPosterResponse();
- requester.ResponseCallback = InventoryResponse;
-
- requester.BeginPostObject(_inventoryServerUrl + "/GetInventory/", userID.UUID);
+
+ try
+ {
+ m_log.InfoFormat(
+ "[OGS1 INVENTORY SERVICE]: Requesting inventory from {0}/GetInventory/ for user {1}",
+ _inventoryServerUrl, userID);
+
+ RestObjectPosterResponse requester
+ = new RestObjectPosterResponse();
+ requester.ResponseCallback = InventoryResponse;
+
+ requester.BeginPostObject(_inventoryServerUrl + "/GetInventory/", userID.UUID);
+ }
+ catch (System.Net.WebException e)
+ {
+ m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Request inventory operation failed, {0} {1}",
+ e.Source, e.Message);
+ }
}
- catch (System.Net.WebException e)
+ else
{
- m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Request inventory operation failed, {0} {1}",
- e.Source, e.Message);
+ m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: RequestInventoryForUser() - could you not find user profile for {0}", userID);
}
}
--
cgit v1.1