Hi, On Samstag, 16. Juni 2018 01:16:14 CEST Dirk Hohndel wrote:
> What other bugs do we know of for either desktop or mobile? Not a bug, but perhaps remove the cryptic debug messages from libdivecomputer.c? I know I was confused. Proposed patch attached. After the release, could we perhaps try to finally get PR#799 out (or trashed)? I have access to a Windows-PC, but I need feedback / suggestions. Berthold
>From c1b89465957c2014ea5a2a593d1423e82dd82da0 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger <bstoe...@mail.tuwien.ac.at> Date: Sat, 16 Jun 2018 10:50:30 +0200 Subject: [PATCH] libdc interface: remove debug messages Don't spill supported transports as error message to the user. Signed-off-by: Berthold Stoeger <bstoe...@mail.tuwien.ac.at> --- core/libdivecomputer.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index 3443886b6..499428fc8 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -1212,19 +1212,6 @@ char *transport_string[] = { "BLE" }; -static char *transport_to_string(int t) -{ - static char buf[1024]; - buf[0] = '\0'; - for (int i = 0; i < 6; i++) { - if (t & (1<<i)) { - strncat(buf, transport_string[i], 1024); - strncat(buf, " ", 1024); - } - } - return buf; -} - /* * Get the transports supported by us (as opposed to * the list of transports supported by a particular @@ -1264,8 +1251,6 @@ unsigned int get_supported_transports(device_data_t *data) supported &= ~(DC_TRANSPORT_BLUETOOTH | DC_TRANSPORT_BLE); } } - report_error("get_supported_transports returns"); - report_error(transport_to_string(supported)); return supported; } @@ -1277,8 +1262,6 @@ dc_status_t divecomputer_device_open(device_data_t *data) unsigned int transports, supported; transports = dc_descriptor_get_transports(descriptor); - report_error("dc_descriptor_get_transports"); - report_error(transport_to_string(transports)); supported = get_supported_transports(data); transports &= supported; -- 2.17.1
_______________________________________________ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface