Crash in there while accessing an evidently deleted DAVResourceAccess
instance with about 4 other threads also in various webdav_ucp::Content
methods.
The problem is apparently that the "outer" getResourceType() passes the
m_xResAccess to the "inner" getResourceType(), which accesses it
without locking the mutex, while another thread resets m_xResAccess
and thereby deletes the current instance.
(regression from 0c3500115c4fd86284a027fc32be704afcf77061)
Change-Id: I1c67021c536e303d766c7ff93fb71e40f991f3af
...and not only if the caller happens to pass in non-null ppError. Otherwise,
calling soffice with a document URL handled by the gio UCP that is not yet
gio-mounted would silently do nothing and exit with EXIT_SUCCESS, as the first
thing the type detection code does on the URL is execute "getPropertyValues" for
"IsDocument", which calls getGFileInfo with null ppError, so a void instead of a
boolean value is returned, which then derails the type detection code to
silently fail (which is another problem that needs fixing).
Change-Id: I48a84428cdee5caead02909abc2efd3ae3722052
to make sure the week object is released correctly.
Found by: zhangjf
Patch by: zhangjf
(cherry picked from commit 1e51e5dab1664dadb40509c4fab593fb27040efd)
Conflicts:
ucb/source/ucp/tdoc/tdoc_stgelems.cxx
Change-Id: I33d0b3b7cda2aa9a220056bf7d641b09036f89e9
Follow up on 68ba2785c55eaa1ea70ce135bdad5322b0e04ed7, which missed the
sad fact that m_aMutex is locked recursively.
Avoid that by passing a ClearableMutexGuard to stopTicker() and
unlocking that. Also lock m_aMutex in the destructor while at it.
Change-Id: I5ef7ef8f15e2b5c9810c5ffc64ed922ab9ad2807
Tor reports that NeonLockStore::stopTicker() m_pTickerThread->join()
can deadlock with TickerThread running NeonLockStore::refreshLocks().
This can be avoided by copying m_pTickerThread to the stack, and
releasing the m_aMutex before calling join().
Change-Id: I387f83a530c5b893f79fa677b1092e0902c8af65
...instead of returning a null XHierarchicalNameAccess. Otherwise, UCB's
globalTransfer from a vnd.sun.star.package URL that denotes a file that is not a
zip file to a file URL folder (i.e., to extract the zip content) silently
succeeds but just creates an empty file in the target folder. That, in turn,
causes "unopkg add foo.oxt", where foo.oxt is a file that is not a zip file, to
silently succeed and add an "empty" extension.
This change is somewhat bold in that it changes createPackage from "can return
empty reference" to "never returns empty reference, but can throw
RuntimeException." Especially, it considers "empty name" as a (silent)
violation of its contract with its caller now. I hope this does not affect any
legitimate scenarios---at least, it does not break a "make check" here. (In
turn, the two package_ucp::Content::getPackage overloads change to never return
a null reference, either. And I changed the parameters of createPackage, seeing
that all call-sites pass in some PackageUri's getPackage()/getParam() pair.)
Change-Id: I0eab5f8059dfedefc7030da38da528ba21ea8d79
...originally introduced with 8da928423add3fdb94baee2a3f3fa053390f828e "Remove
RTL_CONSTASCII_(U)STRINGPARAM in ucb(ucp)," leading to "IsFolder" not being
properly set in the WebDAV UCP, leading to failure when saving documents.
Change-Id: Id2cc98582c9feffaa501a68069cd606fb420fd29
- nanosecond precision
- signed (allowed negative) year
Also: assorted improvements / bugfixes in date/time handling code.
Some factorisation of copy/pasted code.
Change-Id: I761a1b0b8731c82f19a0c37acbcf43d3c06d6cd6
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).
Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
...replacing hard-coded GCC version checks. Those checks that guard
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
appear relevant only for GCC itself, not Clang (which used to fail the old
guards because it typically announces itself with a rather low
__GNUC__/__GNUC_MINOR__ version), see 6e67c03dc0225fc66343546b14e902b9d238b1a3
"Enable -Wnon-virtual-dtor for GCC 4.6"
Change-Id: I6bfa4d5caa6192e7a203ce829682bf6bb8d61a1b