Commit graph

2159 commits

Author SHA1 Message Date
Tor Lillqvist
fb0f31d2e8 Print a backtrace on fatal signals 2016-04-08 15:22:22 +03:00
Tor Lillqvist
407f688cb6 Include config.h to get ENABLE_SSL 2016-04-08 14:49:33 +03:00
Tor Lillqvist
cc4791ec49 It is customary to define ENABLE_FOO as 1 2016-04-08 14:35:17 +03:00
Tor Lillqvist
3b5f126b89 Typo 2016-04-08 14:30:48 +03:00
Tor Lillqvist
cc166639ef For more safety (?), catch Poco::Exception in general, not just IOException
Also, display more information about the exception.

Actually I think I should factor out the code to display as much
information as possible from an exception. Currently the amount of
information displayed varies from case to case in the code-base.
2016-04-08 14:28:52 +03:00
Andras Timar
3f0d5a7521 loleaflet: allow HTTP-only mode for testing/trial 2016-04-08 13:16:49 +02:00
Andras Timar
f75a27e3db loolwsd: --disable-ssl option 2016-04-08 13:16:49 +02:00
Tor Lillqvist
c08d35dd15 Add comment 2016-04-08 13:12:21 +03:00
Tor Lillqvist
48bc23f3ce Drop unnecessary variable 2016-04-08 13:09:06 +03:00
Tor Lillqvist
ca4d8ea451 ChildCounter is never incremented or decremented 2016-04-08 13:07:33 +03:00
Tor Lillqvist
481afd0306 Exit bluntly in all cases from a loolkit process 2016-04-08 11:48:02 +03:00
Tor Lillqvist
84650ea2df Use std:: prefix for cstdlib functions 2016-04-08 11:46:42 +03:00
Tor Lillqvist
e026a7073b We don't need _exit here
This is called in the parent loolforkit process. It's in the loolkit
processes that we want to do the blunt exits, I assume.
2016-04-08 11:43:33 +03:00
Tor Lillqvist
756363e4dc Consistency 2016-04-08 11:42:14 +03:00
Tor Lillqvist
f6d9b2c099 Consistency is a virtue
(But sure, tons of much more annoying inconsistencies in style
remain.)
2016-04-08 11:09:46 +03:00
Tor Lillqvist
ecff38df83 These can be static 2016-04-08 11:00:58 +03:00
Miklos Vajna
c034165a90 Util: avoid leaking the channel
Poco::Channel is reference counted, but the initial refcount is 1, so we
need to release channel in order to have it deleted when Poco::Logger
releases it.

Calls to Poco::Logger::shutdown() are still missing though (from
forkit/kit/wsd).

Change-Id: I12ab32047d32e55902c60639d71eb6ef30ffa3bd
2016-04-08 09:15:37 +02:00
Tor Lillqvist
1fcdb8beaa expectContinue is gone in bleeding-edge Poco
Put this inside #if, add the 'override' back for current Poco. Avoids
"warning: 'expectContinue' overrides a member function but is not
marked 'override'" when compiling against current Poco.

Not sure what good it would do to define it at all if compiling
against a bleeding-edge Poco as it won't call it anyway?
2016-04-08 09:29:47 +03:00
Ashod Nakashian
703febc2e2 loolwsd: compatibility fixes with Poco master
Change-Id: Ide03cc4cce528fa15a9f6b6ba546477e557142fe
Reviewed-on: https://gerrit.libreoffice.org/23908
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-08 02:38:56 +00:00
Henry Castro
b6aeee816c loleaflet: restore default example title 2016-04-07 17:35:00 -04:00
Michael Meeks
7d62c74b83 Fix segv on failure to create a storage, and add unit test infra. 2016-04-07 22:21:14 +01:00
Michael Meeks
86ebefce50 Get subdirs build order right for tests. 2016-04-07 22:21:14 +01:00
Henry Castro
dd96c6a4de loolwsd: handle a POST request in loleaflet 2016-04-07 17:20:45 -04:00
Michael Meeks
8d7a265479 Print preload time. 2016-04-07 20:15:18 +01:00
Michael Meeks
cd47b5e044 Signal safe signal handlers. 2016-04-07 19:39:11 +01:00
Michael Meeks
a454a3c407 Improve test API, and handle failure better. 2016-04-07 19:39:11 +01:00
Michael Meeks
024fd2ee8d Scripting to create and populate jails automatically.
'make check' now builds a system image, and runs tests inside it.
2016-04-07 19:38:33 +01:00
Michael Meeks
ad13dca8f8 First cut at adding integration and unit test hooks into loolwsd.
Add new configure parameter --with-lo-path= which can be used to
auto-populate a system template as required.
2016-04-07 19:38:33 +01:00
Michael Meeks
b6ab8982e6 Guard logger so it can be used during static destructors safely. 2016-04-07 19:38:33 +01:00
Michael Meeks
72a0926b4a Hush - update gitignores. 2016-04-07 19:38:33 +01:00
Tor Lillqvist
c71d12ae63 Process name and id are already part of each logging output line 2016-04-07 20:22:57 +03:00
Tor Lillqvist
557ca90be1 Remove unused IoUtil::readMessage() 2016-04-07 20:18:22 +03:00
Tor Lillqvist
16034f6685 Bin unused INTERVAL_PROBES 2016-04-07 20:09:35 +03:00
Tor Lillqvist
4ed3393f16 Nothing ever passed for the pollTimeoutMs parameter so use the default value in-line 2016-04-07 20:07:56 +03:00
Tor Lillqvist
584a805781 The SocketProcessor() 'name' parameter can now be dropped 2016-04-07 20:07:50 +03:00
Tor Lillqvist
5ea6c4bacf No need to show the SocketProcessor 'name' in the log
The thread name already identifies it sufficiently as can be seen:

