| 2576 | |
| 2577 | |
| 2578 | void CPartFile::StopFile(bool bCancel) |
| 2579 | { |
| 2580 | // Kry - Need to set it here to get into SetStatus(status) correctly |
| 2581 | m_stopped = true; |
| 2582 | // EC exports IsStopped() via EC_TAG_PARTFILE_STOPPED. Process() is |
| 2583 | // gated to PS_READY/PS_EMPTY (see DownloadQueue::Process), so a |
| 2584 | // stopped partfile no longer auto-marks each tick — the user action |
| 2585 | // must mark explicitly or amulegui/amuleweb never see the new state. |
| 2586 | MarkECChanged(); |
| 2587 | |
| 2588 | // Barry - Need to tell any connected clients to stop sending the file |
| 2589 | PauseFile(); |
| 2590 | |
| 2591 | m_LastSearchTimeKad = 0; |
| 2592 | m_TotalSearchesKad = 0; |
| 2593 | |
| 2594 | RemoveAllSources(true); |
| 2595 | kBpsDown = 0.0; |
| 2596 | transferingsrc = 0; |
| 2597 | |
| 2598 | if (!bCancel) { |
| 2599 | FlushBuffer(); |
| 2600 | } |
| 2601 | |
| 2602 | UpdateDisplayedInfo(true); |
| 2603 | } |
| 2604 | |
| 2605 | |
| 2606 | void CPartFile::StopPausedFile() |
no outgoing calls
no test coverage detected