Fix webdav lock refresh returning 0 instead of true when successful
With commit 58b84caca8
, the NeonSession.LOCK
returns "theRetVal" from ne_lock_refresh when successful. But when there
is no error, theRetVal will be NE_OK, which is 0, so the method returns false
instead of true.
This results in lock refresh being stopped after the first refresh,
so WebDAV servers will unlock the file after the lock timeouts. Users will
see error messages regarding lock timeouts and lost updates are possible.
Fix this by adding a return statement when theRetVal == NE_OK.
Change-Id: Ie43131fca96e1cfbe932444906b742958a719b26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96023
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
parent
9a5f2961b0
commit
18c6cc0e7a
1 changed files with 2 additions and 2 deletions
|
@ -1636,6 +1636,8 @@ bool NeonSession::LOCK( NeonLock * pLock,
|
|||
= lastChanceToSendRefreshRequest( startCall, pLock->timeout );
|
||||
|
||||
SAL_INFO( "ucb.ucp.webdav", "LOCK (refresh) - Lock successfully refreshed." );
|
||||
pLock->timeout = timeout;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1652,8 +1654,6 @@ bool NeonSession::LOCK( NeonLock * pLock,
|
|||
}
|
||||
return false;
|
||||
}
|
||||
pLock->timeout = timeout;
|
||||
return theRetVal;
|
||||
}
|
||||
|
||||
void NeonSession::UNLOCK( const OUString & inPath,
|
||||
|
|
Loading…
Reference in a new issue