[gnome-calendar] weather-service: Fix debug location
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] weather-service: Fix debug location
- Date: Sun, 28 Jan 2018 00:27:22 +0000 (UTC)
commit 5dddff9939e112ed563f4e3e465c7457ee95a7f3
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Jan 27 21:56:14 2018 -0200
weather-service: Fix debug location
This is tricking us into thinking the code is being
executed when in fact it's falling into the early return.
src/weather/gcal-weather-service.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/weather/gcal-weather-service.c b/src/weather/gcal-weather-service.c
index 99d63d4a..d0e6ea7c 100644
--- a/src/weather/gcal-weather-service.c
+++ b/src/weather/gcal-weather-service.c
@@ -1318,10 +1318,10 @@ gcal_weather_service_run (GcalWeatherService *self,
{
g_return_if_fail (GCAL_IS_WEATHER_SERVICE (self));
- g_debug ("Starting weather service");
+ if (self->location_service_running && self->weather_service_running)
+ return;
- if (self->location_service_running || self->weather_service_running)
- gcal_weather_service_stop (self);
+ g_debug ("Starting weather service");
if (!location)
{
@@ -1363,11 +1363,11 @@ gcal_weather_service_stop (GcalWeatherService *self)
g_return_if_fail (GCAL_IS_WEATHER_SERVICE (self));
- g_debug ("Stop weather service");
-
if (!self->location_service_running && !self->weather_service_running)
GCAL_RETURN ();
+ g_debug ("Stopping weather service");
+
self->location_service_running = FALSE;
self->weather_service_running = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]