summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dwgo.cpp38
1 files changed, 23 insertions, 15 deletions
diff --git a/src/dwgo.cpp b/src/dwgo.cpp
index 623273d..cae2e4e 100644
--- a/src/dwgo.cpp
+++ b/src/dwgo.cpp
@@ -2,9 +2,9 @@
* File: wdgo.cpp *
* Version: 0.3 *
* Date: 20080508 *
- * Author: Gaspar Fernández (helyo@totaki.com) *
+ * Author: Gaspar Fern�ndez (helyo@totaki.com) *
* *
- * Copyright (C) 2008 Gaspar Fernández *
+ * Copyright (C) 2008 Gaspar Fern�ndez *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -28,7 +28,7 @@
*
* Change History:
* Date (D.M.Y) Author Modification
- * 08.05.2008 Gaspar Fernández Initial release
+ * 08.05.2008 Gaspar Fern�ndez Initial release
*
********************************************************************************/
@@ -126,7 +126,7 @@ typedef struct
* *
* Change History: *
* Date Author Modification *
- * 20101106 Gaspar Fernández Added error status *
+ * 20101106 Gaspar Fern�ndez Added error status *
*************************************************************/
void fetchWeatherInfo(Wth_vector *weathers)
{
@@ -135,17 +135,25 @@ void fetchWeatherInfo(Wth_vector *weathers)
for (unsigned int k=0; k<wths->weathers.size(); k++) {
localtemp *current = wths->weathers.at(k);
wths->loaded=false; // This will make animated bar disappear when loaded
-
- if (!current->getInfo())
- {
- verbsth(VERB_WARNING, "Don't have access to the server... I'll try later");
- break;
- }
- else if (current->error)
- {
- verbsth(VERB_WARNING, "Got an error while retrieving information.");
- break;
- }
+ bool result = current->getInfo();
+
+ fprintf(stderr,
+ "getInfo=%d error=%d loaded=%d station=%s\n",
+ result ? 1 : 0,
+ current->error,
+ current->loaded ? 1 : 0,
+ current->metar.c_str());
+
+ if (!result) {
+ verbsth(VERB_WARNING,
+ "Don't have access to the server... I'll try later");
+ break;
+ }
+ else if (current->error) {
+ verbsth(VERB_WARNING,
+ "Got an error while retrieving information.");
+ break;
+ }
}
// wths->loaded=allok; // All loaded
}