]> err.no Git - mapper/blobdiff - src/maemo-osso.c
Add header and cast properly.
[mapper] / src / maemo-osso.c
index e79413643b9716b9edaacf0c1c9a1b14a8f66dd8..9f6354bfdf35388822f1dfa4cc6a0f952541278e 100644 (file)
@@ -29,8 +29,6 @@
 
 #include <config.h>
 
-#define _GNU_SOURCE
-
 #include <glib.h>
 #include <gtk/gtk.h>
 
@@ -46,7 +44,6 @@
 #include "map-download.h"
 #include "route.h"
 #include "mapper-types.h"
-#include "bt.h"
 #include "gps.h"
 #include "settings-gconf.h"
 #include "settings.h"
@@ -72,12 +69,12 @@ if (state->system_inactivity_ind) {
        if (_must_save_data)
                _must_save_data = FALSE;
        else {
-               if (_conn_state > RCVR_OFF) {
+               if (_gps->io.conn > RCVR_OFF) {
                        if (gconf_client_get_bool(gconf_client, GCONF_KEY_DISCONNECT_ON_COVER, NULL)) {
                                gconf_client_clear_cache(gconf_client);
-                               gps_conn_set_state(RCVR_OFF);
-                               rcvr_disconnect();
-                               track_add(0, FALSE);
+                               gps_conn_set_state(_gps, RCVR_OFF);
+                               gps_disconnect(_gps);
+                               track_add(NULL);
                                /* Pretend autoroute is in progress to avoid download. */
                                if (_autoroute_data.enabled)
                                        _autoroute_data.in_progress = TRUE;
@@ -92,11 +89,11 @@ if (state->system_inactivity_ind) {
        config_save();
        _must_save_data = TRUE;
 } else if (state->memory_low_ind) {
-       /* Drop any memory we can.. */
+       poi_icon_hash_clear();
 } else {
-       if (_conn_state == RCVR_OFF && _enable_gps) {
-               gps_conn_set_state(RCVR_DOWN);
-               rcvr_connect_later();
+       if (_gps->io.conn == RCVR_OFF && _enable_gps) {
+               gps_conn_set_state(_gps, RCVR_DOWN);
+               gps_connect_later(_gps);
                if (_autoroute_data.enabled)
                        _autoroute_data.in_progress = TRUE;
        }