On Dec 30, 2013, at 2:17 PM, Lutz Vieweg <l...@5t9.de> wrote: > On 12/30/2013 11:12 PM, Dirk Hohndel wrote: >> dive-cb() never being called us your real problem. If that isn't called, we >> don't get dives > > Ouch. I think I got it: > >> if (data->libdc_dump) { >> dc_buffer_t *buffer = dc_buffer_new (0); >> >> rc = dc_device_dump (device, buffer); >> if (rc == DC_STATUS_SUCCESS) { >> FILE* fp = subsurface_fopen(dumpfile_name, "wb"); >> if (fp != NULL) { >> fwrite (dc_buffer_get_data (buffer), 1, >> dc_buffer_get_size (buffer), fp); >> fclose (fp); >> } >> } >> >> dc_buffer_free (buffer); >> } else { >> rc = dc_device_foreach(device, dive_cb, data); >> } > > Obviously, if data->libdc_dump != 0, then > dc_device_foreach(device, dive_cb, data) is never called. > > So by trying to collect useful information on the problem, enabling the > dump, I inadvertedly disabled using the data at all. > > The few cases where the newer version actually worked must have been ones > where I did _not_ activate the dump. > > If that is intentional, please warn people that "dumping" is mutually > exclusive with "using" the data from the DC...
I committed a change right after you first reported this that issues exactly such a warning. And I pointed out to you that those two things are mutually exclusive. If you are running current git, you will be told when enabling the dump that this will prevent you from adding dives to your dive table. /D _______________________________________________ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface