Commit graph

1264 commits

Author SHA1 Message Date
Tor Lillqvist
594d925c9e This is not the place for this documentation any more
Besides, I don't think we actually use such a terminology as that
comment claimed.
2016-04-06 12:51:45 +03:00
Tor Lillqvist
7af1db615d These enums are indeed not used, and are not a good idea, so kill them
To use such enums would be a mistake. It is quite enough to just use
the message tokens as strings. Duplicating them as enums will just
lead to the enums getting out of synch (as they already were). We
would also need functions to covert between the string and enum
forms. It seems to be hard enough to keep the messages documented in
protocol.txt.
2016-04-06 12:51:31 +03:00
Tor Lillqvist
2e5a268bbc bccu#1399: Factor out check whether message indicates user interaction
Add a function to determine whether a client message indicates user
interaction. We need that distinction when deciding when to do an
automatic ("idle" or "auto") save of document being edited.

"Interaction" is a loose term, possibly what we actually want is to
see whether the user is actively doing an edit that changes the
contents of meta-data of the document.
2016-04-06 12:51:02 +03:00
Tor Lillqvist
d4ede7136c bccu#1399: Restrict the meaning of the 'last message' timestamp and rename
It should keep track only of messages that indicate explicit editing
actions by the user. For now, treat anything except 'tile' messages as
such.
2016-04-06 12:50:42 +03:00
Tor Lillqvist
381bd75fe4 Add some clarifying comments 2016-04-06 12:50:09 +03:00
Tor Lillqvist
41a1c0b3f9 Introduce LOOL_NO_AUTOSAVE environment variable 2016-04-06 12:49:13 +03:00
Michael Meeks
2cdc96c76d Close inherited WSD socket after fork.
Leave stderr/stdout etc. though.
2016-04-05 14:51:22 +01:00
Michael Meeks
36d734ab81 Rename loolbroker to loolforkit.
Now we have just one broker - the DocumentBroker inside WSD.
2016-04-05 14:45:46 +01:00
Michael Meeks
6ec2e8ca68 Rename loolbroker to loolforkit - and split the child to LOOLKit.
Move ChildProcessSession to shared_source and fix the static
ClientPortNumber issue.
2016-04-05 14:45:46 +01:00
Henry Castro
3e11956f23 loolwsd: remove pipeKit 2016-04-05 09:31:26 -04:00
Michael Meeks
1216243935 License cleanup.
Boost sample code long gone; and include loleaflet license.
2016-04-05 13:58:41 +01:00
Miklos Vajna
343e9c468d loolwsd: fix -Werror,-Wsometimes-uninitialized 2016-04-05 14:33:40 +02:00
Henry Castro
5657eac618 loolwsd: remove duplicate exit 2016-04-05 08:29:28 -04:00
Michael Meeks
d498bff3f0 Plural of child is children. 2016-04-05 12:23:02 +01:00
Michael Meeks
0278743fb2 Move pre-forking of children from loolbroker to WSD. 2016-04-05 12:21:04 +01:00
Ashod Nakashian
36a3810541 loolwsd: fixed convert-to and re-enabled test
Change-Id: I91ad9ac7dbe394d4a560081379e35442f1469eb8
Reviewed-on: https://gerrit.libreoffice.org/23825
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-05 03:01:06 +00:00
Ashod Nakashian
4bc26f25d5 loolwsd: wait for new child instances if none is available
Change-Id: If7de4ae73e9432694a0cf032b19d7e0ab9c5a9d1
Reviewed-on: https://gerrit.libreoffice.org/23824
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-05 03:00:21 +00:00
Ashod Nakashian
c2e0812a8c loolwsd: no need to destroy, just exit
Change-Id: I12332678d81b9c0880271f980935b655a1dece08
Reviewed-on: https://gerrit.libreoffice.org/23823
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-05 02:59:48 +00:00
Ashod Nakashian
3499878fae loolwsd: logging and cleanups
Change-Id: I0664be51da54d2e374808256e6598ba025f0324e
Reviewed-on: https://gerrit.libreoffice.org/23822
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-05 02:59:12 +00:00
Ashod Nakashian
94c3033408 loolwsd: wait for the Connection thread to exit before destroying
Also, the thread is joinable only once.

