Assume "no fix" when the "fix" data structure is NULL release-1.1-2
authorDr. Johann Pfefferl <pfefferl@gmx.net>
Wed, 23 Jun 2010 13:33:25 +0000 (15:33 +0200)
committerDr. Johann Pfefferl <pfefferl@gmx.net>
Wed, 23 Jun 2010 13:33:25 +0000 (15:33 +0200)
debian/changelog
gps-tracker.c

index ccf7036..c19d08b 100644 (file)
@@ -1,3 +1,9 @@
+gps-tracker (1.1-2) unstable; urgency=low
+
+  * Assume "no fix" when the "fix" data structure is NULL
+
+ -- Dr. Johann Pfefferl <pfefferl@gmx.net>  Wed, 23 Jun 2010 15:32:39 +0200
+
 gps-tracker (1.1-1) unstable; urgency=low
 
   * The recorded waypoints are put at the end of the gpx file
index 252cd84..9dc33cc 100644 (file)
@@ -79,7 +79,6 @@ static void write_gpx_footer(AppData *app_data)
   g_fprintf(fp, "</trkseg>\n</trk>\n");
   g_fprintf(fp, app_data->waypoint_block_str->str);
   g_fprintf(fp, "</gpx>\n");
-  g_string_truncate(app_data->waypoint_block_str, 0);
 }
 
 static void cb_wp_set_btn (GtkWidget * w, AppData * data)
@@ -124,6 +123,7 @@ static void cb_start_stop (GtkWidget * w, AppData * data)
     gtk_widget_set_sensitive(GTK_WIDGET(data->wp_set_btn), FALSE);
   }
   g_string_truncate(data->wp_marker_str, 0);
+  g_string_truncate(app_data->waypoint_block_str, 0);
 }
 
 static void cb_file_save (GtkWidget * w, AppData * data)
@@ -278,6 +278,10 @@ static void on_gps_device_changed (LocationGPSDevice *device, gpointer data)
       }
     }
   }
+  else {
+    app_data->has_fix = FALSE;
+    app_data->last_device_status = LOCATION_GPS_DEVICE_STATUS_NO_FIX;
+  }
        
        //g_print ("Satellites in view: %d\n", device->satellites_in_view);
        //g_print ("Satellites in use: %d\n", device->satellites_in_use);