Commit graph

1371 commits

Author SHA1 Message Date
Ozcan Esen
7089ec49a2 loleaflet: clean up linter warnings
Change-Id: Ic17c4eb813d408e4f9648d40e1e944c23c9cb129
Reviewed-on: https://gerrit.libreoffice.org/20995
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 23:40:26 +00:00
Ashod Nakashian
9e9e2f60ef loolwsd: broker handles sigint and wsd removes childroot
Change-Id: Ie408bff7944ff0b9abfa8433b1e8ea6f62a9ab2c
Reviewed-on: https://gerrit.libreoffice.org/20999
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 23:39:13 +00:00
Ashod Nakashian
cf972fbed2 loolwsd: use full path when spawning loolkit
Change-Id: I9875fb7fbbc67915ed62785a3f3d1298a355f0a5
Reviewed-on: https://gerrit.libreoffice.org/20998
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 23:38:25 +00:00
Ashod Nakashian
88b76fe9d4 loolwsd: removed dead code
Variables and options lingering from previous iterations removed.
Standardizing static member names.
Header inclusion cleanups.

Change-Id: I65182ad4d100e0077f1b450be50cf95d7b8f0fc7
Reviewed-on: https://gerrit.libreoffice.org/20997
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 23:36:55 +00:00
Henry Castro
ceac0a24da loolwsd: avoid double child socket shutdown 2015-12-28 18:37:31 -04:00
Henry Castro
d185f738ee loolwsd: revert, remove unnecessary local buffer 2015-12-28 18:24:59 -04:00
Henry Castro
12771ec02d loolwsd: remove unnecessary local buffer 2015-12-28 17:51:38 -04:00
Henry Castro
7fc04b6e71 loolwsd: stop dispatch child when closed websocket prison 2015-12-28 17:05:01 -04:00
Henry Castro
8410ceca2f loolwsd: thread renamed to wsd_queue_handler 2015-12-28 16:51:39 -04:00
Henry Castro
fdef57cba0 loolwsd: close client websocket when abnormal close prison websocket 2015-12-28 16:40:32 -04:00
Henry Castro
ad8844e7aa loolwsd: fix systemplate when --enable-debug poco library 2015-12-28 14:04:07 -04:00
Henry Castro
0d1be4fe82 loolwsd: cleanup unnecessary LOOLWSD code 2015-12-28 12:29:54 -04:00
Ashod Nakashian
6b997c2abf loolwsd: threadId -> sessionId in logs and identifiers
Change-Id: Ifbaea2fdded54da0d3528ae449efdbd7fe6d19c0
Reviewed-on: https://gerrit.libreoffice.org/20982
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 04:15:02 +00:00
Ashod Nakashian
3811abb40a loolwsd: replaced threadId with globally unique sessionId
Change-Id: I55b16d4baa1753bc67dcd72de13e7a516da27abe
Reviewed-on: https://gerrit.libreoffice.org/20981
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 04:14:15 +00:00
Ashod Nakashian
5780e311b7 loolwsd: childId type int -> string
Change-Id: I2aad12da4bb8e7d87866d251258fb44e2aad9a2b
Reviewed-on: https://gerrit.libreoffice.org/20980
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 04:12:57 +00:00
Ashod Nakashian
b2d124af93 loolwsd: proper handling of non-default client port number
Change-Id: I388f0ce0252c5f7889e77c4d85b4cf21d4a222b6
Reviewed-on: https://gerrit.libreoffice.org/20979
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 04:12:15 +00:00
Ashod Nakashian
d273057488 loolwsd: moved config values into common header
Change-Id: Ib88379e453f207a6a5e6223045a393c769082be4
Reviewed-on: https://gerrit.libreoffice.org/20978
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 04:09:50 +00:00
Ashod Nakashian
1e24456121 loolwsd: logPrefix cleanup
Change-Id: I41465a06b17876c5d5fb7a6f9d8569d80571fcca
Reviewed-on: https://gerrit.libreoffice.org/20977
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 04:08:34 +00:00
Ashod Nakashian
538478826d loolwsd: workaround for older gcc that require explicit move ctor
Change-Id: I2a4c232ad89c32ea8739809a13e17522dee7e7c1
Reviewed-on: https://gerrit.libreoffice.org/20976
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 04:07:57 +00:00
Ashod Nakashian
fe0c11333f loolwsd: thread lifecycle markers
Change-Id: I704e37e797224c9dbd024fcab3d8e917584be152
Reviewed-on: https://gerrit.libreoffice.org/20975
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 04:07:37 +00:00
Ashod Nakashian
72a1f18ebc loolwsd: fix detection of unreachable child
Change-Id: I619613067586ec824d17cacd6059168e9329ec4c
Reviewed-on: https://gerrit.libreoffice.org/20974
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 04:07:06 +00:00
Ashod Nakashian
e8e8e6c844 loolwsd: detect broken pipe
Change-Id: If1f40833e26c9ff281f33cc5d7c798fc0f9f3239
Reviewed-on: https://gerrit.libreoffice.org/20973
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 04:06:34 +00:00
Ashod Nakashian
2c5b02dec0 loolwsd: correct lokit document lifecycle
Change-Id: Id7fa6259022694efd519d08c05879d734b1b6717
Reviewed-on: https://gerrit.libreoffice.org/20972
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-28 04:06:04 +00:00
Ashod Nakashian
ab8c6e6661 loolwsd: use make_shared and emplace
Change-Id: I9110a03b69442f0f8a674eda6ab4cf20462557c1
Reviewed-on: https://gerrit.libreoffice.org/20951
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-26 03:59:50 +00:00
Ashod Nakashian
03fa56f9de loolwsd: load document immediately upon handshake
Change-Id: If750ae0a94258048c99f6dd47f7abb3a59660c6f
Reviewed-on: https://gerrit.libreoffice.org/20950
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-26 03:59:35 +00:00
Ashod Nakashian
d26944b715 loolwsd: safely remove files and directories
Change-Id: Ie017a9da720a470a6b8ed340bd4ea5ffc279cf4b
Reviewed-on: https://gerrit.libreoffice.org/20949
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-26 03:59:20 +00:00
Ashod Nakashian
8fc1e3c65b loolwsd: better error handling and resilience
Change-Id: Ic0208ccb72cb35cb8f8b3c1f36b636dd3a467dc1
Reviewed-on: https://gerrit.libreoffice.org/20948
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-26 03:59:05 +00:00
Ashod Nakashian
42d07b2aea loolwsd: refactored LOOLSession::handleInput to handle errors
Change-Id: I3be929242317f4fafcb62c55d3532b2fbfd6591b
Reviewed-on: https://gerrit.libreoffice.org/20947
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-26 03:58:51 +00:00
Ashod Nakashian
3bd8361c89 loolwsd: more cleanups and logging
Change-Id: I23859849af2d7a3411bd4df57916b4166a17c3b5
Reviewed-on: https://gerrit.libreoffice.org/20946
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-26 03:57:47 +00:00
Ashod Nakashian
7053091c0e loolwsd: support for views
Change-Id: I9447d97612589efd0e85e30977b80ab720b81702
Reviewed-on: https://gerrit.libreoffice.org/20945
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-26 03:57:21 +00:00
Ashod Nakashian
da23160ed1 loolwsd: misc cleanups
Change-Id: I85cdd017ef5b483d34a2aa7e7a2b0c112cbf6e00
Reviewed-on: https://gerrit.libreoffice.org/20933
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-25 03:33:03 +00:00
Ashod Nakashian
c52a19c9bf loolwsd: Prevent CPU hogging when pipe breaks
Change-Id: Iec42dbb64354630911a2c555ad55fd6a905db9b8
Reviewed-on: https://gerrit.libreoffice.org/20932
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-25 03:32:48 +00:00
Ashod Nakashian
8464651655 loolwsd: Better logging
Color logging in console, tracing and streaming,
and converted cout to proper logging.

