[Bug 32477] Log Call events
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Mar 24 23:37:29 CET 2011
https://bugs.freedesktop.org/show_bug.cgi?id=32477
--- Comment #16 from Nicolas Dufresne <nicolas.dufresne at collabora.co.uk> 2011-03-24 15:37:29 PDT ---
(In reply to comment #14)
> +++ b/telepathy-logger/log-store-xml.c
> + if (!regex)
>
> if (regex != NULL)
>
> + if (event != NULL)
> + events = g_list_append (events, event);
>
> Just thought we could do g_list_prepend() as an optimization, and if order
> matters (not sure it does), g_list_reverse at the end of the function. We can
> probably do this in more places.
Most cases switching to prepend was fine except in XML store where I've used a
GQueue.
>
> + This implementation is not correct on purpose to ensure a constent time
> + of execution. See bug #35549 for more details.
>
> constant (in a commit message)
Fixed.
>
> + /* FIXME This method is exposed synchronously in the log manager API and
> + * thus we need a constant time reply. The implementation is not 100%
> + * correct here, but provide this constant time. See fd.o but #35549. */
>
> s/but/bug/
>
> + Make regex mathing in file ...
>
> matching (in a commit message)
Fixed.
>
> + if (type_mask & (TPL_EVENT_MASK_TEXT | TPL_EVENT_MASK_CALL)
> + || log_store_xml_match_in_file (filename, regex))
>
> I think this should be &&
Not exactly, I was trying to optimize the case all supported types are selected
to avoid reading the file. But this code is not right, I've fixed it. Also, I
just notice the filename was not an absolute path, the broken optimization was
hiding this bug, I also fixed that.
>
> +++ b/tests/dbus/test-log-manager.c
> + /* We got 6 events in old Empathy and 6 in new TpLogger storage */
> + g_assert_cmpint (g_list_length (fixture->ret), ==, 10);
>
> Hmm. 6 + 6 = 12, not 10. Something is wrong or just confusing there.
Just grepped and got 10, 4 in Empathy, 4 in TpLogger and 2 in Pidgin, so I'm
fixing doc.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the telepathy-bugs
mailing list