diff options
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/AssetServer.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/AssetServer.cs | 54 |
1 files changed, 25 insertions, 29 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetServer.cs b/OpenSim/Framework/Communications/Cache/AssetServer.cs index e5cceaa..00c2b2a 100644 --- a/OpenSim/Framework/Communications/Cache/AssetServer.cs +++ b/OpenSim/Framework/Communications/Cache/AssetServer.cs | |||
@@ -72,37 +72,33 @@ namespace OpenSim.Framework.Communications.Cache | |||
72 | } | 72 | } |
73 | } | 73 | } |
74 | 74 | ||
75 | protected override void RunRequests() | 75 | protected override void ProcessRequest(AssetRequest req) |
76 | { | 76 | { |
77 | while (true) | 77 | byte[] idata = null; |
78 | bool found = false; | ||
79 | AssetStorage foundAsset = null; | ||
80 | IObjectSet result = db.Query(new AssetUUIDQuery(req.AssetID)); | ||
81 | if (result.Count > 0) | ||
78 | { | 82 | { |
79 | byte[] idata = null; | 83 | foundAsset = (AssetStorage)result.Next(); |
80 | bool found = false; | 84 | found = true; |
81 | AssetStorage foundAsset = null; | 85 | } |
82 | ARequest req = _assetRequests.Dequeue(); | 86 | |
83 | IObjectSet result = db.Query(new AssetUUIDQuery(req.AssetID)); | 87 | AssetBase asset = new AssetBase(); |
84 | if (result.Count > 0) | 88 | if (found) |
85 | { | 89 | { |
86 | foundAsset = (AssetStorage) result.Next(); | 90 | asset.FullID = foundAsset.UUID; |
87 | found = true; | 91 | asset.Type = foundAsset.Type; |
88 | } | 92 | asset.InvType = foundAsset.Type; |
89 | 93 | asset.Name = foundAsset.Name; | |
90 | AssetBase asset = new AssetBase(); | 94 | idata = foundAsset.Data; |
91 | if (found) | 95 | asset.Data = idata; |
92 | { | 96 | _receiver.AssetReceived(asset, req.IsTexture); |
93 | asset.FullID = foundAsset.UUID; | 97 | } |
94 | asset.Type = foundAsset.Type; | 98 | else |
95 | asset.InvType = foundAsset.Type; | 99 | { |
96 | asset.Name = foundAsset.Name; | 100 | //asset.FullID = ; |
97 | idata = foundAsset.Data; | 101 | _receiver.AssetNotFound(req.AssetID); |
98 | asset.Data = idata; | ||
99 | _receiver.AssetReceived(asset, req.IsTexture); | ||
100 | } | ||
101 | else | ||
102 | { | ||
103 | //asset.FullID = ; | ||
104 | _receiver.AssetNotFound(req.AssetID); | ||
105 | } | ||
106 | } | 102 | } |
107 | } | 103 | } |
108 | 104 | ||