[libgweather/wip/hadess/more-debug] yrno: Add more debug to yrno parsing
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/wip/hadess/more-debug] yrno: Add more debug to yrno parsing
- Date: Sat, 9 Mar 2019 11:35:29 +0000 (UTC)
commit 497fa955e8bc02f90509e00f1762d93ec5c58ded
Author: Bastien Nocera <hadess hadess net>
Date: Sat Mar 9 12:31:44 2019 +0100
yrno: Add more debug to yrno parsing
libgweather/weather-yrno.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/libgweather/weather-yrno.c b/libgweather/weather-yrno.c
index 4cc897e..b86866b 100644
--- a/libgweather/weather-yrno.c
+++ b/libgweather/weather-yrno.c
@@ -389,6 +389,8 @@ yrno_finish_new (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 ;) */
@@ -399,6 +401,11 @@ yrno_finish_new (SoupSession *session,
return;
}
+ priv = info->priv;
+ loc = &priv->location;
+ g_debug ("yrno data for %lf, %lf", loc->latitude, loc->longitude);
+ g_debug ("%s", msg->response_body->data);
+
parse_forecast_xml_new (info, msg->response_body);
_gweather_info_request_done (info, msg);
@@ -425,6 +432,7 @@ yrno_start_open (GWeatherInfo *info)
g_ascii_dtostr (lonstr, sizeof(lonstr), RADIANS_TO_DEGREES (loc->longitude));
url = g_strdup_printf("https://api.met.no/weatherapi/locationforecast/1.9/?lat=%s;lon=%s", latstr,
lonstr);
+ g_debug ("yrno_start_open, requesting: %s", url);
message = soup_message_new ("GET", url);
_gweather_info_begin_request (info, message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]