Commit graph

816 commits

Author SHA1 Message Date
Henry Castro
cdcb32f013 loolwsd: loolbroker drop capabilities 2016-02-14 14:54:04 -04:00
Henry Castro
f5c163e6da loolwsd: avoid deadlock with mutex and join 2016-02-14 14:39:02 -04:00
Henry Castro
42abb3b1a7 loolwsd: websocket shutdown receive 2016-02-14 14:32:55 -04:00
Henry Castro
72db8ed63a loolwsd: replace the random jail id for lokit process id 2016-02-13 19:01:03 -04:00
Henry Castro
75b552bf71 loolwsd: create named pipes workspace 2016-02-13 13:22:15 -04:00
Henry Castro
9e3d5c0337 loolwsd: ensure chroot jail every lokit process 2016-02-13 10:15:28 -04:00
Tor Lillqvist
8a571401c0 Use less misleadit variable name 2016-02-12 14:09:29 +02:00
Tor Lillqvist
9a15bc6c2c Zero is a valid return value from open()
Sure, it is highly likely that fd 0 is already in other use, but let's
be correct.
2016-02-12 14:01:10 +02:00
Tor Lillqvist
d19433c3b8 Bin unused macros 2016-02-12 13:31:32 +02:00
Tor Lillqvist
ce3dc628be Fix misleading comment 2016-02-12 13:26:19 +02:00
Tor Lillqvist
39bfd5a210 Look for self-copmpiled Poco also in /opt/poco
That's where I have it...

Also, make sure such self-built Poco libraries themselves get copied
into the systemplate.
2016-02-12 13:23:41 +02:00
Andras Timar
97dcfdc7e8 loolwsd: bump version after tarball 2016-02-11 22:33:44 +01:00
Andras Timar
76b72c8008 loolwsd: bump version before tarball 2016-02-11 21:55:36 +01:00
Pranav Kant
6a7a014d14 loolwsd: Remove cached 'status' command output on 'setclientpart'
Otherwise we have a problem when cached information is different than
the actual one maintained by LOKitDocument, keeping the whole
server setup in an inconsistent state.

For example, when client reloads the browser session quickly
after setting the current part (to say 3) of an opened part document.
If the reload occurs soon enough before the 'setclientpart'
message originated from the client is acknowledged by the server,
then the next reload would get the cached 'status' entry asking
the client to set 'currentpart' to something else leading to the
generation of another 'setclientpart' message. This thing would
go on, and we would run into a loop, as I have for the last few
hours.

Change-Id: Ia6260dfb772f2e3f023572aa060fd7da92b196c8
Reviewed-on: https://gerrit.libreoffice.org/22272
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-11 05:04:22 +00:00
Jan Holesovsky
93b65fc92f loolwsd: For the legacy loleaflet, default to the left button pressed. 2016-02-09 09:22:11 +01:00
Jan Holesovsky
7c96094c42 loolwsd: Make the mouse command in loolwsd compatible with older loleaflet. 2016-02-08 16:42:49 +01:00
Pranav Kant
5a31f99178 loolwsd: Thread name should not be static
... as we can have multiple connections for same document.

Change-Id: Ic213299d6a4ba703f1e27cf252f3a10209f08148
Reviewed-on: https://gerrit.libreoffice.org/22204
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
2016-02-08 14:38:02 +00:00
Henry Castro
5848cff634 loolwsd: wait for loolbroker process to change state 2016-02-03 19:51:27 -04:00
Henry Castro
8469343da1 loolwsd: avoid fork a new child when its exit code is not success 2016-02-03 18:34:27 -04:00
Henry Castro
70ff592624 loolwsd: use strsignal 2016-02-03 18:08:16 -04:00
Henry Castro
661ae62259 loolwsd: exit when error no child process 2016-02-03 17:43:04 -04:00
Henry Castro
b7ee46f729 loolwsd: child exit codes are required before fork new lokit process 2016-02-03 17:35:35 -04:00
Henry Castro
1fc3d06e37 loolwsd: fix iterator erase 2016-02-03 17:15:20 -04:00
Henry Castro
3cda799328 loolwsd: avoid the loolbroker block forever before lokit launch 2016-02-03 17:07:36 -04:00
Henry Castro
58fa747bb4 loolwsd: avoid a broken lokit process block the loolbroker forever 2016-02-03 16:59:09 -04:00
Jan Holesovsky
32ecdb8ab6 loolwsd, loleaflet: Handle the ERROR callback.
This introduces a new error id 5 - "document save failed".
2016-02-03 11:24:21 +01:00
Henry Castro
647d7c7783 loolwsd: first, establish pipe connection 2016-02-02 20:09:26 -04:00
Miklos Vajna
aa450a0c38 loolwsd: add clientvisiblearea client -> server command 2016-02-02 11:49:22 +01:00
Miklos Vajna
816663f1e8 loolwsd: update bundled headers 2016-02-02 11:24:54 +01:00
Henry Castro
1b6425913d loolwsd: add LO core exit codes 2016-02-01 22:23:58 -04:00
Henry Castro
5fd2be332a loolwsd: use EXIT_SOFTWARE to indicate internal error 2016-02-01 21:53:16 -04:00
Ashod Nakashian
f3b319ee7f loolwsd: each HTTPServer has its params and skip failed child query
Change-Id: I41c730a935fd0d2e1e3181cced529d414c3aebb0
Reviewed-on: https://gerrit.libreoffice.org/22014
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-02 01:51:04 +00:00
Henry Castro
b477f41636 loolwsd: add fatal signals handler 2016-02-01 21:26:19 -04:00
Pranav Kant
7ffd4b45db bccu#1468: handle 'nextmessage:' in prisoner -> master text frames
There are cases when prisoner would send huge text data but
without preceeding 'nextmessage' frames making the master throw
WebSocketException.

