]> err.no Git - mapper/commitdiff
Fix track_add arguments
authorKaj-Michael Lang <milang@tal.org>
Sun, 27 Jan 2008 09:12:57 +0000 (11:12 +0200)
committerKaj-Michael Lang <milang@tal.org>
Sun, 27 Jan 2008 09:12:57 +0000 (11:12 +0200)
src/cb.c
src/maemo-osso.c
src/map.c

index 494b0f424e24c40e0c8a6425d8718209b68b54e6..44c8ed7544f8acd1a909bbff6ea320746ca037f5 100644 (file)
--- a/src/cb.c
+++ b/src/cb.c
@@ -444,7 +444,7 @@ if ((_enable_gps = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action)))) {
        if (_gps->io.conn > RCVR_OFF)
                gps_conn_set_state(_gps, RCVR_OFF);
        gps_disconnect(_gps);
-       track_add(0, FALSE);
+       track_add(NULL, FALSE);
        _speed_excess=FALSE;
 }
 if (_enable_gps==FALSE)
@@ -1049,7 +1049,8 @@ unit2latlon(_gps->data.unitx, _gps->data.unity, _gps->data.lat, _gps->data.lon);
 
 /* Move mark to new location. */
 map_refresh_mark();
-track_add(time(NULL), FALSE);
+_gps->data.time=time(NULL);
+track_add(&_gps->data, FALSE);
 
 return TRUE;
 }
index 6606062fecda7f76f20456fcb7e1780370c56392..9521c3447f20071e01790fa8a72fa8c165d71c46 100644 (file)
@@ -74,7 +74,7 @@ if (state->system_inactivity_ind) {
                                gconf_client_clear_cache(gconf_client);
                                gps_conn_set_state(_gps, RCVR_OFF);
                                gps_disconnect(_gps);
-                               track_add(0, FALSE);
+                               track_add(NULL, FALSE);
                                /* Pretend autoroute is in progress to avoid download. */
                                if (_autoroute_data.enabled)
                                        _autoroute_data.in_progress = TRUE;
index fb2a3251bf18165aaf683e9ec84e42e636b8c582..88348c7e8a7f2540e7650af38a1b94da8ac6d9cc 100644 (file)
--- a/src/map.c
+++ b/src/map.c
@@ -1096,7 +1096,8 @@ _gps->data.unity=y2unit((gint) (y + 0.5));
 unit2latlon(_gps->data.unitx, _gps->data.unity, _gps->data.lat, _gps->data.lon);
 _gps->data.speed=20.f;
 gps_data_integerize(&_gps->data);
-track_add(time(NULL), FALSE);
+_gps->data.time=time(NULL);
+track_add(&_gps->data, FALSE);
 map_refresh_mark();
 }