Change-Id: Ia0d8e4c350a6bedcf15873c751fffa837460e4bf
Reviewed-on: https://gerrit.libreoffice.org/23821
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-05 02:58:17 +00:00
Henry Castro
2c18eb8495 loolwsd: remove unnecessary response frame
The response was to verify that the command message
was successfully executed, but it can be replace by log messages.
2016-04-04 16:29:27 -04:00
Pranav Kant
dc28273dcf Fixed a regression in opening password protected docs
Change-Id: Ife378538c98f091e271e0c474fb271c513887774
2016-04-05 00:15:30 +05:30
Tor Lillqvist
321b244eb3 Catch also NetException in SocketProcessor()
Doesn't seem to fix anything, but probably is a good idea to not let
such an exception propagate, but treat it as the connection closing.
2016-04-04 15:46:27 +03:00
Tor Lillqvist
bbb4355e73 Output also a trace in DocumentCallback 2016-04-04 14:20:20 +03:00
Tor Lillqvist
b622b5ea2e Use 'using' consistenly 2016-04-04 13:29:02 +03:00
Tor Lillqvist
2732d756be LibreOfficeKit is not a process
We call the process "loolkit". LibreOfficeKit is an API, and a 'class'
in that API.
2016-04-04 12:12:14 +03:00
Tor Lillqvist
7cb5baedfc Try libmerged first
In the instdir/program of an --enable-mergelibs build of LibreOffice
there is also a dummy libsofficeapp.so. Obviously we don't want to
even try that. So look for libmergedlo.so first.
2016-04-04 12:05:55 +03:00
Tor Lillqvist
383eb5c666 Don't ask broker to fork a non-positive number of children
I easily got the thing into a state where it kept forking new
processes without limit even if no client was doing anything. The log
output contained lines like:

wsd-09526-04 00:00:48.302029 [client_ws_001b ] MasterToBroker: spawn -1

brk-09528-00 00:00:48.279945 [loolbroker     ] Broker command: [spawn -1].

brk-09528-00 00:00:48.279964 [loolbroker     ] Spawning -1 childs per request.
brk-09528-00 00:00:48.279974 [loolbroker     ] Creating -1 new child.

This fixes that, but there are still several issues remaining.
2016-04-04 11:11:53 +03:00
Tor Lillqvist
9a456770f1 Why 'signed' when 'int' is much simpler? 2016-04-04 10:57:49 +03:00
Tor Lillqvist
194b662b54 Don't truncate response in logging
There is no \r there any more, just a \n.
2016-04-04 10:36:34 +03:00
Tor Lillqvist
f7c213c87e Bin leftover from benchmark code
It died in c118987dc6.
2016-04-04 10:32:56 +03:00
Tor Lillqvist
d262f43b93 ClientPortNumber here can never differ from DEFAULT_CLIENT_PORT_NUMBER
So just use DEFAULT_CLIENT_PORT_NUMBER and don't confusingly include
ChildProcessSession.hpp in the test program sources just to define a
static (file-local) ClientPortNumber variable that never gets set to
anything except its initialized value. ChildProcessSession is specific
to the internals of loolwsd and loolbroker and should not be used in
the test programs.
2016-04-04 10:13:16 +03:00
Tor Lillqvist
d137653db5 Avoid over-engineering: Insert Capabilities.hpp in the only file where used 2016-04-04 10:05:30 +03:00
Miklos Vajna
802c702221 loolwsd: fix -Werror,-Wshadow 2016-04-04 09:02:05 +02:00
Tor Lillqvist
9ec0ae58a4 These can be static 2016-04-04 09:45:21 +03:00
Tor Lillqvist
957788a6e1 Define FIFO_ADMIN_NOTIFY in only one place 2016-04-04 09:43:29 +03:00
Tor Lillqvist
01be515760 Include only what you use 2016-04-04 09:36:27 +03:00
Tor Lillqvist
b6419ee915 Include only what you use 2016-04-04 09:31:52 +03:00
Tor Lillqvist
c2370c56ef Use 'using' consistenly 2016-04-04 09:31:03 +03:00
Tor Lillqvist
8e7196ffa0 Insert LOOLKit.cpp contents into LOOLBroker.cpp
As we don't build a separate loolkit program any more we don't need
LOOLKit.cpp.
2016-04-04 09:23:38 +03:00
Tor Lillqvist
a132e06409 Bin the non-preinit and non-fork code paths
Preiniting LibreOfficeKit and forking kit processes (instead of
spawning) has worked fine for a while, and has been the default way
this works.