Also move the 'nextmessage' frame interpretation logic up in the
'else if' ladder to be able to detect and handle such huge text frames.

Change-Id: Ibe44b69f4ab75c1b8096648c6006316c88366e7c
Reviewed-on: https://gerrit.libreoffice.org/21835
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-01 05:09:35 +00:00
Ashod Nakashian
6f5afd92ba loolwsd: fixed server thread-pool
TCPServer doesn't use the custom ThreadPool passed to it
to dispatch connections. This leads to starvation
when too many connections are initiated together.

Because we open an internal socket back to master, we
need to be able to dispatch two connections (two threads)
for each client connection.

Therefore, the default ThreadPool needs to have sufficient
capacity to grow. A new constant is added to define this
capacity and it is used to configure both the TCPServer
(which configures the default ThreadPool) and the customer
ThreadPool (used to host the actuall connection handler).

Change-Id: I49adc039aa99e9350b0defc4a5e141b77524992e
Reviewed-on: https://gerrit.libreoffice.org/21976
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-01 05:06:35 +00:00
Ashod Nakashian
57240993b6 loolwsd: removed url cache in favor of unified child cache
Change-Id: I44d07ea3e03a78a6038322c8110f66dd9c161957
Reviewed-on: https://gerrit.libreoffice.org/21975
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-01 05:04:38 +00:00
Ashod Nakashian
b596c80e34 loolwsd: simplified child searching
Change-Id: I0d817876f5b83acff69e51c2c64cd6acfa8dc27d
Reviewed-on: https://gerrit.libreoffice.org/21974
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-01 05:02:35 +00:00
Ashod Nakashian
450bf8eebe loolwsd: correct pre-spawn childs
Change-Id: Id306176296dde6f63821041eae1b28d23637f18d
Reviewed-on: https://gerrit.libreoffice.org/21934
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-30 15:43:38 +00:00
Ashod Nakashian
a956c61b07 loolwsd: logging
Change-Id: Ie81dc0b890fd59d0073b812117762bb0aff0f579
Reviewed-on: https://gerrit.libreoffice.org/21933
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-30 15:43:07 +00:00
Ashod Nakashian
a2357fbb8b loolwsd: replacing URL cache
Change-Id: I98d754fabdb0f136e31af3852c1cdf1af4ead503
Reviewed-on: https://gerrit.libreoffice.org/21932
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-30 15:42:46 +00:00
Ashod Nakashian
4861bb75f2 loolwsd: child process termination and cleanup
Change-Id: Ib43202dbde92c0223096bad1b9b4d491484b88e0
Reviewed-on: https://gerrit.libreoffice.org/21931
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-30 15:41:35 +00:00
Ashod Nakashian
49ae5b5943 loolwsd: encapsulate child processes in a single object
Change-Id: I2f382c4c2c224d42359e11929423866e41f88526
Reviewed-on: https://gerrit.libreoffice.org/21930
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-30 15:40:50 +00:00
Miklos Vajna
230c9cb4e3 loolwsd: update bundled headers 2016-01-29 14:36:14 +01:00
Miklos Vajna
4b3c5ea8ff loolwsd: doxygenize class comments 2016-01-28 19:16:32 +01:00
Miklos Vajna
1312211f71 loolwsd: -Werror,-Wswitch 2016-01-28 18:17:13 +01:00
Henry Castro
aad79ea3c5 loolwsd: ensure response PID child 2016-01-26 23:28:42 -04:00
Henry Castro
faf2a57d19 loolwsd: eof broker pipe 2016-01-26 21:22:07 -04:00
Henry Castro
35fbb27cfd loolwsd: remove unused private methods 2016-01-25 22:43:03 -04:00
Henry Castro
be33224133 loolwsd: remove unnecessary map ChildProcesses 2016-01-25 21:17:05 -04:00
Henry Castro
2baae1b324 loolwsd: simplify one loolbroker 2016-01-25 21:07:10 -04:00