Change-Id: I515b8f8a40f8fa6763536b85c7632e3bb36673ee
Reviewed-on: https://gerrit.libreoffice.org/20931
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-25 03:32:33 +00:00
Ashod Nakashian
f8f7eb9ccc loolwsd: misc cleanups
Change-Id: I0e2f497c7527e18ec4524e0f52b920f1e30853fa
Reviewed-on: https://gerrit.libreoffice.org/20930
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-25 03:30:41 +00:00
Ashod Nakashian
f58ac9b33c loolwsd: logging cleanup and improvements
Change-Id: I7afa49ac7573efe768ceaad416da908134497107
Reviewed-on: https://gerrit.libreoffice.org/20929
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-25 03:30:20 +00:00
Ashod Nakashian
a06247fa5d loolwsd: Log level and warnings
Log level can be set from LOOL_LOGLEVEL
environment variable (values are those
supported by Poco::Logger::setLevel).

Added warning logging via warn function.

Change-Id: I450511d5132893b93391b287fa5b3d6f522f4744
Reviewed-on: https://gerrit.libreoffice.org/20928
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-25 03:30:03 +00:00
Ashod Nakashian
37c7f2f325 loolwsd: fixes to loolmap
Change-Id: I58ce3dbbd6bbd1e3eb860ba6c3044ba4a61e281d
Reviewed-on: https://gerrit.libreoffice.org/20909
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:23:48 +00:00
Henry Castro
9d7fbec138 loolwsd: Merged improved lifecycle prototype
Enabled the broker and kit processes.

