diff options
author | Justin Clarke Casey | 2009-05-15 20:20:55 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-05-15 20:20:55 +0000 |
commit | c11e047410fdabb5c53ebdb7cec637a177254aeb (patch) | |
tree | a59b59b3840090dc7ab4d774fd2acae8a65f3dab /OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs | |
parent | * Change default sqlite asset db back to Asset.db instead of AssetStorage.db (diff) | |
download | opensim-SC_OLD-c11e047410fdabb5c53ebdb7cec637a177254aeb.zip opensim-SC_OLD-c11e047410fdabb5c53ebdb7cec637a177254aeb.tar.gz opensim-SC_OLD-c11e047410fdabb5c53ebdb7cec637a177254aeb.tar.bz2 opensim-SC_OLD-c11e047410fdabb5c53ebdb7cec637a177254aeb.tar.xz |
* Resolve bug where save oar would never complete if any assets were missing
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index 6cd52ab..97f9b18 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs | |||
@@ -97,15 +97,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
97 | 97 | ||
98 | foreach (UUID uuid in m_uuids) | 98 | foreach (UUID uuid in m_uuids) |
99 | { | 99 | { |
100 | m_assetCache.Get(uuid.ToString(), this, AssetReceived); | 100 | m_assetCache.Get(uuid.ToString(), this, AssetRequestCallback); |
101 | } | ||
102 | } | ||
103 | |||
104 | protected void AssetReceived(string id, object sender, AssetBase asset) | ||
105 | { | ||
106 | if (asset != null) | ||
107 | { | ||
108 | AssetRequestCallback(asset.FullID, asset); | ||
109 | } | 101 | } |
110 | } | 102 | } |
111 | 103 | ||
@@ -114,24 +106,24 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
114 | /// </summary> | 106 | /// </summary> |
115 | /// <param name="assetID"></param> | 107 | /// <param name="assetID"></param> |
116 | /// <param name="asset"></param> | 108 | /// <param name="asset"></param> |
117 | public void AssetRequestCallback(UUID assetID, AssetBase asset) | 109 | public void AssetRequestCallback(string id, object sender, AssetBase asset) |
118 | { | 110 | { |
119 | //m_log.DebugFormat("[ARCHIVER]: Received callback for asset {0}", assetID); | 111 | //m_log.DebugFormat("[ARCHIVER]: Received callback for asset {0}", assetID); |
120 | 112 | ||
121 | if (asset != null) | 113 | if (asset != null) |
122 | { | 114 | { |
123 | m_foundAssetUuids.Add(assetID); | 115 | m_foundAssetUuids.Add(asset.FullID); |
124 | m_assetsArchiver.WriteAsset(asset); | 116 | m_assetsArchiver.WriteAsset(asset); |
125 | } | 117 | } |
126 | else | 118 | else |
127 | { | 119 | { |
128 | m_notFoundAssetUuids.Add(assetID); | 120 | m_notFoundAssetUuids.Add(new UUID(id)); |
129 | } | 121 | } |
130 | 122 | ||
131 | if (m_foundAssetUuids.Count + m_notFoundAssetUuids.Count == m_repliesRequired) | 123 | if (m_foundAssetUuids.Count + m_notFoundAssetUuids.Count == m_repliesRequired) |
132 | { | 124 | { |
133 | m_log.DebugFormat( | 125 | m_log.DebugFormat( |
134 | "[ARCHIVER]: Successfully received {0} assets and notification of {1} missing assets", | 126 | "[ARCHIVER]: Successfully added {0} assets ({1} assets missing)", |
135 | m_foundAssetUuids.Count, m_notFoundAssetUuids.Count); | 127 | m_foundAssetUuids.Count, m_notFoundAssetUuids.Count); |
136 | 128 | ||
137 | // We want to stop using the asset cache thread asap | 129 | // We want to stop using the asset cache thread asap |