diff options
-rw-r--r-- | driver_geostar.c | 2 | ||||
-rw-r--r-- | driver_tsip.c | 2 | ||||
-rw-r--r-- | libgpsd_core.c | 21 |
3 files changed, 13 insertions, 12 deletions
diff --git a/driver_geostar.c b/driver_geostar.c index 9b771409..a0bfeb83 100644 --- a/driver_geostar.c +++ b/driver_geostar.c @@ -90,8 +90,6 @@ static bool geostar_detect(struct gps_device_t *session) fd_set fdset; struct timeval to; - gpsd_report(LOG_PROG, "Probing GeoStar\n"); - myfd = session->gpsdata.gps_fd; /* request firmware revision and look for a valid response */ diff --git a/driver_tsip.c b/driver_tsip.c index c88699f7..14aaae2f 100644 --- a/driver_tsip.c +++ b/driver_tsip.c @@ -76,8 +76,6 @@ static bool tsip_detect(struct gps_device_t *session) char old_parity; unsigned int old_stopbits; - gpsd_report(LOG_PROG, "Probing TSIP\n"); - old_baudrate = session->gpsdata.dev.baudrate; old_parity = session->gpsdata.dev.parity; old_stopbits = session->gpsdata.dev.stopbits; diff --git a/libgpsd_core.c b/libgpsd_core.c index 88b37854..27c8f852 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -310,14 +310,19 @@ int gpsd_activate(struct gps_device_t *session) /*@ -mustfreeonly @*/ for (dp = gpsd_drivers; *dp; dp++) { - (void)tcflush(session->gpsdata.gps_fd, TCIOFLUSH); /* toss stale data */ - if ((*dp)->probe_detect != NULL - && (*dp)->probe_detect(session) != 0) { - gpsd_report(LOG_PROG, "probe found %s driver...\n", - (*dp)->type_name); - session->device_type = *dp; - gpsd_assert_sync(session); - goto foundit; + if ((*dp)->probe_detect != NULL) { + gpsd_report(LOG_PROG, "Probing \"%s\" driver...\n", + (*dp)->type_name); + (void)tcflush(session->gpsdata.gps_fd, TCIOFLUSH); /* toss stale data */ + if ((*dp)->probe_detect(session) != 0) { + gpsd_report(LOG_PROG, "Probe found \"%s\" driver...\n", + (*dp)->type_name); + session->device_type = *dp; + gpsd_assert_sync(session); + goto foundit; + } else + gpsd_report(LOG_PROG, "Probe not found \"%s\" driver...\n", + (*dp)->type_name); } } /*@ +mustfreeonly @*/ |