[Gpredict-svn] SF.net SVN: gpredict:[202] trunk/src/tle-update.c
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
From: <fi...@us...> - 2009-03-20 14:06:32
|
Revision: 202 http://gpredict.svn.sourceforge.net/gpredict/?rev=202&view=rev Author: fillods Date: 2009-03-20 14:06:21 +0000 (Fri, 20 Mar 2009) Log Message: ----------- proper error checking when downloading tle files Modified Paths: -------------- trunk/src/tle-update.c Modified: trunk/src/tle-update.c =================================================================== --- trunk/src/tle-update.c 2009-03-18 10:05:03 UTC (rev 201) +++ trunk/src/tle-update.c 2009-03-20 14:06:21 UTC (rev 202) @@ -418,7 +418,6 @@ gchar *curfile; gchar *locfile; GFile *file; - gboolean error = FALSE; gdouble fraction,start=0; GFile *outfile; GDir *dir; @@ -491,11 +490,12 @@ g_file_copy (file, outfile, G_FILE_COPY_NONE, NULL, NULL, NULL, &err); - if (error) { + if (err != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error fetching %s (%s)"), __FUNCTION__, curfile, err->message); - g_clear_error (&err); + g_clear_error (&err); + err = NULL; } else { sat_log_log (SAT_LOG_LEVEL_MSG, @@ -552,8 +552,9 @@ /* send an error message */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error opening %s (%s)"), - __FUNCTION__, dir, err->message); + __FUNCTION__, cache, err->message); g_clear_error (&err); + err = NULL; } else { /* delete files in cache one by one */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |