From 1cb7695fb0bcdcbdbb6f2a410fd9f337438afef7 Mon Sep 17 00:00:00 2001 From: Tom Grimshaw Date: Thu, 1 Jul 2010 08:48:02 -0700 Subject: Catch newid == null which is what happens if the asset service is offline (seems a connection failure does not throw an exception) --- OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs index ae600bb..bc56963 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs @@ -271,6 +271,10 @@ namespace OpenSim.Services.Connectors { newID = SynchronousRestObjectRequester. MakeRequest("POST", uri, asset); + if (newID == null) + { + newID = UUID.Zero.ToString(); + } } catch (Exception e) { -- cgit v1.1 From 38384cc79c04fe9b97070104283be02511c4e12c Mon Sep 17 00:00:00 2001 From: Tom Grimshaw Date: Thu, 1 Jul 2010 08:52:30 -0700 Subject: Report asset upload success if it has previously failed --- OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs index bc56963..bbccef9 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs @@ -305,6 +305,10 @@ namespace OpenSim.Services.Connectors } else { + if (asset.UploadAttempts > 0) + { + m_log.InfoFormat("[Assets] Upload of {0} succeeded after {1} failed attempts", asset.ID.ToString(), asset.UploadAttempts.ToString())); + } if (newID != String.Empty) { // Placing this here, so that this work with old asset servers that don't send any reply back -- cgit v1.1 From b38a22506b31041e29a1271db32046efcb14af4e Mon Sep 17 00:00:00 2001 From: Tom Grimshaw Date: Thu, 1 Jul 2010 08:55:52 -0700 Subject: Fix build break --- OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs index bbccef9..94acd6c 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs @@ -307,7 +307,7 @@ namespace OpenSim.Services.Connectors { if (asset.UploadAttempts > 0) { - m_log.InfoFormat("[Assets] Upload of {0} succeeded after {1} failed attempts", asset.ID.ToString(), asset.UploadAttempts.ToString())); + m_log.InfoFormat("[Assets] Upload of {0} succeeded after {1} failed attempts", asset.ID.ToString(), asset.UploadAttempts.ToString()); } if (newID != String.Empty) { -- cgit v1.1