Pranav Kant
ba96b95954
loolwsd: Setup client SSL
...
We act as a client when we communicate with owncloud server.
For time being, just accept whatever certificates owncloud server
gives us. We might want to get more strict here in future.
Change-Id: I4813d19412b66ecf57d6cdef9c3ac94fbbaa521f
2016-03-30 21:41:00 +05:30
Pranav Kant
27a42affd0
loolwsd: This is a server, not client
...
Change-Id: I8db0a73048998566b4b60a7f39fe57617b9dca8d
2016-03-30 21:41:00 +05:30
Miklos Vajna
f30e22d0a3
loolwsd: fix -Werror,-Wshadow
2016-03-30 09:39:48 +02:00
Ashod Nakashian
494b90e541
loolwsd: new unittests
...
Change-Id: I935dbc79df638a7481f851b3e7b42703b97b93ec
Reviewed-on: https://gerrit.libreoffice.org/23648
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-30 02:06:32 +00:00
Ashod Nakashian
cbabd6177d
loolwsd: improved child spawning and management
...
Spare child processes are now in a separate
container. A FIFO that gives older instances
priority to avoid using instances too young
to have initialized fully.
In addition, spare instances are now
proactively spawned such that there
is at least a minimum number of
spares at any given time.
Change-Id: Ibdb206d88473adb306c274f4af39798c784258a0
Reviewed-on: https://gerrit.libreoffice.org/23647
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-30 02:05:57 +00:00
Ashod Nakashian
2ba9bddf9a
loolwsd: logging improvements
...
Change-Id: Ie656aa9d9f19762a960f6608cdadccf3c7eee665
Reviewed-on: https://gerrit.libreoffice.org/23646
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-30 02:03:25 +00:00
Ashod Nakashian
fe69c4d5b6
loolwsd: pipe plumbing cleanup
...
Change-Id: I5519235a4601e1e38cedc3f06ffe9386434a292d
Reviewed-on: https://gerrit.libreoffice.org/23645
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-30 02:02:53 +00:00
Ashod Nakashian
ecce874315
loolwsd: new PipeReader class to poll and tokenize pipe messages
...
Change-Id: I5676b313ca4c7e711ead04c1491fe36591a00531
Reviewed-on: https://gerrit.libreoffice.org/23644
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-30 01:59:31 +00:00
Ashod Nakashian
c966a804f8
loolwsd: throw when we fail to connect to lokit
...
Change-Id: I52f5c923cfc8fa4c28309066d8457418154e6b20
Reviewed-on: https://gerrit.libreoffice.org/23643
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-30 01:57:21 +00:00
Ashod Nakashian
9150d560c0
loolwsd: thread -> session
...
Change-Id: I7d9f84a2c9afea5f541f5815929745d2de93c8fa
Reviewed-on: https://gerrit.libreoffice.org/23642
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-30 01:56:45 +00:00
Ashod Nakashian
59db6cbc09
loolwsd: recursive_mutex -> mutex in LOOLBroker
...
Change-Id: I72be54cc67b965bbd13a6630d1243d8d59ba0fc4
Reviewed-on: https://gerrit.libreoffice.org/23641
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-30 01:55:55 +00:00
Ashod Nakashian
4b38df7455
loolwsd: lokit command handling improvements
...
Change-Id: I81baddb30805ee1bce5399171a40e73a18af68bf
Reviewed-on: https://gerrit.libreoffice.org/23640
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-30 01:52:55 +00:00
Ashod Nakashian
4305d333b2
loolwsd: lokit process can only host one url in its lifetime
...
Change-Id: I561e5b81a748b7ec567af9aff968ba5c66ad44bf
Reviewed-on: https://gerrit.libreoffice.org/23639
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-30 01:49:36 +00:00
Ashod Nakashian
3d2c2fde3b
loolwsd: logging and misc cleanup
...
Change-Id: If3cea8191fe15fc752c436cd33d2a68dc2d88598
Reviewed-on: https://gerrit.libreoffice.org/23638
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-30 01:46:34 +00:00
Ashod Nakashian
b25fe9d88a
loolwsd: moved SocketProcessor to IoUtil and generalized more
...
Change-Id: I527e57d2430e21249cf8cd4867f22fdbbd092b09
Reviewed-on: https://gerrit.libreoffice.org/23637
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-30 01:45:20 +00:00
Ashod Nakashian
ce2fabb733
loolwsd: moved IO utilities into IoUtil file
...
Change-Id: I1e8d5562787134cbb490c38b19d83b7514ec9baa
Reviewed-on: https://gerrit.libreoffice.org/23586
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-29 14:09:04 +00:00
Jan Holesovsky
09ee912e08
loolwsd: Default to the most verbose log level.
...
Still in heavy development, useful to know about everything...
2016-03-29 14:47:09 +02:00
Jan Holesovsky
9b54337568
loleaflet: Warn when somebody tries to use ws: for the websocket.
2016-03-29 14:47:09 +02:00
Miklos Vajna
89f79a1bf4
MessageQueue: moving a local object in a return statement prevents copy elision
...
As pointed out by clang -Wpessimizing-move.
2016-03-29 13:36:30 +02:00
Tor Lillqvist
9fc71de84d
Clarify semantics of LOK_FORK
...
Also, talk about "kit" processes, not LibreOfficeKit instances. That
is the terminology used in the code.
2016-03-29 14:33:53 +03:00
Jan Holesovsky
22914aacd1
loolwsd: Install the certificates during the build.
2016-03-29 13:29:07 +02:00
Michael Meeks
0534c511f0
First cut documentation on environment variables.
2016-03-29 12:24:32 +01:00
Michael Meeks
c5ef3ec4b1
Don't take loolwsd down with an assert on bad input.
2016-03-29 12:19:18 +01:00
Michael Meeks
b499743932
Print what is done for capabilities.
2016-03-29 12:19:18 +01:00
Jan Holesovsky
9e180171c2
WaE: Shadowed variable.
2016-03-29 12:42:45 +02:00
Andras Timar
aeb4b305dc
loolwsd: unused DemoAuthVerificationUrl variable
2016-03-29 09:36:10 +02:00
Andras Timar
be4b25fddc
loolwsd: unused LOOLWSD_NUMPRESPAWNS environment variable
2016-03-29 09:36:10 +02:00
Ashod Nakashian
7d2d2aab1c
loolwsd: message handling cleanups
...
Change-Id: I346511819907757bd84895c3751f0cbce4f37084
Reviewed-on: https://gerrit.libreoffice.org/23585
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-29 02:48:28 +00:00
Ashod Nakashian
9f39e465a6
loolwsd: cleanup of the command parser
...
Change-Id: I654e42ab6de92b7120ae2212d7e08c682d3d36f0
Reviewed-on: https://gerrit.libreoffice.org/23584
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-29 02:47:56 +00:00
Ashod Nakashian
3217b4592a
loolwsd: queue payload changed to vector<char>
...
All messages now pass through the queue.
This resolves a race between single-line
messages and multi-line ones.
Previously, single-line messages were
processed on the queue (on a background
thread) while multi-line ones were handled
immediatly. This resulted in order-inversion
due to a race between the queue thread and the
next multi-line message, which caused stability
issues every so often.
Change-Id: Ia220791d1d75c4f3e3e0965dd0c6f81bae63a296
Reviewed-on: https://gerrit.libreoffice.org/23583
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-29 02:47:27 +00:00
Ashod Nakashian
69b4f42d3c
loolwsd: preparing MessageQueue for vector<char> payload
...
Change-Id: I30bf7b4c641f4363790587ddc8ba8fb2bf9d269a
Reviewed-on: https://gerrit.libreoffice.org/23582
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-29 02:46:54 +00:00
Ashod Nakashian
7c92e263e8
loolwsd: improved websocket reading
...
Change-Id: Ibedf3c6715742f18b5e4c80e47ceb0b4bf24f384
Reviewed-on: https://gerrit.libreoffice.org/23581
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-29 02:45:46 +00:00
Tor Lillqvist
a219819ebf
Avoid defining constant strings in multiple places
...
It is not a good idea to have the same string somewhat arbitrarily
both as a static const members of the LOOLWSD class and then as a
file-local static const in another file. Or defined as a separate
local const static in each compilation unit that includes
Common.hpp. Use constexpr instead, in Common.hpp.
2016-03-28 14:17:30 +03:00
Tor Lillqvist
45fc60d428
No need to have PIDLOG as a static const class member
...
This is C++, not Java. Or is there a school of thought for C++ style
that says one should avoid plain "C-style" file-local static
variables, and instead put everything always in a class, even as
static members? Do we want to follow that?
2016-03-28 13:43:18 +03:00
Tor Lillqvist
af1973eea8
No need to have Config as a static member in the class
...
Its value is already available as a macro from config.h even.
2016-03-28 13:38:36 +03:00
Tor Lillqvist
2604824d5f
Need to #include <Poco/Net/PrivateKeyPassphraseHandler.h> to avoid warning
2016-03-28 13:26:37 +03:00
Ashod Nakashian
b4a4c45a36
loolwsd: Storage gets last modified time and simplified TileCache construction
...
Change-Id: I4a7e7b941c136b59ffd7d935310d37d73ac4ec63
Reviewed-on: https://gerrit.libreoffice.org/23540
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-26 17:10:25 +00:00
Ashod Nakashian
74580df0d6
loolwsd: warn if still communicating while terminating
...
Change-Id: Id42bb29e7c5f17772c4251d686e82d4380d2a073
Reviewed-on: https://gerrit.libreoffice.org/23539
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-26 17:08:37 +00:00
Ashod Nakashian
06d2caa098
loolwsd: TileCache logging and efficient filename generator
...
Change-Id: Id5c524f8a3d1b7ee285b620769e3378e73148138
Reviewed-on: https://gerrit.libreoffice.org/23538
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-26 17:08:12 +00:00
Ashod Nakashian
87e7dddec0
loolwsd: tile persisting done on successful save only
...
Change-Id: I1399556e809e1ee0ba194d04e93a81f786084029
Reviewed-on: https://gerrit.libreoffice.org/23537
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-26 17:07:18 +00:00
Ashod Nakashian
26c9150786
loolwsd: simplified cache dir usage in TileCache
...
Change-Id: I134763350e741145c34ee08fffb8b3e9e8782e1f
Reviewed-on: https://gerrit.libreoffice.org/23536
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-26 17:05:54 +00:00
Ashod Nakashian
92ef78b608
loolwsd: optimized TileCache::toplevelCacheDirName away
...
Change-Id: Iaac48b77e186e8069017093dffc1c432cfca8572
Reviewed-on: https://gerrit.libreoffice.org/23535
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-26 17:05:18 +00:00
Ashod Nakashian
7129779aa9
loolwsd: simplified TileCache::cacheDirName
...
Change-Id: I3de34c104606945eecbb01034425f21c499c959b
Reviewed-on: https://gerrit.libreoffice.org/23534
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-26 17:04:48 +00:00
Ashod Nakashian
8b34e75722
loolwsd: cache directory path moved to DocumentBroker
...
Change-Id: Ic7733bf4f35243afeb34d0ac2d85b619b8f49457
Reviewed-on: https://gerrit.libreoffice.org/23533
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-26 17:02:59 +00:00
Ashod Nakashian
48dfce13de
loolwsd: moved TileCache into DocumentBroker
...
Change-Id: If44a2d3158801e0910cf0f991c75b5ef845a5a30
Reviewed-on: https://gerrit.libreoffice.org/23532
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-26 16:58:55 +00:00
Ashod Nakashian
0f580476fc
loolwsd: improving unittests
...
Dumping of registered tests in preparation
to allow for selective test running.
Change-Id: I83af1c9be211804f757918c326602a0b53815704
Reviewed-on: https://gerrit.libreoffice.org/23531
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-26 16:56:58 +00:00
Ashod Nakashian
d7732bdcaa
loolwsd: new unittests and test improvements
...
Change-Id: I14e53f8bc3958dda1da1a95283c42cfef0bccd99
Reviewed-on: https://gerrit.libreoffice.org/23530
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-26 16:53:57 +00:00
Ashod Nakashian
a35006cdef
loolwsd: no need to lock in destructor
...
Change-Id: I1650bc5b44c23f1de8b5f65e621da43f1a2755eb
Reviewed-on: https://gerrit.libreoffice.org/23529
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-26 16:53:07 +00:00
Ashod Nakashian
82bd7a606a
loolwsd: recursive_mutex -> mutex and new loading synchronization mechanics
...
Change-Id: I20249ca56ca3e9203e6a989e6fe9972b6b4eca36
Reviewed-on: https://gerrit.libreoffice.org/23528
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-26 16:52:25 +00:00
Miklos Vajna
08b52fae72
MasterProcessSession: fix missing prefixes
2016-03-25 17:10:16 +01:00