From f6f94c9fbd3f988e063409ba6a66c04d32cf95fc Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 19 Mar 2015 12:44:34 -0400 Subject: Narrow the driver-type-reversion logic a bit. All regression tests pass. --- libgpsd_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libgpsd_core.c') diff --git a/libgpsd_core.c b/libgpsd_core.c index 6811b663..d4fdfec0 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -1392,7 +1392,8 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) */ /*@-mustfreeonly@*/ if (!STICKY(session->device_type) - && session->last_controller != NULL) + && session->last_controller != NULL + && STICKY(session->last_controller)) { session->device_type = session->last_controller; gpsd_log(&session->context->errout, LOG_PROG, -- cgit v1.2.1