wsd: save -> upload

Probably the last remaining incorrectly labelled
helper that checks for in-progress uploads, but
had retained the old and misleading label of 'save'.

Change-Id: I693275b1559f3dae4e9e3ab2408d997f56ff86e3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This commit is contained in:
Ashod Nakashian 2022-01-31 22:20:31 -05:00 committed by Ashod Nakashian
parent 4b8d08bdd6
commit 7757989795
3 changed files with 7 additions and 7 deletions

View file

@ -2375,7 +2375,7 @@ private:
{
std::unique_lock<std::mutex> lock = docBroker->getLock();
docBroker->assertCorrectThread();
if (docBroker->isAsyncSaveInProgress())
if (docBroker->isAsyncUploading())
LOG_DBG("Don't stop DocumentBroker on disconnect: async saving in progress.");
else
docBroker->stop("docdisconnected");

View file

@ -434,7 +434,7 @@ void DocumentBroker::pollThread()
// Nothing to do; no sessions, not loaded, marked to destroy.
stop("dead");
}
else if (_saveManager.isSaving() || isAsyncSaveInProgress())
else if (_saveManager.isSaving() || isAsyncUploading())
{
LOG_DBG("Don't terminate dead DocumentBroker: async saving in progress for docKey [" << getDocKey() << "].");
continue;
@ -1830,7 +1830,7 @@ void DocumentBroker::autoSaveAndStop(const std::string& reason)
{
LOG_TRC("autoSaveAndStop for docKey [" << getDocKey() << ']');
if (_saveManager.isSaving() || isAsyncSaveInProgress())
if (_saveManager.isSaving() || isAsyncUploading())
{
LOG_TRC("Async saving/uploading in progress for docKey [" << getDocKey() << ']');
return;
@ -1876,7 +1876,7 @@ void DocumentBroker::autoSaveAndStop(const std::string& reason)
constexpr bool success = true;
std::string result;
checkAndUploadToStorage(sessionId, success, result);
if (isAsyncSaveInProgress())
if (isAsyncUploading())
{
LOG_DBG("Uploading document before stopping.");
return;
@ -2109,7 +2109,7 @@ std::size_t DocumentBroker::removeSession(const std::string& id)
// Last view going away; can destroy?
if (isLastSession)
{
if (_saveManager.isSaving() || isAsyncSaveInProgress())
if (_saveManager.isSaving() || isAsyncUploading())
{
// Don't destroy just yet, wait until save and upload are done.
// Notice that the save and/or upload could have been triggered
@ -3406,7 +3406,7 @@ void DocumentBroker::dumpState(std::ostream& os)
#endif
}
bool DocumentBroker::isAsyncSaveInProgress() const
bool DocumentBroker::isAsyncUploading() const
{
if (!_storage)
return false;

View file

@ -328,7 +328,7 @@ public:
/// Saves the document and stops if there was nothing to autosave.
void autoSaveAndStop(const std::string& reason);
bool isAsyncSaveInProgress() const;
bool isAsyncUploading() const;
Poco::URI getPublicUri() const { return _uriPublic; }
const std::string& getJailId() const { return _jailId; }