gnucash maint: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Mon Sep 6 18:23:31 EDT 2021
Updated via https://github.com/Gnucash/gnucash/commit/901fea15 (commit)
via https://github.com/Gnucash/gnucash/commit/38cd06e5 (commit)
via https://github.com/Gnucash/gnucash/commit/06652082 (commit)
via https://github.com/Gnucash/gnucash/commit/e4619fda (commit)
from https://github.com/Gnucash/gnucash/commit/079a9003 (commit)
commit 901fea158f29f088e2cd9d01041b842b80af1b6f
Merge: 079a90030 38cd06e54
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Sep 6 15:22:49 2021 -0700
Merge Simon Arlott's 'xml-locking-fixes' into maint.
commit 38cd06e54a016f6d039ff97ecffaf4c0f8eb7191
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Sep 6 15:18:34 2021 -0700
Remove the lock-file-link-count test from the XML backend.
This was an effort of somewhat dubious value to detect if a process
on another ocmputer had a hsrd-link to a lockfile on an NFS share.
NFS is rarely used now and SMB doesn't support hard links so this check
adds complexity with no real value.
commit 066520829970fd14c45f953884e6aeeb7d4e1202
Author: Simon Arlott <sa.me.uk>
Date: Tue Aug 24 09:01:16 2021 +0100
xml-backend: Lock file is deleted even if the lock is not acquired
The lock file is set in m_lockfile and then unlinked in session_end even if
the lock was not acquired.
Clear m_lockfile if locking was not successful.
commit e4619fdae6eeb481faf2385a94a7ba8e21183a0d
Author: Simon Arlott <sa.me.uk>
Date: Tue Aug 24 08:54:06 2021 +0100
xml-backend: Don't try to close m_lockfd if it's not open
m_lockfd is not initialised. If the file is locked then it will not be set
before session_end and close() will be called on an uninitialised int.
Initialise it to -1 in the class definition.
Consistently use -1 instead of "< 0" or "< 1" as the definition of invalid.
Always set it to -1 after closing it.
Summary of changes:
libgnucash/backend/xml/gnc-xml-backend.cpp | 86 +++---------------------------
libgnucash/backend/xml/gnc-xml-backend.hpp | 2 +-
2 files changed, 8 insertions(+), 80 deletions(-)
More information about the gnucash-patches
mailing list