Tor Lillqvist
58f78f8734
Don't use named pipes (FIFOs)
...
Use a plain pipe, as created by Poco::Process::launch() when you pass
a non-nullptr inPipe pointer to it. Leads to simpler code. No need to
explicitly create a FIFO and open it. In loolforkit, the read fd of
the pipe is now always 0 (stdin).
Creating the pipe ourselves in loolwsd using pipe() and passing the fd
of the read end of the pipe on the loolforkit command-line would not
be much more complex, and was what I first tried. But it did not work,
as Poco::ProcessImpl::launchByForkExecImpl() closes all file
descriptors >= 3. Which is a bit rude, and not documented, but there
you go.
2016-10-12 18:51:40 +03:00
Tor Lillqvist
d658a35c03
Fix copy-paste error
2016-10-12 15:15:39 +03:00
Tor Lillqvist
7872c5f083
I mean loolforkit, not loolkit
2016-10-12 15:13:26 +03:00
Tor Lillqvist
4655c73539
Check the capabilities only after opening the fifo
...
loolwsd is waiting in open() for loolkit to open its end of the pipe,
so if loolforkit exits before it has opened the pipe, loolwsd will
wait forever and not notice that loolkit has exited. Which is not
ideal.
Note that there are other sanity checks done before loolforkit opens
the pipe, and if some of them fail, and loolforkit exits, loolwsd will
be hanging in the open and not notice. Need to carefully look through
that and re-factor as necessary.
Using a named pipe (FIFO) is probably pointless. We should just create
a normal pipe in loolwsd and pass the fd of the reading end on the
command-line to loolforkit.
2016-10-12 14:56:34 +03:00
Tor Lillqvist
d0c856c535
Verify at run-time that the loolforkit program has the required capabilities
...
If not, log a mesage and exit.
Note that loolwsd does not notice that loolforkit exits. That is
obviously a problem, and I will see to that next.
2016-10-12 14:19:42 +03:00
Tor Lillqvist
07354f6f45
'syserror' does not correspond to a message priority level
...
Calling Log::syserror() just means errno is relevant and its string
should be included in the log line. It is the error() function of the
logger that it calls.
So don't mark log lines produced by calling Log::syserror() with a
separate "SYS" marker, but use the same "ERR" as for Log::error().
2016-10-12 14:16:47 +03:00
Tor Lillqvist
e07069eda2
Drop parameter when we always pass the same value for it
...
For the 'message' parameter of LOOLSession::shutdown(),
ClientSession::shutdownPeer(), and PrisonerSession::shutdownPeer() we
always passed "". It was passed on as the 'statusMessage' parameter to
WebSocet::shutdown() which has "" as default anyway.
2016-10-12 13:05:57 +03:00
Tor Lillqvist
4b5561c9b4
"" is the default value for the WebSocket::shutdown() statusMessage parameter
...
So no need to pass it.
2016-10-12 12:51:06 +03:00
Tor Lillqvist
55e6a76639
If saving fails, tell it to the user VERY VISIBLY
2016-10-12 12:27:14 +03:00
Tor Lillqvist
9fee650f43
Use std::getenv() consistently
2016-10-12 11:47:26 +03:00
László Németh
f910dcbf88
loleaflet: tile debug: show tile render count and cached tiles
...
- show total number of the rendered tiles of the document, also
the difference between the previous number in the client
- show cached tiles in transparent yellow color (in debug build)
- send ping messages after every invalidation message instead of
keypressing
- fix memory leak: remove unused leaflet rectangle overlays on the
tiles
2016-10-11 17:43:25 +02:00
László Németh
2c744f75c6
loolwsd: count rendered tiles and serve the number for debugging
...
extend the 'pong' server message with the data "rendercount=num",
where "num" is the total number of rendered tiles of the document.
2016-10-11 17:18:16 +02:00
Henry Castro
c3c8235561
Revert "loolwsd: test: .uno:AutoSum"
...
This is no longer need it, because the unit test
was already added to sc/qa/unit/tiledrendering/tiledrendering.cxx
This reverts commit 9b1087e000
.
2016-10-11 08:26:02 -04:00
Andras Timar
7ecf78a18e
update pot files
2016-10-11 12:13:23 +02:00
Tor Lillqvist
9ff9452e4c
It's 'error:', in lower case
...
Clearly this if branch has never been reached.
2016-10-11 13:05:17 +03:00
Aleksander Machniak
799b783968
Fix WOPI request header: X-WOPIOverride -> X-WOPI-Override
...
Change-Id: Ibd288beeffecea415c8524dfc03e77e71ba3c10e
Reviewed-on: https://gerrit.libreoffice.org/29662
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-10-11 08:11:20 +00:00
Henry Castro
c62344db81
loolwsd: websocket shutdown cleanup
2016-10-10 22:28:56 -04:00
Henry Castro
03f912115a
loleaflet: do not show internal errors
...
Internal error message, it was intended for debugging purposes,
so it is not necessary to show them to final users
2016-10-10 16:03:30 -04:00
Tor Lillqvist
d5bbe8b52c
There doesn't seem to be any 'invalidate:' message any longer
...
There is only 'invalidatetiles:'. Try to document that properly then
instead.
2016-10-10 18:16:13 +03:00
Pranav Kant
a01d2fc91d
loleaflet: Restore old coloring algorithm for non-text documents
...
.uno:TrackedChangeAuthors doesn't give correct colors for
documents other than writer, lets use our old algorithm for color
assignment for these documents.
Change-Id: If865788154a80da2637aad84183a0e947bb4b7e8
2016-10-10 18:00:38 +05:30
Pranav Kant
176367b408
loleaflet: Fix incorrect reference to username
...
Change-Id: Ibd6433c862eaf5f5fe57244180691ef8b08e3fbb
2016-10-10 17:14:54 +05:30
Tor Lillqvist
44d7f26c89
Bin dead code
...
ClientSession::isLoadFailed() was not used anywhere. As a fallout, the
_loadFailed field and setLoadFailed() member function became useless,
too.
2016-10-10 13:46:07 +03:00
Pranav Kant
0ad39593d0
loleaflet: Use view colors directly from core
...
Change-Id: I2fdffd6dd0823a77ff52e40150a81db4b261ec81
2016-10-10 13:02:22 +05:30
Pranav Kant
587c0e5222
loolwsd: Forward 'color' property in 'viewinfo' message to client
...
Change-Id: Id7d28a46cacd662aeb371805509e5a81b90b9c90
2016-10-10 13:02:22 +05:30
Ashod Nakashian
e0ff6eef6b
loolwsd: kill Connection object in child
...
Change-Id: Ic4d0d3e7286272a0765b299824dfa3556fe56f4b
Reviewed-on: https://gerrit.libreoffice.org/29652
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:32:30 +00:00
Ashod Nakashian
e33eff4abd
loolwsd: cleanup of Connection in ChildSession
...
Change-Id: I07636163df7b2973dada55b9704abf7105ad285f
Reviewed-on: https://gerrit.libreoffice.org/29651
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:32:12 +00:00
Ashod Nakashian
4fa7e53eae
loolwsd: unload child view when client disconnects
...
Using a new internal command, when a client disconnects
an internal 'disconnect' message is dispatched so
the child process cleans up the ChildSession in question.
Change-Id: I34166ad59e84ae389a3913bd2430fe537225bb4b
Reviewed-on: https://gerrit.libreoffice.org/29650
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:31:48 +00:00
Ashod Nakashian
1edd37ea2d
loolwsd: fix convert-to handling
...
Change-Id: I24b8c0b7129bee2692696809613ee49a38024c98
Reviewed-on: https://gerrit.libreoffice.org/29649
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:30:48 +00:00
Ashod Nakashian
366e0e21d5
loolwsd: support timeout on MessageQueue get
...
Change-Id: Iaad39aaa06c59cdacdd4a864599ef6a4a12976f8
Reviewed-on: https://gerrit.libreoffice.org/29648
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:29:50 +00:00
Ashod Nakashian
128cd73154
loolwsd: send child messages to client via unified wsd-kit WS
...
Change-Id: I237120e5a81a2e6d8772a2b6f1e98b1ba567f97e
Reviewed-on: https://gerrit.libreoffice.org/29647
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:29:32 +00:00
Ashod Nakashian
22a5db2fc0
loolwsd: trim forwarded messages to avoid leading whitespace
...
Change-Id: I932baf3ec41789d89bf897fcbf25a1ee1d27f89d
Reviewed-on: https://gerrit.libreoffice.org/29646
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:29:20 +00:00
Ashod Nakashian
0f2f49823e
loolwsd: unittest cleanup
...
Change-Id: I90e4fa7d5377b7ecf427c87ce068efdb4bffe933
Reviewed-on: https://gerrit.libreoffice.org/29645
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:28:06 +00:00
Ashod Nakashian
46aec10c3c
loolwsd: cleanup of isDocumentLoaded
...
Change-Id: I28321bda3000b443aff4603ad438183fa6cfb2f9
Reviewed-on: https://gerrit.libreoffice.org/29644
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:27:22 +00:00
Ashod Nakashian
d7799d21a8
loolwsd: cleanup of LoolKit process counter
...
Change-Id: I7d8bec2634b1c838cd10a8bef928ea22c2d2f549
Reviewed-on: https://gerrit.libreoffice.org/29643
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:26:59 +00:00
Ashod Nakashian
48733fdfb1
loolwsd: unittest cleanup
...
Change-Id: Ia7c5f54f6737e2d8a7fc7062b5bc27ea8291bb0a
Reviewed-on: https://gerrit.libreoffice.org/29642
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:26:27 +00:00
Ashod Nakashian
a86bd6a8be
loolwsd: unittest cleanup
...
Change-Id: I0d0bba86904ffe3f6b6c2d13de135ef957f75333
Reviewed-on: https://gerrit.libreoffice.org/29641
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:25:49 +00:00
Ashod Nakashian
0f4ccd8429
loolwsd: remove unnecessary unittest helpers
...
Change-Id: I85962c2c96c99a8132aa015670521dd5f6166097
Reviewed-on: https://gerrit.libreoffice.org/29640
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:25:18 +00:00
Ashod Nakashian
78356dabf4
loolwsd: unittest cleanup
...
Change-Id: I02e44eae87e81bda883dec66d133675ad2973203
Reviewed-on: https://gerrit.libreoffice.org/29639
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:24:51 +00:00
Ashod Nakashian
73632d43fd
loolwsd: unittest cleanup
...
Change-Id: Ie3bf745414fee4deb067b482ae463d6c4e08b01e
Reviewed-on: https://gerrit.libreoffice.org/29638
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:24:30 +00:00
Ashod Nakashian
38cbfa96b0
loolwsd: forward client message to child via the process WS
...
Change-Id: I368e727b79b44b509ba49ed30218b8368c5eaad8
Reviewed-on: https://gerrit.libreoffice.org/29637
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:23:51 +00:00
Ashod Nakashian
6cf9cdf032
loolwsd: forward to child
...
Change-Id: I308963a78fb05e85bcb2e6c257640b56583859b5
Reviewed-on: https://gerrit.libreoffice.org/29636
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:23:07 +00:00
Ashod Nakashian
3963382913
loolwsd: forward child messages to the respective ChildSession
...
Change-Id: Ib1e0c51effd046a2f0d0e5708c501b6414caa81a
Reviewed-on: https://gerrit.libreoffice.org/29635
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:22:28 +00:00
Ashod Nakashian
f17ff9c1d9
loolwsd: forward client messages to the respective client's WS
...
Change-Id: Ie28223f985a7f24a7569300b846432bf77813ab0
Reviewed-on: https://gerrit.libreoffice.org/29634
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:20:25 +00:00
Ashod Nakashian
f7327115de
loolwsd: allow for delimiter in LOOLProtocol parsers
...
Change-Id: I9c7e503aed067dfe36953552237941e7c1841457
Reviewed-on: https://gerrit.libreoffice.org/29633
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:18:18 +00:00
Ashod Nakashian
3f42ba342c
loolwsd: inline some common LOOLProtocol functions and more args
...
Change-Id: If75fa5c7c606377b9a79aa6e8d927840b9da39fa
Reviewed-on: https://gerrit.libreoffice.org/29632
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:17:01 +00:00
Ashod Nakashian
0ec7b0e889
loolwsd: unittest cleanup
...
Change-Id: Id1816656bda88086779fad73b7e18fecf8892e41
Reviewed-on: https://gerrit.libreoffice.org/29631
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:16:17 +00:00
Ashod Nakashian
22fb71c672
loolwsd: cleanup lastEditableSession flag in DocumentBroker
...
Change-Id: Iab3a226e3ff089c6bdab264d6f1b1d639bcf3b37
Reviewed-on: https://gerrit.libreoffice.org/29630
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:15:44 +00:00
pootlebot automatic
29ce548144
Pootle automatic update from libo_online
2016-10-09 17:03:25 +00:00
Henry Castro
7f514422c3
loleaflet: increase re-size cursor zone
2016-10-09 11:43:26 -04:00
jan Iversen
83848bfb29
update from pootle
2016-10-09 09:42:29 +02:00