diff options
author | Salvador Cuñat <salvador.cunat@gmail.com> | 2015-04-04 00:44:01 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-04-04 10:30:16 -0700 |
commit | 0fe21637ad753a87dc0dc4d44564a613b2b693d2 (patch) | |
tree | de030a01ab9fc9d21f57e2c5e8b738c870410cc0 /subsurfacesysinfo.cpp | |
parent | e276ec65ba17e9eeea9625796ae5df96e654f65a (diff) | |
download | subsurface-0fe21637ad753a87dc0dc4d44564a613b2b693d2.tar.gz |
libdivecomputer.c: Split dive_cb() callback in two
dive_cb() needs a defined device to work as it's built for DC download
tasks.
Move part of the functionality of dive_cb() to a new function
libdc_header_parser() which can be used to parse headers from raw data
buffers with no device set.
Obviously dive_cb() will call the new funtion for header parsing too.
Two changes in logic:
1- In parse_gasmixes() set data pointer to NULL. This pointer is passed to the
function, but it's not used. While this data pointer exists in DC import, via
dive_cb(), it doesn't in file import as data has previously been set in the
parser.
2- While parsing gas mixes do not return on rc = DC_STATUS_UNSUPORTED because
it would end our dive parsing just if the device doesn't support gases, which
seems undesirable in both, DC or file import.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurfacesysinfo.cpp')
0 files changed, 0 insertions, 0 deletions