Commit graph

759 commits

Author SHA1 Message Date
Ashod Nakashian
11e8a9bb4f loolwsd: test improvements
Change-Id: Ieeef1019063636cef171cc360f523810f6f989d2
Reviewed-on: https://gerrit.libreoffice.org/21759
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 21:12:43 +00:00
Ashod Nakashian
75ede04cd7 loolwsd: improved child forking
Change-Id: Ic05b412bb9c467659c24cba12f385ed9c0c67b84
Reviewed-on: https://gerrit.libreoffice.org/21758
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 21:11:54 +00:00
Ashod Nakashian
f9fd4c917a loolwsd: refactored HTTP Request Handler
Change-Id: I84685910afa04664639ae674fd66ff888962387e
Reviewed-on: https://gerrit.libreoffice.org/21757
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 21:10:53 +00:00
Ashod Nakashian
b85b4423b0 loolwsd: break the wait on save-as queue and better failure handling
Change-Id: Ifee252b3c189ee0b1287bda891b38c5abddb7440
Reviewed-on: https://gerrit.libreoffice.org/21755
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 21:09:28 +00:00
Ashod Nakashian
9593ec5720 loolwsd: improved polling and pong with client
Change-Id: I17c4f7685d23b6e4c84a7f8b34fcb7dbcaf959f9
Reviewed-on: https://gerrit.libreoffice.org/21754
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 21:02:16 +00:00
Ashod Nakashian
2bb2e2aec1 loolwsd: protect against empty messages
Change-Id: Ic60c1abf85268c9ad629bc1f981e53688fc6267a
Reviewed-on: https://gerrit.libreoffice.org/21753
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 21:01:03 +00:00
Ashod Nakashian
55f2105f00 loolwsd: logging improvements
Change-Id: I77844a2b549c1f497c2d44f054169bf11d9227d8
Reviewed-on: https://gerrit.libreoffice.org/21752
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 21:00:34 +00:00
Ashod Nakashian
ef2ec0b2e2 loolwsd: fixes to broker threading and communication
Broker cache clean up is now done only during searching
as there we loop over processes and request status
from each child.

Internal helpers simplified and termination is done
in a single removeChild helper.

