Commit graph

2399 commits

Author SHA1 Message Date
Henry Castro
a06974e2b3 loleaflet: add loading spinner to slide show 2016-04-06 15:54:55 -04:00
Jan Holesovsky
204a9c742f loolwsd: Allow asking for credentials even during websocket setup.
It may happen that admin.html is cached, which leads to the cookie not being
set up, which then leads to endless amount of attempts to log in.
2016-04-06 20:17:24 +02:00
Henry Castro
b6dc37fadf loleaflet: fix slide show when it is used "file://" scheme 2016-04-06 10:15:41 -04:00
Ashod Nakashian
6e5e9033f2 loolwsd: removed Admin pipe
Admin no longer needs a pipe as it's notified
from WSD. It is now a singleton with improved
locking.

The tracking of documents and views still needs
improvement and corrections.

Change-Id: If614331de6dd595c6dd4443f480d4ab588ca4551
Reviewed-on: https://gerrit.libreoffice.org/23860
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-06 13:52:57 +00:00
Ashod Nakashian
0aa60f8745 loolwsd: ignore SIGCHLD and auto-reap zombies
Change-Id: Ia927d4d01c38a8929a47fb8aa014f0ed5896f8ed
Reviewed-on: https://gerrit.libreoffice.org/23859
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-06 13:52:25 +00:00
Ashod Nakashian
5e41763386 loolwsd: disconnect WS before killing/abandoning child
Change-Id: Iff0ac1b57ce9e0fe61871fad9a499d370c2c9294
Reviewed-on: https://gerrit.libreoffice.org/23858
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-06 13:52:05 +00:00
Henry Castro
ab0429622e loleflet: rework progress bar 2016-04-06 09:14:54 -04:00
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
Jan Holesovsky
fa4ea0200b loleaflet: Show the 'More' button only when there are more items. 2016-04-06 09:00:48 +02:00
Pranav Kant
7da31f6fa3 bccu#1660: Remove unused/superfluous links
Change-Id: Ib5e78586a1c33ca16bd4848e0912313434b7db54
2016-04-06 10:15:49 +05:30
Jan Holesovsky
560dc6c6ab loleaflet: It is not necessary to inform about EDITING, that's the default. 2016-04-05 17:55:05 +02:00
Jan Holesovsky
e228817a8c bccu#1658: 'Enable editing' and 'Enable selection' buttons are not necessary.
Also some other small tweaks, like disable the Previous / Next part buttons in
spreadsheet, and better naming of them.
2016-04-05 17:22:44 +02: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