From: Kaj-Michael Lang Date: Sun, 27 Jan 2008 09:12:57 +0000 (+0200) Subject: Fix track_add arguments X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ef0f1b375995a9f5c2ddbe57d4f2c44dffb18a4;p=mapper Fix track_add arguments --- diff --git a/src/cb.c b/src/cb.c index 494b0f4..44c8ed7 100644 --- 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; } diff --git a/src/maemo-osso.c b/src/maemo-osso.c index 6606062..9521c34 100644 --- a/src/maemo-osso.c +++ b/src/maemo-osso.c @@ -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; diff --git a/src/map.c b/src/map.c index fb2a325..88348c7 100644 --- 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(); }