| 1204 | |
| 1205 | |
| 1206 | void CUpDownClient::ClearDownloadBlockRequests() |
| 1207 | { |
| 1208 | { |
| 1209 | std::list<Requested_Block_Struct*>::iterator it = m_DownloadBlocks_list.begin(); |
| 1210 | for (; it != m_DownloadBlocks_list.end(); ++it) { |
| 1211 | Requested_Block_Struct* cur_block = *it; |
| 1212 | |
| 1213 | if (m_reqfile){ |
| 1214 | m_reqfile->RemoveBlockFromList(cur_block->StartOffset, cur_block->EndOffset); |
| 1215 | } |
| 1216 | |
| 1217 | delete cur_block; |
| 1218 | } |
| 1219 | |
| 1220 | m_DownloadBlocks_list.clear(); |
| 1221 | } |
| 1222 | |
| 1223 | { |
| 1224 | std::list<Pending_Block_Struct*>::iterator it = m_PendingBlocks_list.begin(); |
| 1225 | for (; it != m_PendingBlocks_list.end(); ++it) { |
| 1226 | Pending_Block_Struct* pending = *it; |
| 1227 | |
| 1228 | if (m_reqfile) { |
| 1229 | m_reqfile->RemoveBlockFromList(pending->block->StartOffset, pending->block->EndOffset); |
| 1230 | } |
| 1231 | |
| 1232 | delete pending->block; |
| 1233 | // Not always allocated |
| 1234 | if (pending->zStream){ |
| 1235 | inflateEnd(pending->zStream); |
| 1236 | delete pending->zStream; |
| 1237 | } |
| 1238 | |
| 1239 | delete pending; |
| 1240 | } |
| 1241 | |
| 1242 | m_PendingBlocks_list.clear(); |
| 1243 | } |
| 1244 | } |
| 1245 | |
| 1246 | |
| 1247 | bool CUpDownClient::Disconnected(const wxString& DEBUG_ONLY(strReason), bool bFromSocket) |
no test coverage detected