No 'loolkit' program gets built any more.
2016-04-04 09:07:59 +03:00
Ashod Nakashian
208612bc10 loolwsd: temporarily disabled convert-to test
Convert-to is broken after re-designing Broker
and simplifying it. Temporarily disabling it
to help `make check` pass until it gets fixed.

Change-Id: Id49f86d8a1a25367233a09b865630ed3a210a4fd
Reviewed-on: https://gerrit.libreoffice.org/23793
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:09:36 +00:00
Ashod Nakashian
fdd3efaad8 loolwsd: reduced some excessive logs to trace level
Change-Id: I9ffcdf5c3ad5781db93e0e3dd7aa7b137c77b25a
Reviewed-on: https://gerrit.libreoffice.org/23792
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:09:19 +00:00
Ashod Nakashian
ed1790d7a3 loolwsd: kit destruction improvements
Change-Id: Ia491e5dc85e13eda12bb47690a8d335ad0917468
Reviewed-on: https://gerrit.libreoffice.org/23791
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:08:53 +00:00
Ashod Nakashian
c118987dc6 loolwsd: Removed Broker <-> Kit pipes
Broker is now just a simple spawn-machine.
It only gets requests from WSD to spawn
new kit instances, which it doesn't even
track.

Once a kit instance is initialized, it
connects to WSD with a control WS.
From there on, it's up to WSD to manage
the kit process.

Also was removed the benchmark logic
since it can no longer function.

Change-Id: I1bf56bc6416c9eadafba637276bbb8b3107e5727
Reviewed-on: https://gerrit.libreoffice.org/23790
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:08:35 +00:00
Ashod Nakashian
d5e2f64790 loolwsd: WSD <-> Child direct communication
WSD now communicates on a WebSocket directly
with kit processes. ChildProcess encapsulates
kit processes and the control WS, which itself
is owned by DocumentBroker.

Change-Id: Ica209aaa07974739b8e51a14e11325d084e193f6
Reviewed-on: https://gerrit.libreoffice.org/23789
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:08:01 +00:00
Ashod Nakashian
f4b80e630a loolwsd: consume new child from wsd
And spawn new child instances.

Change-Id: I51886f4645a1c8944ccde2e0fae415afc7c8fc24
Reviewed-on: https://gerrit.libreoffice.org/23788
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:07:27 +00:00
Ashod Nakashian
25a68bf7e9 loolwsd: support for child control WS
Change-Id: Id82009a6d5a20eeff9a7b5c628ec719845e7769e
Reviewed-on: https://gerrit.libreoffice.org/23787
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:07:10 +00:00
Ashod Nakashian
4be24759f3 loolwsd: SocketProcessor takes HTTPResponse and not HTTPServerResponse
Change-Id: I8a6e1468bc26b4a81ae13a567fd7331207ac37fc
Reviewed-on: https://gerrit.libreoffice.org/23786
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:06:42 +00:00
Ashod Nakashian
653da3a409 loolwsd: Document::onLoad is now exception safe
In face of exceptions, the lock was not released
and the condition variable was not signalled,
thereby causing all subsequent views on the
same document to fail loading.

Change-Id: I18d3cefcc74a158facefe1e74a9c802ee048b014
Reviewed-on: https://gerrit.libreoffice.org/23785
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:06:24 +00:00
Ashod Nakashian
ae8ce06162 loolwsd: removed unnecessary from pipe messages
Change-Id: I5fc310f98764b31fc50f877c28d6076bbb14866f
Reviewed-on: https://gerrit.libreoffice.org/23784
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:05:46 +00:00
Ashod Nakashian
aacd162673 loolwsd: FIFO_NOTIFY -> FIFO_ADMIN_NOTIFY
Change-Id: Ia42983010b3962ca9228032817c6f9024a74c59f
Reviewed-on: https://gerrit.libreoffice.org/23783
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:05:31 +00:00
Ashod Nakashian
bcf6ab75b8 loolwsd: statics are PascalCased and other cleanups
Change-Id: I1c7c62eb812d2e727b7256152c0c774350d24b52
Reviewed-on: https://gerrit.libreoffice.org/23782
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:05:10 +00:00
Ashod Nakashian
8a318c879a loolwsd: merged child command dispatching into a single class and renamed
Change-Id: I894849ea7a6c69c084e922c76468c5e9eb621406
Reviewed-on: https://gerrit.libreoffice.org/23781
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:04:55 +00:00
Ashod Nakashian
504ffec648 loolwsd: request new child from Broker for convert-to requests
Change-Id: I29ff2a416c04393a2b2875e9ffff429f4e25e4c5
Reviewed-on: https://gerrit.libreoffice.org/23780
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:04:36 +00:00
Ashod Nakashian
21cdf9d503 loolwsd: removed unused authentication function for now
Change-Id: I8c57adecab03eb186aeacea365f092a71e2e097d
Reviewed-on: https://gerrit.libreoffice.org/23779
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:04:18 +00:00
Michael Meeks
0a42ab7b81 Remove bogus 10 second sleep.
Change-Id: If44f28fdca37997eca09679bb9865944909ef4f2
Reviewed-on: https://gerrit.libreoffice.org/23778
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:03:58 +00:00
Michael Meeks
1b25179b25 Use bind mounting to accelerate jail creation.
of the 10k files still linked into the jail; 5700 are from usr/
so bind mount just that directory, also set noatime, ro, and
some other helpful looking options.

