Looking at log_store_xml_get_dates it is obvious that there is no filtering in place to ensure that each date in the returned list is unique. Interestingly, the test-log-manager test case only checks _get_dates for text events.
Created attachment 65391 [details] [review] log-store-xml: Filter out duplicate dates in get_dates
Comment on attachment 65391 [details] [review] log-store-xml: Filter out duplicate dates in get_dates Review of attachment 65391 [details] [review]: ----------------------------------------------------------------- ::: telepathy-logger/log-store-xml.c @@ +998,5 @@ > + } > + else > + l = m; > + } > + Here I would improve the style using something like (not tested): /* Filter out duplicate dates in-place */ for (l = dates; g_list_next (l) != NULL; l = g_list_next (l)) { GList *next = g_list_next (l); if (g_date_compare ((GDate *) next->data, (GDate *) l->date) == 0) { g_date_free (GDate *) next->data; l = g_list_delete_link (l, next); } }
Created attachment 65694 [details] [review] log-store-xml: Filter out duplicate dates in get_dates Yes, what you suggest looks better. Here it is in git format-patch format, attributed to you. Works for me, passes the test suite. The test cases for the walker will fail without this fix.
commit 27cfd34a0476aeb34673d26e96f2dbb23684c300 Author: Nicolas Dufresne <nicolas.dufresne@collabora.com> Date: Fri Aug 10 16:52:11 2012 +0200 log-store-xml: Filter out duplicate dates in get_dates Fixes: https://bugs.freedesktop.org/53345
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.