Change-Id: I9afedbccac35732ffe846494cae8135d306e6311
Reviewed-on: https://gerrit.libreoffice.org/20907
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:23:40 +00:00
Ashod Nakashian
ea0ddcf738 loolwsd: Nominal logger and fixes
Nominal logging interface and a fix to using Poco
Application from LOOLKit, which is not a Poco App,
which caused core dump.

Logs now include process name.
Added logs to strategic places and some cleanups.

Change-Id: Ib7dcc4f1033dddf7c87cd2e786a91f5b482fb312
Reviewed-on: https://gerrit.libreoffice.org/20906
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:23:10 +00:00
Henry Castro
ef9313e3a9 loolwsd: deligating to loolbroker and loolkit
Change-Id: I8499540630373a1bee12a5f58fca3ed701ff6404
Reviewed-on: https://gerrit.libreoffice.org/20904
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:22:22 +00:00
Ashod Nakashian
ab5253ba1e loolwsd: Refactored the PRNG
Moved the PRNG into utility namespace and interface
that internally manages seeding (once per process)
and thread-safety.

Change-Id: I78f0ef2c3a01aa6c6aefc8e4b07f3802f2421c68
Reviewed-on: https://gerrit.libreoffice.org/20901
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:18:16 +00:00
Henry Castro
1bd85bc641 loolwsd: merged loolmap
Change-Id: I43845ce5f45c01a67db32ab136ad96b70bc31217
Reviewed-on: https://gerrit.libreoffice.org/20908
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:11:44 +00:00
Henry Castro
2c1e44d218 loolwsd: LOOLBroker process added
Change-Id: Ia7332761766026599b8ef415652874371938d311
Reviewed-on: https://gerrit.libreoffice.org/20903
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:11:23 +00:00
Henry Castro
4af013e87e loolwsd: LOOLKit process added
Change-Id: I91e8a131b4959a78e43b29faede477d39150c97c
Reviewed-on: https://gerrit.libreoffice.org/20902
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:10:50 +00:00
Henry Castro
03f33c71d9 loolwsd: Multiple views in ChildProcessSession
Change-Id: I07359c97acc1e5e48dbbd35dc21ed08471c0697e
Reviewed-on: https://gerrit.libreoffice.org/20899
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:10:13 +00:00
Henry Castro
e0241b1825 loolwsd: Added remove_if to MessageQueue
Change-Id: If4e72796eb39ee66e7604cf67688329fc94d9539
Reviewed-on: https://gerrit.libreoffice.org/20900
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:09:48 +00:00
Henry Castro
4a5277cb95 loolwsd: merged systemplate-setup
Change-Id: Id066b02e405246d6a0a268aa1b29e09cd7730642
Reviewed-on: https://gerrit.libreoffice.org/20905
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:09:24 +00:00
Henry Castro
961f853d6d loolwsd: Added FIFO utils.
Change-Id: Ifc4e3dafce669c615d5f0d156227f31fcf959936
Reviewed-on: https://gerrit.libreoffice.org/20896
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Henry Castro <hcastro@collabora.com>
2015-12-23 17:06:57 +00:00
Ashod Nakashian
30e1bbba14 loolwsd: const and cleanups
Change-Id: I2fff14407c35a3c6119f44fbee1b4c458b7eac16
Reviewed-on: https://gerrit.libreoffice.org/20897
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:06:26 +00:00
Henry Castro
2d375f3eba loolwsd: FIFO
Change-Id: I4694e45ab8006e8287011000bc5e2797bc9ecd48
Reviewed-on: https://gerrit.libreoffice.org/20898
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-23 17:05:37 +00:00