| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
... to cover files with invalid XML. Since WARNINGs interfere with the
test, we suppress them when testmode is on.
https://bugs.freedesktop.org/show_bug.cgi?id=40675
https://bugs.freedesktop.org/show_bug.cgi?id=89595
|
|
|
|
|
| |
Reviewed-by: Guillaume Desmottes
(cherry picked from commit a4103cf87192a7e57d1b762438f53cef3c3e61fa)
|
|
|
|
|
|
|
| |
Let libxml2 try and recover on parse error instead to avoid crashes in
case logs can't be parsed fully.
Works around https://bugs.freedesktop.org/show_bug.cgi?id=40675
|
| |
|
|
|
|
| |
Not needed for now but will be for 1.0
|
|
|
|
|
|
| |
It doesn't make sense to use the account opaque ID as 'self id'.
Fix fdo#69814.
|
|
|
|
|
|
| |
It's not that clear how to fix this for now.
https://bugs.freedesktop.org/show_bug.cgi?id=69797
|
|
|
|
|
|
|
|
| |
The code example in log-walker.c was wrong as get_valid_accounts() is
(transfer container). dup_valid_accounts() is (transfer full) so it's correct
now.
https://bugs.freedesktop.org/show_bug.cgi?id=69797
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=54814
|
|
|
|
|
|
|
|
|
|
|
|
| |
My commit eaefb26 introduced a regression: by assuming that any class
that implements add_event is writable, logs were being written to the
legacy Empathy location.
By splitting the legacy location handling into a subclass, we can
override add_event to un-implement it and make the subclass read-only,
as well as removing special cases from the XML store itself.
Thanks to Debarshi Ray for catching this!
|
|
|
|
|
| |
By consistently using the wrapper function rather than calling our
implementation directly, subclassing won't break.
|
|
|
|
|
|
|
| |
log_store_xml_get_name() makes the same Empathy vs. TpLogger decision as
the test_mode path was making. Since the log store's name is used to
find the real directory, it also seems better to use the same code path
in the test suite.
|
|
|
|
|
|
|
|
|
|
| |
This ensures that the TplLogEventFilter is always run from the same
thread which invoked the walker. This is implemented by keeping track
of skipped events in the history instead of silently ignoring them
within the LogIters. This has the nice side effect that we do not need
to run the filter while rewinding.
Fixes: https://bugs.freedesktop.org/54270
|
|
|
|
|
| |
Given that _tpl_log_store_get_name exists, there's really no reason to
have a property as well.
|
|
|
|
|
|
| |
For all log stores except the Xml one, this is always set to the same
thing. For the Xml one, the name of the store depends entirely on the
value of empathy-legacy.
|
|
|
|
|
| |
Again, it's meaningless to have this be a writeable construct-only
property—a store is either readable or it's not.
|
|
|
|
|
|
| |
This property was defined by the interface to be readwrite, but this
doesn't make any sense: if the object implements the add_event method,
then it is writable, and if not, it doesn't.
|
|
|
|
| |
Fixes: https://bugs.freedesktop.org/53345
|
|
|
|
| |
Fixes: https://bugs.freedesktop.org/41772
|
| |
|
|
|
|
|
| |
This include a API break in the unstable Call code. Code using the
unstable call log feature will need porting.
|
| |
|
|
|
|
|
| |
Use empty strings where a given string cannot be known
due to a NULL sender or actor.
|
| |
|
|
|
|
|
|
|
|
|
| |
log-store-xml:
* store/save edit-timestamp rather than original-timestamp
* Also don't let the edit timestamp override the timestamp for where messages
are saved (as was the case for original-message).
text-event:
* s/original/edit/
|
| |
|
| |
|
|
|
|
| |
The current code would always insert after the first element.
|
| |
|
|
|
|
|
|
|
| |
* Store/parse original-timestamp prop in xml.
* Put the event in the file pointed to by original-timestamp
* If it doesn't exist, fall back to the message's timestamp.
|
|
|
|
|
| |
I expect "timestamp" to be a uint64 or a GDateTime, so I'm renaming this
variable to avoid confusing name collisions later.
|
|
|
|
|
| |
* factor out log_store_xml_format_timestamp, since we need it for
original-timestamp as well
|
|
|
|
| |
oops: inverted boolean expression
|
|
|
|
| |
event_queue_replace_and_supersede: correct type and s/l/index/
|
|
|
|
|
|
| |
> > + date = g_date_time_new_from_unix_local (timestamp);
>
> Timestamp in TplEvent are always UTC.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* update to private _tpl_text_event_add_supersedes
Also addresses:
> I think you don't have to call g_hash_table_insert() here ? And same in next
> for loop.
Actually, this is for the chained supersedes use-case, but yeah: it's wrong.
Fixed it when I implemented event_queue_replace_and_supersede (),
and fixed the comment on superseded_links
> Use g_list_previous().
> Is that suppose to be funny ?
(apparently it wasn't funny; fixed)
> Your leaking a reference on the dumm_event. Maybe you want to rework you
> _add_supersedes() method into something like link_supersedes() that would take
> ownership ?
Created method event_queue_replace_and_supersede with similar feel
to event_queue_insert_sorted_after.
This is something that I wanted to do, but couldn't see a clean way to do.
Fixing the semantics of superseded_links made this easier.
> You don't check anymore if parsing event worked. A corrupted XML file will
> cause your code to crash.
>
*_parse_*() will currently only return NULL if g_object_new() does, but you're
right: if someone changes this behaviour later, I should be resilient to it.
Fixed.
|
|
|
|
|
|
|
|
|
|
| |
Addresses:
> > + if (token_str != NULL)
> You might want to use TPL_STR_EMPTY() instead.
> We should be a little more robust, and ignore supersedes if there is no
> token.
I assume that by this, you mean only record it if message-token also exists?
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should support "b supersedes a ; c supersedes a" as well as
"b supersedes a ; c supersedes b"
Also, the list of returned events should only contain the most recent
version (for backwards compat with dumb log viewers, as suggested by
sjoerd).
* make a event_queue_add_text_event responsible for adding the event to
the returned gqueue (replacing the event it supersedes as needed).
* use a GHashTable of {token: place to put message} for already edited
messages, and check that first, then walk through the queue (starting
at the most recent event) trying to find it.
* add a dummy event if none can be found.
|
|
|
|
|
|
| |
Like g_queue_insert_sorted, but with the shortcut of not having to search
from the beginning of the queue all the time, and the simplification
of knowing that we are always dealing with TplEvents.
|
| |
|
|
|
|
| |
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
| |
|
| |
|
|
|
|
|
| |
This should improve significantly the performance as we not longer have to
look inside the file.
|
| |
|
| |
|
| |
|
| |
|
| |
|