01138d7ae0
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> |
||
---|---|---|
.. | ||
Buffer.hpp | ||
clientnb.cpp | ||
DelaySocket.cpp | ||
DelaySocket.hpp | ||
FakeSocket.cpp | ||
FakeSocket.hpp | ||
HttpHelper.cpp | ||
HttpHelper.hpp | ||
ServerSocket.hpp | ||
Socket.cpp | ||
Socket.hpp | ||
Ssl.cpp | ||
Ssl.hpp | ||
SslSocket.hpp | ||
WebSocketHandler.hpp |