[Xfce4-commits] <xfce4-weather-plugin:master> Fix astro data update spamming webservice.

Harald Judt noreply at xfce.org
Tue Dec 18 17:14:02 CET 2012


Updating branch refs/heads/master
         to 87414ef544385febfb901f971d01c8411d96101c (commit)
       from 73e199a5005a5a55fede1e83d17976e4cab732f8 (commit)

commit 87414ef544385febfb901f971d01c8411d96101c
Author: Harald Judt <h.judt at gmx.at>
Date:   Sun Dec 16 01:18:15 2012 +0100

    Fix astro data update spamming webservice.

 panel-plugin/weather.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
index a555cf7..cfd9c9d 100644
--- a/panel-plugin/weather.c
+++ b/panel-plugin/weather.c
@@ -569,7 +569,6 @@ update_handler(plugin_data *data)
         update_icon(data);
     }
 
-    schedule_next_wakeup(data);
     return FALSE;
 }
 
@@ -587,7 +586,7 @@ schedule_next_wakeup(plugin_data *data)
     }
 
     now_tm = *localtime(&now_t);
-    future_t = time_calc_day(now_tm, 1);
+    future_t = time_calc_day(now_tm, 3);
     diff = difftime(future_t, now_t);
     SCHEDULE_WAKEUP_COMPARE(data->astro_update->next,
                             "astro data download");
@@ -606,9 +605,10 @@ schedule_next_wakeup(plugin_data *data)
                                     "sunset icon change");
     }
 
-    /* next wakeup time could not be calculated, so force it */
+    /* next wakeup time could not be calculated, so force it to not
+       miss any updates*/
     if (diff < 0) {
-        diff = 5;
+        diff = 0;
         data->next_wakeup_reason = "forced";
     }
 


More information about the Xfce4-commits mailing list