Change-Id: I28d2d5cbbdf33fb57ea0f0c0915cb267603ee16d
Reviewed-on: https://gerrit.libreoffice.org/23777
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:03:37 +00:00
Ashod Nakashian
285026b6f6 loolwsd: removed PipeRunnable thread from Broker and merged it with main
Change-Id: Ie10f046ed230d891eb0647e409756a34a4b146b8
Reviewed-on: https://gerrit.libreoffice.org/23776
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:03:21 +00:00
Ashod Nakashian
ba7db55353 loolwsd: cosmetics
Change-Id: I6c0c2e088e1e428d45cc56a31e7c1f3b8966dc2b
Reviewed-on: https://gerrit.libreoffice.org/23775
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:03:07 +00:00
Ashod Nakashian
265210741e loolwsd: removed unused read pipe from ChildProcess
Change-Id: I8307488227bf65a6f6fdd829728cd74722a24f58
Reviewed-on: https://gerrit.libreoffice.org/23774
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:02:51 +00:00
Michael Meeks
7f13face52 Attempt at loolbroker benchmark mode.
Change-Id: Ia1d7450b1e99686e3c654f427c231fd7e0cf8254
Reviewed-on: https://gerrit.libreoffice.org/23773
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:02:24 +00:00
Michael Meeks
4d2cd2fff3 More helpful exception debug.
Change-Id: Ibc76f20ba0ff9e015632bff2b7f049d40d49064b
Reviewed-on: https://gerrit.libreoffice.org/23772
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:01:59 +00:00
Michael Meeks
9266ffc09f Remove apparently un-necessary thread local variable template.
Change-Id: Ia220aff972827a0e49a8dadcdb8f32dcd3eed8c9
Reviewed-on: https://gerrit.libreoffice.org/23771
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:01:42 +00:00
Michael Meeks
23672ac362 Build jails more sparingly eliding un-necessary directories.
Create directories top-down and not bottom up for more efficiency too.
Skip the sdk (if we have it) - ~20k files, and misc. other
pieces that we don't need; still more to go there.

Change-Id: Iccd9ebac495fba414d268b339ef82a161d98a9ca
Reviewed-on: https://gerrit.libreoffice.org/23770
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:01:05 +00:00
Ashod Nakashian
ceaefabc91 Revert "loolwsd: replace fifo for socket WSD -> Broker"
This reverts commit 97c8f35ddf.

Since the Broker design has been extremely simplified,
all communication between Broker <-> Kit are gone.
Only a pipe between WSD and Broker remain.

Temporarily reverting this to apply the Broker redesign,
after which this patch can be reviewed and merged.
This will be easier than trying to merge the redesigned
Broker on top of this.

Change-Id: Ia901fad604008654c01841df62e88918adad45e1
Reviewed-on: https://gerrit.libreoffice.org/23769
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-04 04:00:45 +00:00
Henry Castro
97c8f35ddf loolwsd: replace fifo for socket WSD -> Broker 2016-04-03 08:12:10 -04:00
Tor Lillqvist
7a80ca8aa1 Make use of 'using' consistent in this file 2016-04-01 18:57:07 +03:00
Tor Lillqvist
9a874e7cda Catch and ignore FileExceptions when persisting editing tiles
There is nothing that says a client has even requested any tiles, so
there might be none to persist. Don't let an exception thrown by the
DirectoryIterator propagate upwards and cause potential
issues.

