diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Agent/TextureDownload')
3 files changed, 104 insertions, 98 deletions
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs index b8899d2..ae2df69 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs | |||
@@ -40,14 +40,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
40 | { | 40 | { |
41 | //private static readonly log4net.ILog m_log | 41 | //private static readonly log4net.ILog m_log |
42 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 42 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
43 | |||
44 | private Scene m_scene; | ||
45 | private List<Scene> m_scenes = new List<Scene>(); | ||
46 | 43 | ||
47 | /// <summary> | 44 | /// <summary> |
48 | /// There is one queue for all textures waiting to be sent, regardless of the requesting user. | 45 | /// There is one queue for all textures waiting to be sent, regardless of the requesting user. |
49 | /// </summary> | 46 | /// </summary> |
50 | private readonly BlockingQueue<ITextureSender> m_queueSenders | 47 | private readonly BlockingQueue<ITextureSender> m_queueSenders |
51 | = new BlockingQueue<ITextureSender>(); | 48 | = new BlockingQueue<ITextureSender>(); |
52 | 49 | ||
53 | /// <summary> | 50 | /// <summary> |
@@ -56,12 +53,17 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
56 | private readonly Dictionary<LLUUID, UserTextureDownloadService> m_userTextureServices = | 53 | private readonly Dictionary<LLUUID, UserTextureDownloadService> m_userTextureServices = |
57 | new Dictionary<LLUUID, UserTextureDownloadService>(); | 54 | new Dictionary<LLUUID, UserTextureDownloadService>(); |
58 | 55 | ||
56 | private Scene m_scene; | ||
57 | private List<Scene> m_scenes = new List<Scene>(); | ||
58 | |||
59 | private Thread m_thread; | 59 | private Thread m_thread; |
60 | 60 | ||
61 | public TextureDownloadModule() | 61 | public TextureDownloadModule() |
62 | { | 62 | { |
63 | } | 63 | } |
64 | 64 | ||
65 | #region IRegionModule Members | ||
66 | |||
65 | public void Initialise(Scene scene, IConfigSource config) | 67 | public void Initialise(Scene scene, IConfigSource config) |
66 | { | 68 | { |
67 | if (m_scene == null) | 69 | if (m_scene == null) |
@@ -83,6 +85,26 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
83 | } | 85 | } |
84 | } | 86 | } |
85 | 87 | ||
88 | public void PostInitialise() | ||
89 | { | ||
90 | } | ||
91 | |||
92 | public void Close() | ||
93 | { | ||
94 | } | ||
95 | |||
96 | public string Name | ||
97 | { | ||
98 | get { return "TextureDownloadModule"; } | ||
99 | } | ||
100 | |||
101 | public bool IsSharedModule | ||
102 | { | ||
103 | get { return false; } | ||
104 | } | ||
105 | |||
106 | #endregion | ||
107 | |||
86 | /// <summary> | 108 | /// <summary> |
87 | /// Cleanup the texture service related objects for the removed presence. | 109 | /// Cleanup the texture service related objects for the removed presence. |
88 | /// </summary> | 110 | /// </summary> |
@@ -102,24 +124,6 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
102 | } | 124 | } |
103 | } | 125 | } |
104 | 126 | ||
105 | public void PostInitialise() | ||
106 | { | ||
107 | } | ||
108 | |||
109 | public void Close() | ||
110 | { | ||
111 | } | ||
112 | |||
113 | public string Name | ||
114 | { | ||
115 | get { return "TextureDownloadModule"; } | ||
116 | } | ||
117 | |||
118 | public bool IsSharedModule | ||
119 | { | ||
120 | get { return false; } | ||
121 | } | ||
122 | |||
123 | public void NewClient(IClientAPI client) | 127 | public void NewClient(IClientAPI client) |
124 | { | 128 | { |
125 | client.OnRequestTexture += TextureRequest; | 129 | client.OnRequestTexture += TextureRequest; |
@@ -143,7 +147,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
143 | 147 | ||
144 | textureService = new UserTextureDownloadService(client, m_scene, m_queueSenders); | 148 | textureService = new UserTextureDownloadService(client, m_scene, m_queueSenders); |
145 | m_userTextureServices.Add(client.AgentId, textureService); | 149 | m_userTextureServices.Add(client.AgentId, textureService); |
146 | 150 | ||
147 | return true; | 151 | return true; |
148 | } | 152 | } |
149 | } | 153 | } |
@@ -157,11 +161,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
157 | { | 161 | { |
158 | IClientAPI client = (IClientAPI) sender; | 162 | IClientAPI client = (IClientAPI) sender; |
159 | UserTextureDownloadService textureService; | 163 | UserTextureDownloadService textureService; |
160 | 164 | ||
161 | if (TryGetUserTextureService(client, out textureService)) | 165 | if (TryGetUserTextureService(client, out textureService)) |
162 | { | 166 | { |
163 | textureService.HandleTextureRequest(e); | 167 | textureService.HandleTextureRequest(e); |
164 | } | 168 | } |
165 | } | 169 | } |
166 | 170 | ||
167 | /// <summary> | 171 | /// <summary> |
@@ -170,11 +174,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
170 | public void ProcessTextureSenders() | 174 | public void ProcessTextureSenders() |
171 | { | 175 | { |
172 | ITextureSender sender = null; | 176 | ITextureSender sender = null; |
173 | 177 | ||
174 | while (true) | 178 | while (true) |
175 | { | 179 | { |
176 | sender = m_queueSenders.Dequeue(); | 180 | sender = m_queueSenders.Dequeue(); |
177 | 181 | ||
178 | if (sender.Cancel) | 182 | if (sender.Cancel) |
179 | { | 183 | { |
180 | TextureSent(sender); | 184 | TextureSent(sender); |
@@ -193,10 +197,10 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
193 | m_queueSenders.Enqueue(sender); | 197 | m_queueSenders.Enqueue(sender); |
194 | } | 198 | } |
195 | } | 199 | } |
196 | 200 | ||
197 | // Make sure that any sender we currently have can get garbage collected | 201 | // Make sure that any sender we currently have can get garbage collected |
198 | sender = null; | 202 | sender = null; |
199 | 203 | ||
200 | //m_log.InfoFormat("[TEXTURE DOWNLOAD] Texture sender queue size: {0}", m_queueSenders.Count()); | 204 | //m_log.InfoFormat("[TEXTURE DOWNLOAD] Texture sender queue size: {0}", m_queueSenders.Count()); |
201 | } | 205 | } |
202 | } | 206 | } |
@@ -207,9 +211,9 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
207 | /// <param name="sender"></param> | 211 | /// <param name="sender"></param> |
208 | private void TextureSent(ITextureSender sender) | 212 | private void TextureSent(ITextureSender sender) |
209 | { | 213 | { |
210 | sender.Sending = false; | 214 | sender.Sending = false; |
211 | //m_log.DebugFormat("[TEXTURE DOWNLOAD]: Removing download stat for {0}", sender.assetID); | 215 | //m_log.DebugFormat("[TEXTURE DOWNLOAD]: Removing download stat for {0}", sender.assetID); |
212 | m_scene.AddPendingDownloads(-1); | 216 | m_scene.AddPendingDownloads(-1); |
213 | } | 217 | } |
214 | } | 218 | } |
215 | } \ No newline at end of file | 219 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs index 6f11f73..b181d20 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs | |||
@@ -39,55 +39,60 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
39 | { | 39 | { |
40 | //private static readonly log4net.ILog m_log | 40 | //private static readonly log4net.ILog m_log |
41 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 41 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
42 | 42 | ||
43 | private LLUUID m_textureId; | 43 | private bool m_cancel = false; |
44 | private IClientAPI m_client; | 44 | private IClientAPI m_client; |
45 | 45 | ||
46 | // See ITextureSender | 46 | // See ITextureSender |
47 | public bool Sending | 47 | |
48 | { | 48 | private bool m_sending = false; |
49 | get { return false; } | 49 | private LLUUID m_textureId; |
50 | set { m_sending = value; } | ||
51 | } | ||
52 | |||
53 | private bool m_sending = false; | ||
54 | 50 | ||
55 | // See ITextureSender | 51 | // See ITextureSender |
56 | public bool Cancel | 52 | |
57 | { | ||
58 | get { return false; } | ||
59 | set { m_cancel = value; } | ||
60 | } | ||
61 | |||
62 | private bool m_cancel = false; | ||
63 | |||
64 | public TextureNotFoundSender(IClientAPI client, LLUUID textureID) | 53 | public TextureNotFoundSender(IClientAPI client, LLUUID textureID) |
65 | { | 54 | { |
66 | m_client = client; | 55 | m_client = client; |
67 | m_textureId = textureID; | 56 | m_textureId = textureID; |
68 | } | 57 | } |
69 | 58 | ||
59 | #region ITextureSender Members | ||
60 | |||
61 | public bool Sending | ||
62 | { | ||
63 | get { return false; } | ||
64 | set { m_sending = value; } | ||
65 | } | ||
66 | |||
67 | public bool Cancel | ||
68 | { | ||
69 | get { return false; } | ||
70 | set { m_cancel = value; } | ||
71 | } | ||
72 | |||
70 | // See ITextureSender | 73 | // See ITextureSender |
71 | public void UpdateRequest(int discardLevel, uint packetNumber) | 74 | public void UpdateRequest(int discardLevel, uint packetNumber) |
72 | { | 75 | { |
73 | // Not need to implement since priority changes don't affect this operation | 76 | // Not need to implement since priority changes don't affect this operation |
74 | } | 77 | } |
75 | 78 | ||
76 | // See ITextureSender | 79 | // See ITextureSender |
77 | public bool SendTexturePacket() | 80 | public bool SendTexturePacket() |
78 | { | 81 | { |
79 | //m_log.InfoFormat( | 82 | //m_log.InfoFormat( |
80 | // "[TEXTURE NOT FOUND SENDER]: Informing the client that texture {0} cannot be found", | 83 | // "[TEXTURE NOT FOUND SENDER]: Informing the client that texture {0} cannot be found", |
81 | // m_textureId); | 84 | // m_textureId); |
82 | 85 | ||
83 | ImageNotInDatabasePacket notFound = new ImageNotInDatabasePacket(); | 86 | ImageNotInDatabasePacket notFound = new ImageNotInDatabasePacket(); |
84 | notFound.ImageID.ID = m_textureId; | 87 | notFound.ImageID.ID = m_textureId; |
85 | 88 | ||
86 | // XXX Temporarily disabling as this appears to be causing client crashes on at least | 89 | // XXX Temporarily disabling as this appears to be causing client crashes on at least |
87 | // 1.19.0(5) of the Linden Second Life client. | 90 | // 1.19.0(5) of the Linden Second Life client. |
88 | // m_client.OutPacket(notFound, ThrottleOutPacketType.Texture); | 91 | // m_client.OutPacket(notFound, ThrottleOutPacketType.Texture); |
89 | 92 | ||
90 | return true; | 93 | return true; |
91 | } | 94 | } |
95 | |||
96 | #endregion | ||
92 | } | 97 | } |
93 | } \ No newline at end of file | 98 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs index 08a22d6..4f63fd0 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs | |||
@@ -32,8 +32,6 @@ using log4net; | |||
32 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
33 | using OpenSim.Framework.Communications.Limit; | 33 | using OpenSim.Framework.Communications.Limit; |
34 | using OpenSim.Region.Environment.Interfaces; | 34 | using OpenSim.Region.Environment.Interfaces; |
35 | using OpenSim.Region.Environment.Modules.Agent.TextureDownload; | ||
36 | using OpenSim.Region.Environment.Modules.Agent.TextureSender; | ||
37 | using OpenSim.Region.Environment.Scenes; | 35 | using OpenSim.Region.Environment.Scenes; |
38 | 36 | ||
39 | namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | 37 | namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload |
@@ -45,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
45 | /// </summary> | 43 | /// </summary> |
46 | public class UserTextureDownloadService | 44 | public class UserTextureDownloadService |
47 | { | 45 | { |
48 | private static readonly ILog m_log | 46 | private static readonly ILog m_log |
49 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 47 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
50 | 48 | ||
51 | /// <summary> | 49 | /// <summary> |
@@ -56,35 +54,34 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
56 | /// sophisticated way. | 54 | /// sophisticated way. |
57 | /// </summary> | 55 | /// </summary> |
58 | private static readonly int MAX_ALLOWED_TEXTURE_REQUESTS = 5; | 56 | private static readonly int MAX_ALLOWED_TEXTURE_REQUESTS = 5; |
59 | 57 | ||
60 | /// <summary> | ||
61 | /// We're going to limit requests for the same missing texture. | ||
62 | /// XXX This is really a temporary solution to deal with the situation where a client continually requests | ||
63 | /// the same missing textures | ||
64 | /// </summary> | ||
65 | private readonly IRequestLimitStrategy<LLUUID> missingTextureLimitStrategy | ||
66 | = new RepeatLimitStrategy<LLUUID>(MAX_ALLOWED_TEXTURE_REQUESTS); | ||
67 | |||
68 | /// <summary> | 58 | /// <summary> |
69 | /// XXX Also going to limit requests for found textures. | 59 | /// XXX Also going to limit requests for found textures. |
70 | /// </summary> | 60 | /// </summary> |
71 | private readonly IRequestLimitStrategy<LLUUID> foundTextureLimitStrategy | 61 | private readonly IRequestLimitStrategy<LLUUID> foundTextureLimitStrategy |
72 | = new RepeatLimitStrategy<LLUUID>(MAX_ALLOWED_TEXTURE_REQUESTS); | 62 | = new RepeatLimitStrategy<LLUUID>(MAX_ALLOWED_TEXTURE_REQUESTS); |
73 | 63 | ||
74 | /// <summary> | 64 | private readonly IClientAPI m_client; |
75 | /// Holds texture senders before they have received the appropriate texture from the asset cache. | 65 | private readonly Scene m_scene; |
76 | /// </summary> | 66 | |
77 | private readonly Dictionary<LLUUID, TextureSender.TextureSender> m_textureSenders = new Dictionary<LLUUID, TextureSender.TextureSender>(); | ||
78 | |||
79 | /// <summary> | 67 | /// <summary> |
80 | /// Texture Senders are placed in this queue once they have received their texture from the asset | 68 | /// Texture Senders are placed in this queue once they have received their texture from the asset |
81 | /// cache. Another module actually invokes the send. | 69 | /// cache. Another module actually invokes the send. |
82 | /// </summary> | 70 | /// </summary> |
83 | private readonly BlockingQueue<ITextureSender> m_sharedSendersQueue; | 71 | private readonly BlockingQueue<ITextureSender> m_sharedSendersQueue; |
84 | 72 | ||
85 | private readonly Scene m_scene; | 73 | /// <summary> |
86 | 74 | /// Holds texture senders before they have received the appropriate texture from the asset cache. | |
87 | private readonly IClientAPI m_client; | 75 | /// </summary> |
76 | private readonly Dictionary<LLUUID, TextureSender.TextureSender> m_textureSenders = new Dictionary<LLUUID, TextureSender.TextureSender>(); | ||
77 | |||
78 | /// <summary> | ||
79 | /// We're going to limit requests for the same missing texture. | ||
80 | /// XXX This is really a temporary solution to deal with the situation where a client continually requests | ||
81 | /// the same missing textures | ||
82 | /// </summary> | ||
83 | private readonly IRequestLimitStrategy<LLUUID> missingTextureLimitStrategy | ||
84 | = new RepeatLimitStrategy<LLUUID>(MAX_ALLOWED_TEXTURE_REQUESTS); | ||
88 | 85 | ||
89 | public UserTextureDownloadService( | 86 | public UserTextureDownloadService( |
90 | IClientAPI client, Scene scene, BlockingQueue<ITextureSender> sharedQueue) | 87 | IClientAPI client, Scene scene, BlockingQueue<ITextureSender> sharedQueue) |
@@ -112,19 +109,19 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
112 | { | 109 | { |
113 | // If we've received new non UUID information for this request and it hasn't dispatched | 110 | // If we've received new non UUID information for this request and it hasn't dispatched |
114 | // yet, then update the request accordingly. | 111 | // yet, then update the request accordingly. |
115 | textureSender.UpdateRequest(e.DiscardLevel, e.PacketNumber); | 112 | textureSender.UpdateRequest(e.DiscardLevel, e.PacketNumber); |
116 | } | 113 | } |
117 | else | 114 | else |
118 | { | 115 | { |
119 | if (!foundTextureLimitStrategy.AllowRequest(e.RequestedAssetID)) | 116 | if (!foundTextureLimitStrategy.AllowRequest(e.RequestedAssetID)) |
120 | { | 117 | { |
121 | // m_log.DebugFormat( | 118 | // m_log.DebugFormat( |
122 | // "[USER TEXTURE DOWNLOAD SERVICE]: Refusing request for {0} from client {1}", | 119 | // "[USER TEXTURE DOWNLOAD SERVICE]: Refusing request for {0} from client {1}", |
123 | // e.RequestedAssetID, m_client.AgentId); | 120 | // e.RequestedAssetID, m_client.AgentId); |
124 | 121 | ||
125 | return; | 122 | return; |
126 | } | 123 | } |
127 | else if (!missingTextureLimitStrategy.AllowRequest(e.RequestedAssetID)) | 124 | else if (!missingTextureLimitStrategy.AllowRequest(e.RequestedAssetID)) |
128 | { | 125 | { |
129 | if (missingTextureLimitStrategy.IsFirstRefusal(e.RequestedAssetID)) | 126 | if (missingTextureLimitStrategy.IsFirstRefusal(e.RequestedAssetID)) |
130 | { | 127 | { |
@@ -135,17 +132,17 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
135 | // m_log.DebugFormat( | 132 | // m_log.DebugFormat( |
136 | // "[USER TEXTURE DOWNLOAD SERVICE]: Dropping requests for notified missing texture {0} for client {1} since we have received more than {2} requests", | 133 | // "[USER TEXTURE DOWNLOAD SERVICE]: Dropping requests for notified missing texture {0} for client {1} since we have received more than {2} requests", |
137 | // e.RequestedAssetID, m_client.AgentId, MAX_ALLOWED_TEXTURE_REQUESTS); | 134 | // e.RequestedAssetID, m_client.AgentId, MAX_ALLOWED_TEXTURE_REQUESTS); |
138 | } | 135 | } |
139 | 136 | ||
140 | return; | 137 | return; |
141 | } | 138 | } |
142 | 139 | ||
143 | m_scene.AddPendingDownloads(1); | 140 | m_scene.AddPendingDownloads(1); |
144 | 141 | ||
145 | TextureSender.TextureSender requestHandler = new TextureSender.TextureSender(m_client, e.DiscardLevel, e.PacketNumber); | 142 | TextureSender.TextureSender requestHandler = new TextureSender.TextureSender(m_client, e.DiscardLevel, e.PacketNumber); |
146 | m_textureSenders.Add(e.RequestedAssetID, requestHandler); | 143 | m_textureSenders.Add(e.RequestedAssetID, requestHandler); |
147 | 144 | ||
148 | m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true); | 145 | m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true); |
149 | } | 146 | } |
150 | } | 147 | } |
151 | } | 148 | } |
@@ -170,7 +167,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
170 | public void TextureCallback(LLUUID textureID, AssetBase texture) | 167 | public void TextureCallback(LLUUID textureID, AssetBase texture) |
171 | { | 168 | { |
172 | //m_log.DebugFormat("[USER TEXTURE DOWNLOAD SERVICE]: Calling TextureCallback with {0}, texture == null is {1}", textureID, (texture == null ? true : false)); | 169 | //m_log.DebugFormat("[USER TEXTURE DOWNLOAD SERVICE]: Calling TextureCallback with {0}, texture == null is {1}", textureID, (texture == null ? true : false)); |
173 | 170 | ||
174 | lock (m_textureSenders) | 171 | lock (m_textureSenders) |
175 | { | 172 | { |
176 | TextureSender.TextureSender textureSender; | 173 | TextureSender.TextureSender textureSender; |
@@ -181,18 +178,18 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
181 | // this on to the TextureSender it will blow up, so just discard for now. | 178 | // this on to the TextureSender it will blow up, so just discard for now. |
182 | // Needs investigation. | 179 | // Needs investigation. |
183 | if (texture == null || texture.Data == null) | 180 | if (texture == null || texture.Data == null) |
184 | { | 181 | { |
185 | if (!missingTextureLimitStrategy.IsMonitoringRequests(textureID)) | 182 | if (!missingTextureLimitStrategy.IsMonitoringRequests(textureID)) |
186 | { | 183 | { |
187 | missingTextureLimitStrategy.MonitorRequests(textureID); | 184 | missingTextureLimitStrategy.MonitorRequests(textureID); |
188 | 185 | ||
189 | m_log.DebugFormat( | 186 | m_log.DebugFormat( |
190 | "[USER TEXTURE DOWNLOAD SERVICE]: Queueing first TextureNotFoundSender for {0}, client {1}", | 187 | "[USER TEXTURE DOWNLOAD SERVICE]: Queueing first TextureNotFoundSender for {0}, client {1}", |
191 | textureID, m_client.AgentId); | 188 | textureID, m_client.AgentId); |
192 | } | 189 | } |
193 | 190 | ||
194 | ITextureSender textureNotFoundSender = new TextureNotFoundSender(m_client, textureID); | 191 | ITextureSender textureNotFoundSender = new TextureNotFoundSender(m_client, textureID); |
195 | EnqueueTextureSender(textureNotFoundSender); | 192 | EnqueueTextureSender(textureNotFoundSender); |
196 | } | 193 | } |
197 | else | 194 | else |
198 | { | 195 | { |
@@ -200,13 +197,13 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
200 | { | 197 | { |
201 | textureSender.TextureReceived(texture); | 198 | textureSender.TextureReceived(texture); |
202 | EnqueueTextureSender(textureSender); | 199 | EnqueueTextureSender(textureSender); |
203 | 200 | ||
204 | foundTextureLimitStrategy.MonitorRequests(textureID); | 201 | foundTextureLimitStrategy.MonitorRequests(textureID); |
205 | } | 202 | } |
206 | } | 203 | } |
207 | 204 | ||
208 | //m_log.InfoFormat("[TEXTURE SENDER] Removing texture sender with uuid {0}", textureID); | 205 | //m_log.InfoFormat("[TEXTURE SENDER] Removing texture sender with uuid {0}", textureID); |
209 | m_textureSenders.Remove(textureID); | 206 | m_textureSenders.Remove(textureID); |
210 | //m_log.InfoFormat("[TEXTURE SENDER] Current texture senders in dictionary: {0}", m_textureSenders.Count); | 207 | //m_log.InfoFormat("[TEXTURE SENDER] Current texture senders in dictionary: {0}", m_textureSenders.Count); |
211 | } | 208 | } |
212 | else | 209 | else |
@@ -240,7 +237,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
240 | { | 237 | { |
241 | lock (m_textureSenders) | 238 | lock (m_textureSenders) |
242 | { | 239 | { |
243 | foreach( TextureSender.TextureSender textureSender in m_textureSenders.Values ) | 240 | foreach (TextureSender.TextureSender textureSender in m_textureSenders.Values) |
244 | { | 241 | { |
245 | textureSender.Cancel = true; | 242 | textureSender.Cancel = true; |
246 | } | 243 | } |