libreoffice-online/kit
Ashod Nakashian 01138d7ae0 wsd: save errno before invoking any other functions
Most C and Posix API clobber errno. By failing to save
it immediately after invoking an API we risk simply
reporting the result of an arbitrary subsequent API call.

This adds LOG_SYS_ERRNO to take errno explicitly.
This is necessary because sometimes logging is not done
immediately after calling the function for which we
want to report errno. Similarly, log macros that log
errno need to save errno before calling any functions.
This is necessary as the argements might contain calls
that clobber errno.

This also converts some LOG_SYS entries to LOG_ERR
because there can be no relevant errno in that context
(f.e. in a catch clause).

A couple of LOG_ macros have been folded into others,
reducing redundancy.

Finally, both of these log macros append errno to the
log message, so there is little point in ending the
messages with a period.

Change-Id: Iecc656f67115fec78b65cad4e7c17a17623ecf43
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-12-29 11:40:17 +00:00
..
ChildSession.cpp wsd: avoid single-character strings 2020-12-09 17:19:58 +01:00
ChildSession.hpp wsd: encapsulate watermark details 2020-11-11 08:14:42 +01:00
Delta.hpp fix license headers 2020-10-01 11:56:43 +02:00
DummyLibreOfficeKit.cpp fix license headers 2020-10-01 11:56:43 +02:00
DummyLibreOfficeKit.hpp fix license headers 2020-10-01 11:56:43 +02:00
ForKit.cpp wsd: save errno before invoking any other functions 2020-12-29 11:40:17 +00:00
Kit.cpp wsd: save errno before invoking any other functions 2020-12-29 11:40:17 +00:00
Kit.hpp wsd: avoid the using keyword and use C++ size_t 2020-11-15 15:41:41 -05:00
KitHelper.hpp fix license headers 2020-10-01 11:56:43 +02:00
SetupKitEnvironment.hpp fix license headers 2020-10-01 11:56:43 +02:00
TestStubs.cpp fix license headers 2020-10-01 11:56:43 +02:00
Watermark.hpp Save Watermark bitmaps per user for re-use 2020-12-28 14:51:02 +03:00