Every number hours will fetch the latest version data.
Change-Id: I082d9ebb674058c6509dbd33537f24ec7cd9228b
Signed-off-by: Henry Castro <hcastro@collabora.com>
For each tile, the wire-id will grow incrementally for each key-frame
or delta appended; so we can tell which deltas to send.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ic5f201d23273c37eed232c5932b9da854e80d06a
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Also corrects the counting of number of active
sessions when broadcasting messages.
Change-Id: I5ab5995ed2cbc18b215542d0b2c9568957fd6a3a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
The static instances cause a lot of grief
when they aren't called in the correct order.
Worse, when we are cleaning up, we don't
even initialize some of them (Admin, for one).
This means that a normal exit will destroy
what isn't created, in some cases (Admin) it
will even force creating instances when we
are destroying others.
This avoid all this by simply exiting bluntly.
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit 231fae4ebd990cb344143759cbdfa19c4f30d4f2)
Change-Id: I6a9443ca5ab999ed6ca1d27314136472cfc6ddb6
As Tor noted on IRC, this was forgotten when the actual protocol
commands were introduced.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I548ac73348bceb469484ce934f7548ddb4091b63
we added AllHosts to give admin the err log that host is not in alias_groups but now as we removed the host list entries from configuration we don't need that log
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I8b5e9e6b7df7df59befb496c12966c7ddc60c707
This went wrong when the forward-port of commit
b96e8b7c77 (wsd: correct use the exit code
from UnitWSD, 2021-11-29) didn't adapt the string to the updated
filename.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ica8047dc05dedf9e075663f405dea89913cf789a
This way, there is only one entry point for all the remote
configuration, and the remote_font_config does not have to be specified
in coolwsd.xml, in case the remote_config JSON specifies that.
Signed-off-by: Jan Holesovsky <kendy@collabora.com>
Change-Id: I857bab3d300ddb5c0c3df0a9f62eda20f43c3ff7
To signal SIGUSR2 to parent to notify
that the server is ready to accept connections,
and begin the tests.
Change-Id: Ie936217243aa7a2e836f3d45cb508ede13fae8c5
Signed-off-by: Henry Castro <hcastro@collabora.com>
we preserve original reason,
so setting default reason means always using default reason
and ignoring any other reason
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I837a13a129aa759a319406affc6e89425bf31361
Since we have the ability to quarantine documents,
we should save to disk even (or especially) when
we don't have a storage instance. This way we
can at least recover the document.
Although it's not clear when we will not have
a storage instance, if at all, separating saving
from the storage state is reasonable.
Change-Id: Ifa51ed3229424b567df8218b201ef914226db947
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Change the syntax of the remote font configuration JSON file. Now for
each font we can also have a "stamp" property that can be a time stamp
or whatever other random string that gets changed (by some automated
mechanism provided by system integrators) whenever the corresponding
font file has changed. If a such is provided we don't poll the ETag of
the font file but re-download it whenever its stamp in the JSON file
has changed.
The remote font configuration file now should look like this:
{
"kind": "fontconfiguration",
"server": "My pretty server name for admin console",
"fonts": [
{
"uri": "http://localhost/tml/MS33558.ttf"
},
{
"uri": "http://localhost/tml/SmoochSans-VariableFont_wght.ttf",
"stamp": "foo0"
},
{
"uri": "http://localhost/tml/B612-Regular.ttf",
"stamp": "foo3"
},
{
"uri": "http://localhost/tml/xxx.ttf"
}
]
}
Where the value of the "stamp" properties can be any non-empty
string. The JSON file is checked once a minute. If it has changed it
is re-downloaded, and if the stamp of some font has changed, that font
file is re-downloaded.
When a font file is re-downloaded it is stored in a new file each
time. The old file is not removed as that will cause problems in
ForKit and Kit processes.
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ib04b77e0fb9e1d9c33afdc14a5fed3ad0b12a409
Since the json parser logs an error when the
entry isn't found, parsing both LOOLStatusCode
and COOLStatusCode almost guarantees at least
one ERR log entry. We should only fallback
when COOLStatusCode isn't found and avoid
erroring when we got what we wanted.
Change-Id: Icace964820c250f4ceba98281e57cb7c29fbd118
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
coolwsd_fuzzer predates actual fuzzing
with libfuzzer and is currently unsused.
Change-Id: Id095b165943ba14dbf525ddc607ad329f5d952d4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
The coolwsd.xml file can now contain a URI of a JSON file on some
server that contains URIs of fonts. These fonts are downloaded to the
coolwsd server. Just like the remote configuration thing, the URIs are
checked once a minute and the JSON or the fonts mentioned in it are
re-downloaded if their contents has changed.
If a font has been removed from the JSON file then the corresponding
downloaded could be removed, too. But there is no way to remove it
from core without restarting the whole COOL server, so we don't
bother.
We need to put the font in such a place so that its pathname is the
same both in the ForKit process (outside any chroot jail) and in a Kit
process (inside its own jail(), because even if it is in the ForKit
process that we call the LO core vcl API to load a "temporary" font,
code elsewhere in LO core re-opens the font file later, naturally
using the same pathname, when it is needed (see
FreetypeFontFile::Map() in vcl/unx/generic/glyphs/freetype_glyphcache.cxx).
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: If78058ddff5ed05c7a82d7ea465a7a414fd0d861
The new helper corrects inconsistencies in
detecting writable sessions and improves
readability.
A writable session is one that is either
not read-only or can change comments
(in PDFs, which are otherwise read-only
documents).
Also fixes a bug in reusing the last editor
session to save. The condition should've
been !isReadOnly(), since sessions used
for saving cannot be read-only. Indeed,
the last editor couldn't possibly have
been read-only by definition.
Change-Id: I9860be287057050eca692568d43f77371964f80b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
The inWaitDisconnected state is mutually exclusive
with isViewLoaded. So that check was completely
useless. Instead, we want to check if the session
is still connected to the client, since isViewLoaded
implies that we aren't disconnected from the Kit.
This moves this logic to a helper in ClientSession
and streamlines the implementation of
DocumentBroker::countActiveSessions().
Change-Id: I06459708e4c59566aa2e2f1febdfdfe8dd491c35
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
The stop flag may be set through the callbacks
that the poll fires. In particular, errors
during socket plumbing can set the stop flag.
Since this flag is final and immediate, there
is no need to do the normal processing and
check it on the subsequent iteration of the
polling loop. This reduces the wait and we
clean up faster.
When we don't check for the stop condition,
we may end up uploading an extra time.
This is particularly problematic with
always_save_on_exit, which forces the
upload. Since it sets the stop flag
after it uploads, we should detect it as
soon as possible and no do extra poll.
The change is guarded by EnableExperimental
to avoid unexpected behavior.
Change-Id: I67815e70383caabaf29aa4921e0c421c3e5ff96c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
In an attempt to reduce the size of Util.{c,h}pp
which has grown to contain all sorts of unrelated
helpers, we move StringVector helpers into
the StringVector.{c,h}pp files.
This makes the code better organized.
Change-Id: I152f341606807ae66253415b951bc9f89b09df57
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
In NDEBUG builds, where there is no assert macro,
we log at debug level to still find issues without
adding noise to the logs.
However, in ENABLE_DEBUG builds not only do we assert
but we also log at error level.
Change-Id: I773dbf7bb2b459e505e73d91505b13d8ed2ed6d8
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
fix: in regex, escaping special character fails to find host of the alias
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I19bfacc5e45af26832cb8c6a7d249e0c7de56624
- first host is by default allowed without any condition
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Iacca38868f06a417cbb99984e2dac1eef727df6e
Ensure that rendersearchresult: is terminated, and identified as binary.
Change-Id: I84e83c63351cd0aac0923bf7c833b14c1be2c051
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
... and make Welcome dialog optional for COOL
config: add welome url parameter
Signed-off-by: Henry Castro <hcastro@collabora.com>
config: add feedback url parameter
Signed-off-by: Henry Castro <hcastro@collabora.com>
config: add infobar-url parameter
Signed-off-by: Henry Castro <hcastro@collabora.com>
welcome: fix unhandled exceptions
Signed-off-by: Henry Castro <hcastro@collabora.com>
welcome: preprocess welcome file
added welcome-message.html
Signed-off-by: Henry Castro <hcastro@collabora.com>
welcome: clean up code related to vex welcome
Signed-off-by: Henry Castro <hcastro@collabora.com>
--enable-welcome-message is not necessary, when we specify a welcome URL, then it is enabled, otherwise it's user configurable
Signed-off-by: Andras Timar <andras.timar@collabora.com>
remove the unused welcome config settings
Signed-off-by: Andras Timar <andras.timar@collabora.com>
remove unused define ENABLE_FEEDBACK
Signed-off-by: Andras Timar <andras.timar@collabora.com>
do not install/package fallback welcome dialog, when welcome feature is not configured
Signed-off-by: Andras Timar <andras.timar@collabora.com>
remove welcome-message.html
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I20aa6220362018b63aaebd114b2b661561823fbb