Ashod Nakashian
fa1dc4e051
wsd: wrap polling thread and manage state correctly
...
Change-Id: Iaa4eff1fac1cd7147603ba0c9d51fd8b6b0e96d2
2017-03-15 00:04:55 -04:00
Ashod Nakashian
c8bece208d
wsd: socket logs include socket FD for better traceability
...
Change-Id: I994c7c5ab73b97be312a9d6abf3258dc5f4c08c1
2017-03-15 00:04:55 -04:00
Ashod Nakashian
aa19964b03
wsd: SSL logging improvement
...
Change-Id: I99d08a764fd43ab0c7eb50a1f017202e6bbc3477
2017-03-15 00:04:55 -04:00
Ashod Nakashian
45e1c7763c
wsd: Socket stores SocketHandler shared_ptr
...
Change-Id: I5b460069eb4d91cee2d58833791f961fd6f42b39
2017-03-15 00:04:55 -04:00
Henry Castro
00fb1aeddd
loleaflet: fix annotations of each slide
...
Change-Id: I85a27aadad9b03c8a190d3a4b2af7bcb86550a01
2017-03-14 20:41:40 -04:00
Jan Holesovsky
d71ff2240a
We don't expect the DocumentBroker isAlive() yet here.
...
Change-Id: Ib0349d3764ca2f8a71f6ac355b0ebc8799ee3d43
2017-03-14 17:43:21 +01:00
Andras Timar
8541cd1e46
add loolkitconfig.xcu to dist tarball
...
Change-Id: Icca000db16fca09ba2769dee8cb18e847496d48c
2017-03-14 16:04:10 +01:00
Andras Timar
15009c2a10
add ServerSocket.hpp to dist tarball
...
Change-Id: I7f6241094580dae2212dfdf01999abaeeb49cf1f
2017-03-14 15:40:16 +01:00
Andras Timar
5c94fa35c4
add LOOLWebSocket.hpp to dist tarball
...
Change-Id: I997290c8af437c06bcacca49dc167533ab7917cf
2017-03-14 15:16:54 +01:00
Pranav Kant
60e86cfba8
clearer log message, insert space here
...
Change-Id: I883867e66060838d8f6c879b9bba44f93fb7bd51
2017-03-14 19:19:27 +05:30
Pranav Kant
9efb0e8701
loolwsd: Fix dump states output
...
Change-Id: Idf578e1833b0013bb694e8cd5a8630bf48938c56
2017-03-14 18:04:50 +05:30
Ashod Nakashian
b258355039
wsd: StreamSocket supports changing its SocketHandler
...
Change-Id: I2ffc33daad4da5b98183af39e3c2a64e7e10b3e8
Reviewed-on: https://gerrit.libreoffice.org/35158
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-14 04:31:22 +00:00
Ashod Nakashian
8b9623010a
wsd: sendHttpResponse -> send
...
Change-Id: I7c94f6d4cd1054ea86585bfcd4079140471f3518
Reviewed-on: https://gerrit.libreoffice.org/35157
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-14 04:30:55 +00:00
Henry Castro
92d4ec64c3
loleaflet: fix the image author size of the annotation object
...
Change-Id: Ife0c6d497dd0a201b10a2f7e8729ae8cb2a22627
2017-03-13 20:58:05 -04:00
Michael Meeks
fad3a046ae
AdminConsole - get credentials sorted, and serve the HTML pieces.
2017-03-13 21:48:19 +00:00
Michael Meeks
bf8068de18
Clarify comment a little.
2017-03-13 13:42:05 +00:00
Andras Timar
07c0452ec1
fix error: unused parameter 'hard' [-Werror=unused-parameter]
...
Change-Id: Ie2f2a12cc2f5d6c2fd3319d3c870cc7f0a226fae
2017-03-13 13:22:56 +01:00
Michael Meeks
97e9463f17
Revert "wsd: TerminatingPoll always starts its own thread"
...
This reverts commit 388d7b1dbf
.
It is vital to have clean control of thread start. By starting
a thread during init. of a member (or base-clase) we loose lots of
control, some examples:
Any members initialized after a member that auto-starts a
thread, is effectively un-defined, and cannot be accessed
reliably.
This is particularly problematic for sub-classes.
I've seen threads started before the base-class has
finished constructing in the original creating thread -
such that the vtable was not yet updated to the sub-class
causing the transient parent vtable used during construction
to be used in-error.
2017-03-13 12:13:22 +00:00
Andras Timar
e5fbdb2cde
loleaflet: add new localizable files to Makefile.am and regenerate pot file
...
Change-Id: I6a91186eba13da6745c2cddb6e96b7b148d797dc
2017-03-13 13:03:19 +01:00
Ashod Nakashian
3d78e5f2a1
wsd: improved logging of extant DocBrokers after cleanup
...
Change-Id: I4de8fde607e9e94cbadd8e100d39e0e21f2f2bdc
Reviewed-on: https://gerrit.libreoffice.org/35126
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-13 04:25:57 +00:00
Ashod Nakashian
94051f21b5
wsd: SocketPoll::startThread can be protected
...
Change-Id: Idd17f7314ac181e9a412e05a1287e15edf5047d2
Reviewed-on: https://gerrit.libreoffice.org/35125
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-13 04:25:20 +00:00
Ashod Nakashian
c4d27fd060
wsd: prevent and warn when joining own thread
...
Change-Id: I8405a1aacb1281e52bbd07d32cdcf35bdc484d8b
Reviewed-on: https://gerrit.libreoffice.org/35124
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-13 04:25:04 +00:00
Ashod Nakashian
862d7a0734
wsd: write as many messages to socket as possible
...
Change-Id: Ie2702ea68dd1ae6200fcc304224dea34fc94544f
Reviewed-on: https://gerrit.libreoffice.org/35123
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-13 04:24:37 +00:00
Ashod Nakashian
9248107702
wsd: SocketPoll reports thread isAlive and use in DocBroker
...
Now that DocumentBroker has SocketPoll thread,
it's isAlive() must be defined by the lifetime of
both the SocketPoll thread and the ChildProcess,
which it previously did.
Change-Id: I093f8774cf4374d01729a383f6c535de4143fec6
Reviewed-on: https://gerrit.libreoffice.org/35122
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-13 04:23:18 +00:00
Ashod Nakashian
8901fcf074
wsd: ChildProcess doesn't need friends
...
Change-Id: I1911920c9b49adecac4ea4d8fc4b0830687b80c7
Reviewed-on: https://gerrit.libreoffice.org/35121
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-13 04:21:25 +00:00
Ashod Nakashian
c9a07a3087
wsd: assert socket is in correct thread
...
Change-Id: I22c3f62bdf45188641326774dd86b7cacfce9198
Reviewed-on: https://gerrit.libreoffice.org/35120
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-13 04:20:41 +00:00
Ashod Nakashian
04bbb75200
wsd: dump state to generic ostream for flexiblity and to log
...
Change-Id: I4670ee2e90b7809ebc66a2b324a44334b3dbba2b
Reviewed-on: https://gerrit.libreoffice.org/35119
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-13 04:19:58 +00:00
Ashod Nakashian
2e2f62edde
wsd: improved logging
...
Change-Id: I6c4a5bcd54c0748cc413afbfcfb34c365b347669
Reviewed-on: https://gerrit.libreoffice.org/35118
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-13 04:11:24 +00:00
Ashod Nakashian
851195215a
wsd: log testHandshake traffic
...
Change-Id: Iee79dfe2e7987838a528d5705cbb0d476f73dce7
Reviewed-on: https://gerrit.libreoffice.org/35117
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-13 04:10:26 +00:00
Ashod Nakashian
6f11918661
wsd: more informative SSL error logging
...
Change-Id: I32baadf995f6fc4c9b112d1a62fee2d618fc9e95
Reviewed-on: https://gerrit.libreoffice.org/35116
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-13 04:10:03 +00:00
Ashod Nakashian
c939eeab68
wsd: remove the last session immediately if no saving needed
...
Change-Id: I509c7a83f16caf0d55fcb6af9c7ce707b7a0e389
Reviewed-on: https://gerrit.libreoffice.org/35115
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-13 04:09:36 +00:00
Ashod Nakashian
388d7b1dbf
wsd: TerminatingPoll always starts its own thread
...
Since all TerminatingPoll instances need to fire
a thread, no reason to do it manually and risk
races. Now TerminatingPoll does it in the ctor.
Change-Id: I59850ad48b3789f3a23d01abb05a7f28e5717031
Reviewed-on: https://gerrit.libreoffice.org/35114
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-13 04:09:15 +00:00
Ashod Nakashian
cbd00bf7c8
wsd: simplify DocumentBroker construction
...
DocumentBrokerPoll is always owned by a
single DocumentBroker instance, so we
can hold a reference to it. This eliminates
the need to hold a shared_ptr to the owner
which, in turn, eliminates the need for
a create wrapper.
Change-Id: I954c9dddcc3b2cfdd5dfcc8248ab3d47a897f684
Reviewed-on: https://gerrit.libreoffice.org/35113
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-13 04:08:40 +00:00
Ashod Nakashian
d1f201c63c
wsd: testHandshake test doc filename includes test name
...
Change-Id: Id741daca14a7590ae66ee2206be99c35fe10fc33
Reviewed-on: https://gerrit.libreoffice.org/35112
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-13 04:08:11 +00:00
Michael Meeks
71a1e188a7
Handle If-None-Match / ETag (hopefully) - hard to test ...
2017-03-11 22:28:59 +00:00
Michael Meeks
51ae42d513
DocumentBroker: log load time and dump it on request.
2017-03-11 22:01:27 +00:00
Michael Meeks
bf8f8f1738
tdf#106488 - fix by disabling un-necessary locking for the kit.
2017-03-11 21:47:21 +00:00
Michael Meeks
1f5b7b6def
Include config layer to override kit config simply.
...
The config is read once during the forkit startup. Add a read-only
user configuration layer, and also disable config writing: no
writable user config.
2017-03-11 21:47:05 +00:00
Ashod Nakashian
57e7d22e28
wsd: logging and formatting cleanup
...
Change-Id: I5bfbd517c37b6df864d181abe7c70857815b9ece
Reviewed-on: https://gerrit.libreoffice.org/35082
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-11 19:50:08 +00:00
Ashod Nakashian
e9614fc697
wsd: support logging file and line with logger objects
...
Change-Id: Ibf82105d91ece29c0a4742c6b2e81f6b179c0be4
Reviewed-on: https://gerrit.libreoffice.org/35081
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-11 19:49:09 +00:00
Ashod Nakashian
2e16fd2852
nb: don't read socket data without handling
...
When we read data, we must also handle it,
otherwise the next poll might have no
more data (the request data was read
completely the first time) and we dead
lock waiting for data to process.
Change-Id: I26c69ecc1f0550e8371cf77a6f3928a7a877eff7
Reviewed-on: https://gerrit.libreoffice.org/35080
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-03-11 19:48:22 +00:00
Michael Meeks
93d46fc469
Don't treat a session as non-editable when it is not (yet) loaded.
2017-03-10 23:52:28 +00:00
Michael Meeks
5cafa006dc
Wakeup poll after queueing a new session.
2017-03-10 23:28:54 +00:00
Michael Meeks
5763d8d9bb
Improve debugging.
2017-03-10 23:28:34 +00:00
Michael Meeks
a9d5801c37
Unwind releaseSocket complexity.
...
We only move sockets in response to input on the socket, which
must happen in the thread that we're processing that input on.
Ergo - no need for this complexity.
2017-03-10 18:46:31 +00:00
Michael Meeks
027b8110ed
Allow isCorrectThread asserts to be hard, or off by default.
2017-03-10 18:46:16 +00:00
Michael Meeks
c30fb670d8
Work on LOOL_CHECK_THREADS=1 a little.
...
The situation made more problematic since the std::thread is only
created in startThread - so getting ownership right before then in
Socket is problematic.
2017-03-10 18:20:51 +00:00
Michael Meeks
160446fd23
Work on resurrecting dying DocumentBrokers if we can.
...
The hope is that they will close lingering session sockets at the
end and the client will re-connect.
2017-03-10 17:58:51 +00:00
Michael Meeks
1065441e7c
Don't autosave if we're being stopped and happened to be overdue.
2017-03-10 16:42:59 +00:00
Michael Meeks
173ca5e3d6
Quote ETag.
2017-03-10 16:42:48 +00:00