MCPcopy Create free account
hub / github.com/amule-project/amule / StopFile

Method StopFile

src/PartFile.cpp:2578–2603  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2576
2577
2578void 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
2606void CPartFile::StopPausedFile()

Callers 5

OnFinishedAllocationMethod · 0.80
AddDownloadMethod · 0.80
SetCatStatusMethod · 0.80
PartFile_StopFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected