Tor Lillqvist
9c8e4988fa
Bin the old --test mode of LOOLWSD
...
It hardly was relevant any more. The 'connect' test program can be
used for effectively the same kind of testing anyway.
2016-04-12 13:34:33 +03:00
Michael Meeks
cd2f70521b
Cleanup configure.ac status messages.
2016-04-12 10:00:44 +01:00
Jan Holesovsky
280fafe03c
Add a trivial autogen.sh.
2016-04-12 10:17:20 +02:00
Jan Holesovsky
3d17f3cc4d
Add a missing autoheader call.
2016-04-12 10:09:10 +02:00
Tor Lillqvist
d7f107c532
Add m4, and re-order for clarity
...
Only have under the "Autofoo" comment stuff actually related to
autofoo or configury in general.
2016-04-12 10:49:57 +03:00
Jan Holesovsky
cc3ee1033b
Make the autotools steps reliable.
2016-04-12 09:39:53 +02:00
Miklos Vajna
73985418c7
${systemplate} -> @SYSTEMPLATE_PATH@ to fix make check
...
Change-Id: I5cb78fa3820c2e48fe071ba2b030b824a6780e10
2016-04-12 08:37:24 +02:00
Tor Lillqvist
255f9304e9
Fix build without --with-lo-path
2016-04-12 09:29:57 +03:00
Miklos Vajna
773dad57ba
AdminModel: can pass these by reference
...
Change-Id: I1c9ff03c06a8de00162cb2987b7218209f514850
2016-04-12 08:09:42 +02:00
Michael Meeks
ea1e2493bf
Re-factor tests, move jails & systemplate up a level into loolwsd.
...
Also generate the test scripts with config.status containing absolute
paths to make them easier to run, and enable the older unit tests.
2016-04-11 22:01:49 +01:00
Tor Lillqvist
0f3fa0e9d4
Don't log the payload inside a CLOSE frame
...
It is a status code, a 2-byte unsigned integer in network byte order,
potentially followed by a textual reason. But we never include any
specific status codes in the CLOSE frames anyway. (With a Poco-based
WebSocket peer it is always WS_NORMAL_CLOSE, 1000, 0x03 0xE8.)
2016-04-11 17:21:57 +03:00
Tor Lillqvist
ccf73d159d
Mention libtoolize, and that building from tarball is simpler
...
(Is it?)
2016-04-11 17:04:19 +03:00
Tor Lillqvist
9929842a69
It is loolforkit that has capabilities now, not loolwsd
2016-04-11 17:00:11 +03:00
Tor Lillqvist
eb5fcdba93
Consistenly put a colon after the "editlock" in the message sent to the client
2016-04-11 13:31:03 +03:00
Pranav Kant
ef2638298a
loleaflet: listen to composition events
...
Treat 'compositionend' event as 'keypress' event with composited
data.
Change-Id: Ia1d35e3ce2c583259dc6b6179741050ed173fe64
2016-04-11 15:38:19 +05:30
Tor Lillqvist
a1f4ded793
YAGNI: Drop parameter with default value that is never overridden
...
No non-default value is never passed. Just use the default value as such in the function.
2016-04-11 11:30:54 +03:00
Tor Lillqvist
6729bb7726
PipeReader::readLine() is used only internally by processOnce()
2016-04-11 11:23:33 +03:00
Tor Lillqvist
077a4436df
Bin unused function PipeReader::process()
2016-04-11 11:21:18 +03:00
Tor Lillqvist
2623208c8f
Rename MAINTENANCE_INTERVAL to something more descriptive
2016-04-11 11:17:27 +03:00
Tor Lillqvist
a598ea869c
Use less misleading function and variable names
...
Also, get rid of one default parameter that was passed a non-default
value only 'internally'.
2016-04-11 10:14:26 +03:00
Miklos Vajna
ee1e036aa9
Util: strcpy -> strncpy
...
Change-Id: I03f50f4e5e7f404364fdf90197750bf7cd762c9c
2016-04-11 09:12:59 +02:00
Tor Lillqvist
1c9a6400b6
Make the testBadLoad() unit test pass again
...
The server sends an "editlock: 1" message even if no document has been
loaded. Ignore that while waiting for the "error:" message.
2016-04-11 10:00:45 +03:00
Tor Lillqvist
bde585a879
Make the time log messages make more sense semantically
2016-04-11 09:25:32 +03:00
Tor Lillqvist
9d4aeb86d1
I doubt we need nanosecond precision here in the logging
...
(As in "Most recent inactivity was 8096.000000 ms ago".)
2016-04-11 09:15:12 +03:00
Tor Lillqvist
dfd1782300
Probably we can drop the "30-second check" log output
2016-04-11 09:09:18 +03:00
Ashod Nakashian
abca88c7cf
loolwsd: correction to prefork unit-test
...
Since WSD now takes into account the fact that
ForKit always spawns one child, the unit-test
shouldn't expect +1 preforked children.
Change-Id: I5cbe9d817a0d2ffdf9fb0953ef85450f7b8b224f
Reviewed-on: https://gerrit.libreoffice.org/23980
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-11 03:12:26 +00:00
Ashod Nakashian
63068a5dda
loolwsd: command timeout is now a const
...
Change-Id: I9115f465fe760f4c388294bfb5e14cbb441c1174
Reviewed-on: https://gerrit.libreoffice.org/23979
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-11 03:12:06 +00:00
Ashod Nakashian
280669c253
loolwsd: save on disconnection
...
Last client disconnection now correctly issues a save
and waits for the confirmation before tearing down
the sockets, queues and threads.
Change-Id: I28c28d79a17d359e9aa1fe67b983ca9fb592b847
Reviewed-on: https://gerrit.libreoffice.org/23978
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-11 03:11:38 +00:00
Ashod Nakashian
1c0f608a59
loolwsd: broker sets edit lock on first session automatically
...
Change-Id: Icad57130ffb1953cf8c71d4675c116036684569a
Reviewed-on: https://gerrit.libreoffice.org/23977
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-11 03:10:13 +00:00
Ashod Nakashian
4cab42b20f
loolwsd: logging improvements
...
Change-Id: Idba11b0ae18337d78ea504a455ddc9494cff7ef0
Reviewed-on: https://gerrit.libreoffice.org/23967
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-10 17:21:32 +00:00
Ashod Nakashian
2a65f2e397
loolwsd: invoking disconnect on the session from Connection deadlocks
...
Connection thread should not attempt to disconnect the session,
which in turn will try to unload the document, which will
wait on the connection to destroy. The latter will never
happen since the connection destructor must, correctly,
wait for its thread to finish, which is waiting on itself now.
Since the session disconnect is already called from the session
destructor, there is no need to explicitly invoke it here.
Change-Id: Iaf9e8a10d4caa9001208084e909a14b4d4c5105e
Reviewed-on: https://gerrit.libreoffice.org/23966
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-10 17:19:55 +00:00
Ashod Nakashian
85641d934e
loolwsd: for consistency always remove edit lock before taking it
...
Change-Id: Id24d6737fc3af77097058b28a77d6ca2d757cb9e
Reviewed-on: https://gerrit.libreoffice.org/23965
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-10 17:18:49 +00:00
Ashod Nakashian
60531e7def
loolwsd: removed redundant session count in DocumentBroker
...
The sessions container already has the number of sessions.
No need for separate counters to track them.
Change-Id: I838865e2b8a843e87e81a6cc1226bcacd774b032
Reviewed-on: https://gerrit.libreoffice.org/23964
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-10 17:18:25 +00:00
Ashod Nakashian
e85d726c6c
loolwsd: use the first valid session for auto-saving
...
Change-Id: I3d860c9f91de56f84ae93dc93688cd4898128107
Reviewed-on: https://gerrit.libreoffice.org/23963
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-10 17:15:18 +00:00
Andras Timar
39203290d8
bump version number, because we branched off 1.5.x
2016-04-10 12:53:06 +02:00
Tor Lillqvist
8d77460738
Add one minor thing
2016-04-10 10:44:45 +03:00
Tor Lillqvist
ec1ae85ddb
Bin some obsolete lines
2016-04-10 09:40:28 +03:00
Tor Lillqvist
1409702282
Do include what you use even if it apparently gets included indirectly anyway
2016-04-10 09:37:51 +03:00
Tor Lillqvist
df2048c895
No need for <condition_variable> here
2016-04-10 09:36:36 +03:00
Tor Lillqvist
8bd0cb7543
These member variables are not used any more
2016-04-10 09:33:03 +03:00
Tor Lillqvist
3717c0ed27
Bin some unused static member variables
2016-04-10 09:31:56 +03:00
Tor Lillqvist
bdecb37f72
'make check' seems to work much better currently
2016-04-10 09:27:59 +03:00
Tor Lillqvist
fc87a51a69
No fifoCV/fifoMutex any more
...
(I did not bother checking whether they were just renamed, of whether
the same anti-pattern is present in some other place.)
2016-04-10 09:25:54 +03:00
Henry Castro
9ae7fa5b9b
loolwsd: wait until bridge is completed
2016-04-10 00:18:48 -04:00
Ashod Nakashian
21e6ac23ea
loolwsd: prevent ctrl+tab from inserting tab characters
...
Change-Id: I10b32a3e8ea1c8f80fadc9a8e6502b1a8bd322cc
Reviewed-on: https://gerrit.libreoffice.org/23953
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-10 04:15:57 +00:00
Ashod Nakashian
dc137081a7
loolwsd: session container can be private to DocumentBroker
...
Change-Id: I1539f2ec3ab1bd11d659dab11359cf25a46e1f97
Reviewed-on: https://gerrit.libreoffice.org/23952
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-10 04:15:11 +00:00
Ashod Nakashian
e6d0882791
loolwsd: moved autosave to DocumentBroker
...
Autosaving is done by DocumentBroker, which
tracks the last save time.
There are two triggers: idle and auto save.
The first triggers when sufficient time passes
after the last interaction the user had with
the UI (currently 30 seconds).
The second triggers when it's been more than
5 minutes since the last save.
Both triggers are conditional on the user
being active after the last save.
The new code auto-saves doesn't issue
a save command per session, but only
one per doc.
Change-Id: Iada15c16002e70710d2c13a3dcfdab036d8935c6
Reviewed-on: https://gerrit.libreoffice.org/23951
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-10 03:37:06 +00:00
Ashod Nakashian
8c1e5057fd
loolwsd: last activity time updates ignores non-interactive commands
...
Change-Id: I763c2945f6acb30bea9d04d91982e9fb0c8ca6ca
Reviewed-on: https://gerrit.libreoffice.org/23950
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-10 03:35:09 +00:00
Ashod Nakashian
213888c45c
loolwsd: logging and remove unused vars
...
Change-Id: Iff4cf5284a959caf84ce6ca5072623b6f95315df
Reviewed-on: https://gerrit.libreoffice.org/23949
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-10 03:33:38 +00:00
Ashod Nakashian
b6d2edb0e3
loolwsd: moved activity tracking into LOOLSession
...
Change-Id: I87d5afc43bea29ede2ad6e2871c594c4746bc3d5
Reviewed-on: https://gerrit.libreoffice.org/23948
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-10 03:32:58 +00:00