[Phonehome-commits] r72 - trunk/client/src

pamadio at garage.maemo.org pamadio at garage.maemo.org
Sun Oct 19 11:25:00 EEST 2008


Author: pamadio
Date: 2008-10-19 11:24:58 +0300 (Sun, 19 Oct 2008)
New Revision: 72

Modified:
   trunk/client/src/dsk_mgr.c
Log:
time_t stuff

Modified: trunk/client/src/dsk_mgr.c
===================================================================
--- trunk/client/src/dsk_mgr.c	2008-10-19 08:04:33 UTC (rev 71)
+++ trunk/client/src/dsk_mgr.c	2008-10-19 08:24:58 UTC (rev 72)
@@ -61,6 +61,7 @@
 gchar* xmlrpc_password=NULL;
 gchar* xmlrpc_server=NULL;
 
+ConIcProxyMode proxy_mode=CON_IC_PROXY_MODE_NONE ;
 
 typedef struct {
   double lat;
@@ -607,13 +608,14 @@
 location_changed (LocationGPSDevice *device, gpointer gps_data)
 {
   //GSList * gps_locations = (GSList *) gps_data;
-  static time_t last_gps_fix=NULL;
-  
-  if(last_gps_fix!=NULL && difftime(time(NULL),last_gps_fix)<60){
+  static time_t last_gps_fix=0;
+  time_t now;
+  now=time(NULL);
+  if(last_gps_fix!=0 && difftime(now,last_gps_fix)<60){
     g_print("Last gpx fix too recent, not including this fix\n");
     return;
   }
-  
+  last_gps_fix=time(NULL);
   gps_info *cur_info;
 
   g_print ("Latitude: %.2f\nLongitude: %.2f\nAltitude: %.2f\n",



More information about the Phonehome-commits mailing list