Commit graph

2171 commits

Author SHA1 Message Date
Pranav Kant
9444bb2b87 loolwsd: update documentation about editlock
Change-Id: Id819a2e2d0739a773c5a01ec7bc80152c03bf8f0
2016-04-09 01:52:17 +05:30
Pranav Kant
9469021f74 consistency, server -> client messages ends with a colon
Change-Id: Ia2154603bf0b9432beeaae970f68daa1ea7f7ebd
2016-04-09 01:46:03 +05:30
Jan Holesovsky
b76140cb7b loleaflet: Trigger locontextmenu event with the context menu structure. 2016-04-08 19:15:08 +02:00
Jan Holesovsky
156d52b82e loolwsd: Add handling of contextmenu: command. 2016-04-08 19:15:08 +02:00
Jan Holesovsky
756cb64203 Update LOK headers to the latest ones. 2016-04-08 19:15:08 +02:00
Michael Meeks
3e618a97e3 Tests: add timeout, and test for timeout. 2016-04-08 17:36:08 +01:00
Tor Lillqvist
d0309d9a83 No reason to use unsigned instead of bool 2016-04-08 17:17:13 +03:00
Tor Lillqvist
40914ca336 Initialise the Connection::_joined in the constructor
This seems to get rid of the "terminate called after throwing an
instance of 'Poco::SystemException'" problem for me at least.

Sigh. Why can't the compiler warn about such things? I build with
clang++ -Wall -Wextra. The Connection class is fully defined inside
the LOOLKit.cpp so it should be able to, right?
2016-04-08 17:16:28 +03:00
Tor Lillqvist
7d82e059a2 Make Util::signalName() return a const char *instead
Makes its use in handleTerminationSignal() and handleFatalSignal()
less complicated.
2016-04-08 16:06:39 +03:00
Tor Lillqvist
913723e581 Include the "SIG" prefix in Util::signalName() 2016-04-08 15:32:30 +03:00
Tor Lillqvist
4129b7b84e Don't use strsignal(), use Util::signalName()
Presumably it is only developers that are interested in signals, and
terms like SEGV or ABRT are more precise than their textual
descriptions like "Segmentation violation" or "Aborted".
2016-04-08 15:31:47 +03:00
Tor Lillqvist
f7612b989a Give a potential handleFatalSignal() time do its job
Sleep a second before exiting in case we get a fatal signal just when
about to finish, which sadly seems to happen often. (In fact, if
handleFatalSignal() is running at the same time, it will kill the
process so we never get to the _Exit() call.)
2016-04-08 15:22:52 +03:00
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