aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-core/uemis-downloader.c
AgeCommit message (Collapse)Author
2015-12-06Uemis downloader: handle yet another corner caseGravatar Dirk Hohndel
If we looking for dive details and are trying to guess the offset between object_id and logfilenr, we need to treat logfilenr 0 as special - it means we read past the end of the list of stored dives and need to walk backwards. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-03Uemis downloader: ignore leading junk in the dataGravatar Dirk Hohndel
One user's debug log shows valid data, only not in the format we've seen before (with the response starting with '{'). Instead he gets a repeat of the second word in the response to processSync prepended to the expected output. So let's skip the data until the first '{'. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-03Uemis downloader: don't leak memoryGravatar Dirk Hohndel
Don't just clear out the buffer pointer, free the memory, first. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-15simple spelling changesGravatar Stephen Hemminger
Fix obvious spelling mistakes in comments (and one error message). Yes, this is trivial but I saw one while reviewing some of the code and after that decided to run code through some tools. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09Uemis downloader: more debug outputGravatar Dirk Hohndel
Once again compile time enabled. I guess it would be nice to turn this into a logfile (just like we have with the libdivecomputer backends). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09Uemis downloader: recover if dive info is completely missingGravatar Dirk Hohndel
I user had a Uemis that had a dive log entry for a certain internal id but no dive info for it. This appeared to be one of those dreaded dives when the Uemis decides to start a dive at the end of a flight and then stays in dive mode until it runs out of battery. Anyway, if we see a number above and a number below, just give up and move on. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09Uemis downloader: deal with a whole block of deleted divesGravatar Dirk Hohndel
If every dive in a download block from the Uemis was deleted we kept downloading that same block of dives. With this we remember how far we got even if the dives ended up being deleted. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08Uemis downloader: print some information on stderr in verbose modeGravatar Dirk Hohndel
On the Mac the info on the download dialog isn't shown. So print it on stderr as well when in verbose mode. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Move all core-functionality to subsurface-coreGravatar Tomaz Canabrava
And adapt a new CMakeLists.txt file for it. On the way I've also found out that we where double-compilling a few files. I've also set the subsurface-core as a include_path but that was just to reduce the noise on this commit, since I plan to remove it from the include path to make it obligatory to specify something like include "subsurface-core/dive.h" for the header files. Since the app is growing quite a bit we ended up having a few different files with almost same name that did similar things, I want to kill that (for instance Dive.h, dive.h, PrintDive.h and such). Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>