Changeset 2226776 in subsurface


Ignore:
Timestamp:
Jan 17, 2017, 9:57:40 AM (3 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
dbf1390
Parents:
e1ee577
git-author:
Dirk Hohndel <dirk@…> (01/17/17 09:53:56)
git-committer:
Dirk Hohndel <dirk@…> (01/17/17 09:57:40)
Message:

Smart Trak tool compile fix

In commit 70e2404492bb ("Stop accessing the internals of
dc_descriptor_t") the structure definition of the libdivecomputer
descriptor was removed from Subsurface and replaced with accessor
functions. This adapts the Smart Trakl import tool to use the same
accessor functions, which allows it to compile again in current master.

Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • smtk-import/smartrak.c

    ra71224b r2226776  
    608608        dev_data->descriptor = get_data_descriptor(data_model, dc_fam);
    609609        if (dev_data->descriptor) {
    610                 dev_data->vendor = copy_string(dev_data->descriptor->vendor);
    611                 dev_data->product = copy_string(dev_data->descriptor->product);
     610                dev_data->vendor = copy_string(dc_descriptor_get_vendor(dev_data->descriptor));
     611                dev_data->product = copy_string(dc_descriptor_get_product(dev_data->descriptor));
    612612                dev_data->model = smtk_concat_str(dev_data->model, "", "%s %s", dev_data->vendor, dev_data->product);
    613613                return DC_STATUS_SUCCESS;
     
    626626                                     unsigned char *prf_buffer, int prf_length, unsigned char *compl_buf)
    627627{
    628         switch (dev_data->descriptor->type) {
     628        switch (dc_descriptor_get_type(dev_data->descriptor)) {
    629629        case DC_FAMILY_UWATEC_ALADIN:
    630630        case DC_FAMILY_UWATEC_MEMOMOUSE:
    631                 compl_buf[3] = (unsigned char) dev_data->descriptor->model;
     631                compl_buf[3] = (unsigned char) dc_descriptor_get_model(dev_data->descriptor);
    632632                memcpy(compl_buf+hdr_length, prf_buffer, prf_length);
    633633                break;
     
    709709                        prf_buffer = mdb_ole_read_full(mdb, col[coln(PROFILE)], &prf_length);
    710710                        if (prf_length > 0) {
    711                                 if (devdata->descriptor->type == DC_FAMILY_UWATEC_ALADIN || devdata->descriptor->type == DC_FAMILY_UWATEC_MEMOMOUSE)
     711                                if (dc_descriptor_get_type(devdata->descriptor) == DC_FAMILY_UWATEC_ALADIN || dc_descriptor_get_type(devdata->descriptor) == DC_FAMILY_UWATEC_MEMOMOUSE)
    712712                                        hdr_length = 18;
    713713                                compl_buffer = calloc(hdr_length+prf_length, sizeof(char));
Note: See TracChangeset for help on using the changeset viewer.