Change-Id: I31f7df5429f0737d352842d5c0f6a02b91b8078f
Reviewed-on: https://gerrit.libreoffice.org/21751
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 20:59:40 +00:00
Ashod Nakashian
4dc9fa7eb7 loolwsd: prevent deadlock when purging sessions
Change-Id: I293e28674ed721741fa0afc57b37a636833d2e0e
Reviewed-on: https://gerrit.libreoffice.org/21750
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 20:58:09 +00:00
Jan Holesovsky
0c509e17c1 loolwsd: Fix /convert-to to handle filenames containing spaces. 2016-01-21 23:30:52 +01:00
Ashod Nakashian
41da8f144e loolwsd: unload command added
Change-Id: I30c42e24aa38c676e4bc6c7e6a2715d9e72430b9
Reviewed-on: https://gerrit.libreoffice.org/21686
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 16:07:54 +00:00
Ashod Nakashian
a882ed1aa1 loolwsd: thread safety fixes in broker
Change-Id: Ibfff184ad294c14d6583f7a8282edc4e2742ad52
Reviewed-on: https://gerrit.libreoffice.org/21685
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 16:07:02 +00:00
Ashod Nakashian
d3fc5ac37b loolwsd: sockets are shutdown on disconnect
Change-Id: I1c00be4648cff94013ceab87fcb607b9bb921535
Reviewed-on: https://gerrit.libreoffice.org/21684
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 16:06:37 +00:00
Ashod Nakashian
dd374d8aec loolwsd: disconnect command to gracefully shutdown a socket
Change-Id: I8beb4c14fc95bdb2a98c7e5da44408511bce5e28
Reviewed-on: https://gerrit.libreoffice.org/21683
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 16:05:55 +00:00
Ashod Nakashian
d310d3f3f5 loolwsd: proper ping handling by echoing
Change-Id: Ifc66ae1bc15d588d4613d87ab0fa19ec389b7615
Reviewed-on: https://gerrit.libreoffice.org/21682
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 16:04:26 +00:00
Ashod Nakashian
23ca0f0d77 loolwsd: detect child termination by signal as well as exit
Change-Id: Ic4dc89a7ad1470cc7afbd763b904b617b36e62aa
Reviewed-on: https://gerrit.libreoffice.org/21681
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 16:03:53 +00:00
Ashod Nakashian
291b0aac67 loolwsd: don't ignore the last few bytes of a closed socket
Change-Id: Id6332857e49ccbacfa6e63b87a1ed570e9598147
Reviewed-on: https://gerrit.libreoffice.org/21680
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 16:03:29 +00:00
Ashod Nakashian
d2bde985cc loolwsd: poll timeout of 500ms and handling priority events
Change-Id: Iadf449ee62700e1ac5da2be8c73c674657633808
Reviewed-on: https://gerrit.libreoffice.org/21679
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 16:02:04 +00:00
Ashod Nakashian
6b24eb7bba loolwsd: PIPE_BUFFER -> READ_BUFFER_SIZE = 2048
Change-Id: I12e9725549a15b2cb1c287db9de0fca732dafac2
Reviewed-on: https://gerrit.libreoffice.org/21678
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 15:59:47 +00:00
Ashod Nakashian
8ec0efe8bc loolwsd: const correctness
Change-Id: Icf1e7d625f9217abf3abe5d9123347aa61e0a74c
Reviewed-on: https://gerrit.libreoffice.org/21687
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 15:59:15 +00:00
Ashod Nakashian
bccfd79d35 loolwsd: reset http request handler's thread name as it's reused
Change-Id: I62332e1d3018a7ff3cebe3982910792fa75d0c8f
Reviewed-on: https://gerrit.libreoffice.org/21676
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 15:45:30 +00:00
Ashod Nakashian
49d7c0e17f loolwsd: improved lokit callback notification dispatcher
Change-Id: I88abad83a3d06eb530200d921ef25b68465b82b6
Reviewed-on: https://gerrit.libreoffice.org/21675
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 15:45:00 +00:00
Ashod Nakashian
11f7746640 loolwsd: avoid reentering Poco::Log and deadlocking while handling signal
Change-Id: I3ee16ac32a337a9e1ff798495d45fb1359f4f063
Reviewed-on: https://gerrit.libreoffice.org/21674
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 15:44:38 +00:00
Ashod Nakashian
54d5138537 loolwsd: proper destruction of LibreOfficeKit instance
Change-Id: If39b0d534eb93044383766a51f26faac398c834e
Reviewed-on: https://gerrit.libreoffice.org/21673
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 15:44:03 +00:00
Ashod Nakashian
ad7509d449 loolwsd: writeFIFO overload to take std::string
Change-Id: Ibfac97d1d4f101a10bd0f696b8b89a22170b1b11
Reviewed-on: https://gerrit.libreoffice.org/21672
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 15:43:11 +00:00
Ashod Nakashian
5270383baa loolwsd: removed extra period in warn and error logs
Change-Id: Ie7a42451009cfe9ffc7c3a0f91ff550b66e9158d
Reviewed-on: https://gerrit.libreoffice.org/21671
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 15:42:47 +00:00
Ashod Nakashian
8e8e7c70c2 loolwsd: cleanup and correction of child signal handling
Change-Id: I8739e71a2180c970ba4b8eb3b1d4721ecf4268e9
Reviewed-on: https://gerrit.libreoffice.org/21670
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 15:42:24 +00:00
Tomaž Vajngerl
21121e2f55 Support returning cached tiles for "tilecombine" 2016-01-20 23:04:41 +01:00
Pranav Kant
f429001ff9 loolwsd: Display version information on command line
Change-Id: Ie65c30574ca4cef619a224ec6df3501d6bda086a
Reviewed-on: https://gerrit.libreoffice.org/20847
Reviewed-by: jan iversen <jani@documentfoundation.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-01-19 16:36:00 +00:00
Miklos Vajna
c8ea8bcacd loolwsd: handle WS messages split into multiple frames 2016-01-18 16:54:22 +01:00
Miklos Vajna
a67d73ea57 loolwsd: HTML paste testcase
Fails without the previous commit.
2016-01-18 11:47:57 +01:00
Miklos Vajna
201c9fb590 loolwsd: handle 'nextmessage:' in master -> prisoner traffic
ToPrisoner already generated 'nextmessage:' when it was necessary, but
the other side did not handle that message type, since previously
(before multi-line paste) only the prisoner -> master direction needed
'nextmessage:' for tile data.
2016-01-18 11:47:57 +01:00
Miklos Vajna
3eeecacfb9 Document::_callbackQueue -> CallbackQueue
AFAICS this was the last member named not following the coding style.
2016-01-18 09:43:49 +01:00
Miklos Vajna
3cbdd9e3bd MasterProcessSession: capitalize static members 2016-01-18 09:43:49 +01:00
Miklos Vajna
93eccfad98 ChildProcessSession::_mutex -> Mutex
As it's a static member.
2016-01-18 09:43:49 +01:00
Miklos Vajna
9185012704 Log::StreamLogger: Stream -> _stream
As it's not a static member.
2016-01-18 09:43:49 +01:00
Miklos Vajna
1977f07d5c paste: handle data containing newlines
By changing the protocol, so that instead of "paste ... data=<data>",
the client is now expected to send "paste ...\n<data>".
2016-01-15 14:43:59 +01:00
Miklos Vajna
de7823744e loolwsd: fix naming style of LOOLWSD static members 2016-01-15 09:44:07 +01:00
Miklos Vajna
ec9cc2aecc loolwsd: adjust coding style to reality
E.g. it's DocumentURI::UriToDocumentURIMap, not
DocumentURI::_uriToDocumentURIMap.
2016-01-15 07:41:49 +01:00
Andras Timar
6b767bc5ee loolwsd: loolwsd-systemplate-setup: remove OS X support attempt 2016-01-14 18:15:15 +01:00
Andras Timar
3a53c864b4 loolwsd: loolwsd-systemplate-setup: add libpng* 2016-01-14 18:15:15 +01:00
Andras Timar
37f5132e9e loolwsd: loolwsd-systemplate-setup: remove redundancy 2016-01-14 18:15:15 +01:00
Ashod Nakashian
0632da5edb loolwsd: reworked child management and load balancing in broker
Change-Id: I92874d1aeb8fe46f3bbc1cb9d3b2b9d46632f4b9
Reviewed-on: https://gerrit.libreoffice.org/21473
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-14 13:56:40 +00:00
Ashod Nakashian
558dfd40e0 loolwsd: unloading of disconnected documents
Documents that do not have any client connections to
are unloaded.

