Uploaded image for project: 'Celix'
  1. Celix
  2. CELIX-50

driverAttributes_getDriverId does not return DriverId

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.0.1-incubating, 1.0.0-incubating
    • Fix Version/s: 1.0.0-incubating
    • Component/s: None
    • Labels:

      Description

      I had some problems, when I was trying to publish two devices from one service and attach two drivers of the same device category to it.

      Well, I figured out, that the deviceManager_attachAlgorithm function was not able to remove the already installed drivers from the manager->drivers list cause driverAttributes_getDriverId always returned CELIX_ENOMEM.

      Taking a look at the code (driverAttributes_getDriverId in device_access/device_access/private/src/driver_attributes.c), I found:

      [...]
      char *id_prop = properties_get(properties, "DRIVER_ID")

      if (id_prop) {
      status = CELIX_ENOMEM;
      }
      [...]

      which should probably be:

      [...]
      char *id_prop = properties_get(properties, "DRIVER_ID")

      if (id_prop == NULL) {
      status = CELIX_ENOMEM;
      }
      [...]

      I would be glad if you shortly can confirm that, so I will create a patch.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bjoern.petri Bjoern Petri
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: