From 6a6e60c9bb608555bd80bb7fc4de1b986ae68462 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 31 Aug 2018 09:54:08 -0700 Subject: [PATCH] garmin: don't emit fake device info and vendor event The libdivecomputer model is just broken - we don't know this information before parsing the dive. But let's not emit a fake event that generates bogus serial number data. I thought I'd be able to fill it in, but this really isn't reasonable, so disable it entirely for now. Signed-off-by: Linus Torvalds --- src/garmin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/garmin.c b/src/garmin.c index 4c8c92f..4a731e1 100644 --- a/src/garmin.c +++ b/src/garmin.c @@ -247,6 +247,7 @@ garmin_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback, void progress.current = 0; device_event_emit (abstract, DC_EVENT_PROGRESS, &progress); +#if 0 // Emit a device info event. dc_event_devinfo_t devinfo; devinfo.model = 0; @@ -259,6 +260,7 @@ garmin_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback, void vendor.data = "Garmin"; vendor.size = 6; device_event_emit (abstract, DC_EVENT_VENDOR, &vendor); +#endif file = dc_buffer_new (16384); if (file == NULL) {