Currently we do not check for saved state of the
document before unloading.

Change-Id: I0f4f2ec1a7ddb15262833fe3d4ab73af16a2a959
Reviewed-on: https://gerrit.libreoffice.org/21472
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-14 13:55:50 +00:00
Ashod Nakashian
5d07c46065 loolwsd: logging improvements
Error can supress printing errno and warning can
be asked to print it by setting a bool argument.

Formatting has been improved for readability.

Change-Id: I93d2808fbff4f6cacc583923905438ada7b8e90e
Reviewed-on: https://gerrit.libreoffice.org/21471
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-14 13:41:18 +00:00
Ashod Nakashian
bdd3f73bd5 loolwsd: misc child cleanup
Change-Id: I5ed100e053925264db2cb8f60de67cf6a536a65b
Reviewed-on: https://gerrit.libreoffice.org/21470
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-14 13:40:40 +00:00
Ashod Nakashian
3d803dd9b0 loolwsd: Document -> DocumentURI
Change-Id: I7e5989dbee368314a4db7c723439060f1064e844
Reviewed-on: https://gerrit.libreoffice.org/21469
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-14 13:39:43 +00:00
Ashod Nakashian
c2af36d0ef loolwsd: simplified Connection
Change-Id: Ia7ff0d4b636513ce1b08641bb6db85c97ee5c2f9
Reviewed-on: https://gerrit.libreoffice.org/21468
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-14 13:38:45 +00:00
Andras Timar
3ec262e01b loolwsd: add loolbroker, loolkit and loolmap to rpm 2016-01-14 13:45:33 +01:00
Andras Timar
7cf9cdd4c8 loolwsd: add QueueHandler.hpp to dist tarball 2016-01-14 13:43:54 +01:00