dahdi_handle_device: Auto assign only the device being added.
authorShaun Ruffell <sruffell@digium.com>
Thu, 9 Jan 2014 00:14:05 +0000 (18:14 -0600)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Mon, 20 Jan 2014 17:22:57 +0000 (19:22 +0200)
Eliminates trying to add spans multiple times as seen below:

    'dahdi_handle_device'[21993]: add: /devices/dynamic:loc:1
    'dahdi_handle_device'[21991]: add: /devices/dynamic:loc:0
    'dahdi_handle_device'[22001]: auto-assign /sys/bus/dahdi_devices/devices/dynamic:loc:0
    'dahdi_handle_device'[22001]: auto-assign /sys/bus/dahdi_devices/devices/dynamic:loc:1
    'dahdi_handle_device'[21999]: auto-assign /sys/bus/dahdi_devices/devices/dynamic:loc:0
    'dahdi_handle_device'[21999]: auto-assign /sys/bus/dahdi_devices/devices/dynamic:loc:1
    kernel: [ 3348.312534] dahdi_devices dynamic:loc:0: local span 1 is already assigned span 1
    kernel: [ 3348.312552] dahdi_devices dynamic:loc:1: local span 1 is already assigned span 2

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

dahdi_handle_device

index d475511..34af0c3 100755 (executable)
@@ -69,7 +69,7 @@ add)
                        dahdi_span_assignments add "/sys$DEVPATH"
                else
                        # No configuration. No order guaranteed
-                       dahdi_span_assignments auto
+                       dahdi_span_assignments auto "/sys$DEVPATH"
                fi
        ) 2>&1 < /dev/null | $LOGGER &
        ;;