From 5dddff9939e112ed563f4e3e465c7457ee95a7f3 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Sat, 27 Jan 2018 21:56:14 -0200 Subject: [PATCH] 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;