Noticed the issue when testing using the 'connect' test program,
giving it input that did not request any tiles.
2016-04-01 18:57:07 +03:00
Tor Lillqvist
593d5d7e08 Actually propagate idle/auto save requests to the kit processes
Had to add a shared pointer to the BasicTileQueue for the session to
the MasterProcessSession object, and restructure the coe a a bit to
allocate BasicTileQueue objects dynamically. Possibly just passing a
reference to a BasicTileQueue in the stack would have worked, but why
risk it?

The actual logic when to do auto / idle save is not quite right still,
did not change that in this commit.
2016-04-01 18:57:07 +03:00
Tor Lillqvist
d379ed2113 Improve logging and orderly shutdown 2016-04-01 18:57:07 +03:00
Tor Lillqvist
9e0a8cc43f These are not overridden in derived classes, no need to be virtual 2016-04-01 18:57:07 +03:00
Tor Lillqvist
e3f8fc41a1 Add 'override' 2016-04-01 18:57:06 +03:00
Tor Lillqvist
6c78a8f633 Typo 2016-04-01 18:57:06 +03:00
Tor Lillqvist
14be412f8f It was PipeRunnable::syncChildren() that wrote "query url" messages to the pipe 2016-04-01 18:57:06 +03:00
Tor Lillqvist
a20344b520 Bin PipeRunnable::syncChildren() which died in cbabd6177d 2016-04-01 18:57:06 +03:00
Andras Timar
324f72d844 Revert "serve loleaflet from apache2, until we solve access control problem"
This reverts commit 21cd9167c4.
2016-04-01 16:31:33 +02:00
Pranav Kant
28cf20b091 bccu#1640: Add elapsed time field to admin console
Time increment is handled on client-side, server only sends the
elapsed time during first page-load.

Change-Id: I73e98fd95ca9f391b625a8dcfc7e3490878c6a40
2016-04-01 13:33:45 +05:30
Pranav Kant
d186e05a0d loolwsd: Use filename in admin console
... instead of long URIs.

Change-Id: I9d13285ce81967a4ff9eb518086743540d7a2a90
2016-03-31 22:47:26 +05:30
Pranav Kant
b8e9075f23 bccu#1621: Introduce an edit lock
... which can be taken only one at a time. Others can only view,
not edit. When a session with edit lock exits, the edit lock is
handed over to the next alive session.

Change-Id: I712a4e70369f1d07c1d83af416a0f5c288b05c7d
2016-03-31 19:24:14 +05:30
Pranav Kant
26dd4e0b4b loolwsd: Verify JWT token's expiry time
Change-Id: I6e6913e7918ac4c36ab98457054e5660cce3a854
2016-03-31 17:25:29 +05:30
Tor Lillqvist
422834ebef Improve logging
Don't embed newlines in "lines" written to the log. When logging stuff
read from or written to the fifos, translate newlines to " / " for
clarity.

(If we would want complete, exact verbose logging, we should be really
pedantic and log all non-printable bytes in hex anyway, etc, so
displaying newlines as space-separated slashes should be OK. It isn't
as if there would be totally arbitary data passed through the fifos
anyway.)
2016-03-31 11:01:52 +03:00
Pranav Kant
4ae077200c loolwsd: Separate AdminModel header and implementation
Change-Id: Iddf107aa7985988deba800030e75243a831a7532
2016-03-31 13:00:30 +05:30
Pranav Kant
939388c6e6 loolwsd: Arrange sources/header in makefile alphabetically
Change-Id: I0bc70b34a590d84ac9c15f0d9d0000d02cadba74
2016-03-31 12:57:44 +05:30
Pranav Kant
f1ede0c4ba loolwsd: Split Storage, Auth classes into header/impl files
Change-Id: I5d8990db8f8f4aa7a88bbb0cc84b97149cf4f8c0
2016-03-31 12:57:44 +05:30
Pranav Kant
d26246dab0 loolwsd: Temporarily use hard-coded path to key file
We will switch to reading all these values as soon as wip
configuration file object is accessible globally.

Change-Id: I16eff339349683050be1985eefabc34854cccba3
2016-03-31 00:56:57 +05:30
Andras Timar
21cd9167c4 serve loleaflet from apache2, until we solve access control problem 2016-03-30 20:13:38 +02:00
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