diff options
author | Bastien Nocera <hadess@hadess.net> | 2019-03-09 12:35:00 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2019-03-12 13:25:42 +0000 |
commit | 91ba8289fadb75154ae1f1ff96535565e7c79c7a (patch) | |
tree | 416f352e94c3812e7357e00ddf6d75f105fc6a97 | |
parent | cfc0e2c45f8bc2dcee4c59523cfc5da69b619b24 (diff) | |
download | libgweather-91ba8289fadb75154ae1f1ff96535565e7c79c7a.tar.gz |
owm: Add more debug to owm parsing
-rw-r--r-- | libgweather/weather-owm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libgweather/weather-owm.c b/libgweather/weather-owm.c index 61b7d87..2fdd32f 100644 --- a/libgweather/weather-owm.c +++ b/libgweather/weather-owm.c @@ -395,6 +395,8 @@ owm_finish (SoupSession *session, gpointer user_data) { GWeatherInfo *info = GWEATHER_INFO (user_data); + GWeatherInfoPrivate *priv; + WeatherLocation *loc; if (!SOUP_STATUS_IS_SUCCESSFUL (msg->status_code)) { /* forecast data is not really interesting anyway ;) */ @@ -405,6 +407,11 @@ owm_finish (SoupSession *session, return; } + priv = info->priv; + loc = &priv->location; + g_debug ("owm data for %lf, %lf", loc->latitude, loc->longitude); + g_debug ("%s", msg->response_body->data); + parse_forecast_xml (info, msg->response_body); _gweather_info_request_done (info, msg); } @@ -437,6 +444,7 @@ owm_start_open (GWeatherInfo *info) #endif url = g_strdup_printf (TEMPLATE, latstr, lonstr); + g_debug ("owm_start_open, requesting: %s", url); #undef TEMPLATE |