[Xfce4-commits] <xfce4-weather-plugin:master> Improve debug code in xml_weather_clean().

Harald Judt noreply at xfce.org
Mon Dec 10 22:36:01 CET 2012


Updating branch refs/heads/master
         to 86b750772d763836dd80584eaa25b0cb40a404c0 (commit)
       from 9b5cdfd2d8af76fa304f2f56590513033922833d (commit)

commit 86b750772d763836dd80584eaa25b0cb40a404c0
Author: Harald Judt <h.judt at gmx.at>
Date:   Mon Dec 10 22:34:26 2012 +0100

    Improve debug code in xml_weather_clean().

 panel-plugin/weather-parsers.c |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/panel-plugin/weather-parsers.c b/panel-plugin/weather-parsers.c
index 10f6c57..d6e543e 100644
--- a/panel-plugin/weather-parsers.c
+++ b/panel-plugin/weather-parsers.c
@@ -45,9 +45,6 @@
     (xmlStrEqual(node->name, (const xmlChar *) type))
 
 
-extern gboolean debug_mode;
-
-
 /*
  * This is a portable replacement for the deprecated timegm(),
  * copied from the man page and modified to use GLIB functions.
@@ -712,17 +709,11 @@ xml_weather_clean(xml_weather *wd)
         if (G_UNLIKELY(timeslice == NULL))
             continue;
         if (difftime(now_t, timeslice->end) > DATA_EXPIRY_TIME) {
-            if (debug_mode) {
-                gchar *start, *end;
-                start = weather_debug_strftime_t(timeslice->start);
-                end = weather_debug_strftime_t(timeslice->end);
-                weather_debug("Removing expired timeslice [%s - %s].",
-                              start, end);
-                g_free(start);
-                g_free(end);
-            }
+            weather_debug("Removing expired timeslice:");
+            weather_dump(weather_dump_timeslice, timeslice);
             xml_time_free(timeslice);
             g_array_remove_index(wd->timeslices, i--);
+            weather_debug("Remaining timeslices: %d", wd->timeslices->len);
         }
     }
 }


More information about the Xfce4-commits mailing list