Summary: | _get_dates returns the same date twice if there are both call and text events | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Debarshi Ray <rishi.is> |
Component: | logger | Assignee: | Telepathy bugs list <telepathy-bugs> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | git master | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
log-store-xml: Filter out duplicate dates in get_dates
log-store-xml: Filter out duplicate dates in get_dates |
Description
Debarshi Ray
2012-08-10 14:17:23 UTC
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.