From: Kaj-Michael Lang Date: Tue, 18 Mar 2008 17:11:32 +0000 (+0200) Subject: Don't clear gps address, zero gps data. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04bc0031921cee6049c2c3caf70a2539d8fed5be;p=mapper Don't clear gps address, zero gps data. --- diff --git a/src/gps.c b/src/gps.c index 8bc3def..718dd55 100644 --- a/src/gps.c +++ b/src/gps.c @@ -115,21 +115,14 @@ gps_clear(Gps *gps) { g_assert(gps); gps->io.fd=-1; -gps->io.address=NULL; gps->io.conn=RCVR_OFF; -gps->io.nmea=NULL; gps->io.nmea_cnt=0; +memset(&gps->data, 0, sizeof(gps->data)); gps->data.fix=FIX_NOFIX; gps->data.lat=60.20; gps->data.lon=22.20; gps->data.satinview=0; gps->data.satinuse=0; -gps->connection_error=NULL; -gps->connection_retry=NULL; -gps->connection_progress=NULL; -gps->update_location=NULL; -gps->update_info=NULL; -gps->update_satellite=NULL; gps_data_integerize(&gps->data); }