kit-05108-00 00:00:01.662974 [loolkit        ] [ChildControllerWS] Starting Socket Processor.
wsd-05087-03 00:00:08.126842 [client_ws_0002 ] [Client_ws_0002] Starting Socket Processor.
wsd-05087-05 00:00:08.153688 [prison_ws_0002 ] [Child_ws_0002] Starting Socket Processor.
2016-04-07 19:52:53 +03:00
Tor Lillqvist
d36c8bbbba Avoid some use-once variables
Also, use different names for the HTTPRequestHandler threads in
ClientRequestHandlerFactory and PrisonerRequestHandlerFactory.
2016-04-07 19:31:56 +03:00
Tor Lillqvist
9acc0b052e Bin one more redundant thread name in debug log 2016-04-07 19:26:01 +03:00
Ashod Nakashian
d014589692 loolwsd: added default LO install path in the config
Change-Id: Ic42acd1a6050104d08a5bcf2ebb90b9b8aabbbfa
Reviewed-on: https://gerrit.libreoffice.org/23899
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-07 14:02:39 +00:00
Tor Lillqvist
711674f7ce Use Log::debug() here, too, for consistency 2016-04-07 15:56:23 +03:00
Tor Lillqvist
4fdd6d684f Reduce redundant information in logging
The logging functions already display the thread name on all output
lines. No need to mention it another time in the thread start and
finish logging messages.
2016-04-07 15:53:53 +03:00
Tor Lillqvist
175bd4c9e2 Use the actual current process names here, too 2016-04-07 11:53:44 +03:00
Tor Lillqvist
931550b435 Quite essential to change loolbroker to loolforkit here, too 2016-04-07 11:53:44 +03:00
Tor Lillqvist
84cd6bbceb Try to be more consistent in terminology
The "Broker" process is called "ForKit" now. The only things called
"broker" now are the DocumentBroker objects in the WSD process.
2016-04-07 11:53:44 +03:00
Tor Lillqvist
d28354c6a6 Bin unused variables 2016-04-07 11:53:44 +03:00
Tor Lillqvist
c520aa4f05 These are not warnings 2016-04-07 11:53:44 +03:00
Tor Lillqvist
acc59a2ea5 Make error messages more consistent and use Log::syserror() in more places
A call to Log::error() should be enough to indicate that it is an
error. We don't need to prefix the message with the string "Error: "
in some cases but not others. (If we do want such a prefix for all
errors, surely then we should add it in the actual Log::error()
function.)

Also, change some more Log::error() calls to Log::syserror() where
appropriate.
2016-04-07 11:53:44 +03:00
Tor Lillqvist
5637064e9a Factor out the prctl() calls
Silly to keep copy-pasting the same couple of lines over and over
again.
2016-04-07 11:53:33 +03:00
Tor Lillqvist
ec604599f1 Introduce separate Log::syserror() function for logging actual syscall errors
Much better than assuming that errno would be relevant at all
Log::error() calls (or alternatively, having to remember to append a
false parameter to the Log::error() call, which had not been done a
single time anyway.)

Call log::syserror() right after a system call has returned an
error. Don't call it otherwise.
2016-04-07 10:36:38 +03:00
Tor Lillqvist
94caec287f We never call Log::warn() with an append_errno parameter
So just drop it. Default parameters are ugly IMHO.
2016-04-07 10:15:51 +03:00