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

driverAttributes_getDriverId does not return DriverId

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.0.1-incubating, 1.0.0-incubating
    • 1.0.0-incubating
    • None

    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

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

            Dates

              Created:
              Updated:
              Resolved: