[libgweather/wip/hadess/more-debug: 7/7] owm: Add more debug to owm parsing
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/wip/hadess/more-debug: 7/7] owm: Add more debug to owm parsing
- Date: Tue, 12 Mar 2019 13:26:18 +0000 (UTC)
commit 91ba8289fadb75154ae1f1ff96535565e7c79c7a
Author: Bastien Nocera <hadess hadess net>
Date: Sat Mar 9 12:35:00 2019 +0100
owm: Add more debug to owm parsing
libgweather/weather-owm.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]