Compare commits

..

12 Commits

Author SHA1 Message Date
Tzafrir Cohen
3693ad815b xpp_fxloader: handle empty span-type.conf
If we have /etc/dahdi/span-types.conf but it doesn't have any
line, we should avoid using the option -S to astribank_hexload.
Fix the test for this.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
(cherry picked from commit 77730a9059)
2015-06-04 16:08:25 -05:00
Tzafrir Cohen
e9a04c7a50 no astribank_is_starting with hotplug asterisk
Don't run the final astribank_is_starting if asterisk is hotpluggable.

Likewise, if there's no xpp_order file, waiting is pointless as the hook
can't count Astribanks.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
(cherry picked from commit 3f55dd78de)
2015-06-04 16:08:25 -05:00
Tzafrir Cohen
b37bcfb3b4 astribank_hook: remove useless 'time'
* 'time' was added here for debugging and never actually needed.
* It actually causes a minor bashism issue.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
(cherry picked from commit 283f01bd67)
2015-06-04 16:08:25 -05:00
Oron Peled
42f3e120ff xpp: waitfor_xpds: Always remove Astribank semaphore
If we waited -- no Astribanks are "in initialization"

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
(cherry picked from commit 631d32680f)
2015-06-04 16:08:25 -05:00
Oron Peled
48bb9e54f7 xpp/astribank_hook: remove Astribank initialization
If this is the last seen Astribank

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
(cherry picked from commit 44fe560f3b)
2015-06-04 16:08:25 -05:00
Oron Peled
605914d817 xpp: waitfor_xpds: documentation
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
(cherry picked from commit 1a78b71fac)
2015-06-04 16:08:25 -05:00
Oron Peled
bcd25eea36 xpp: can use modern Asterisk hotplug support
* New asynchronous behavior is used only when two conditions are met:
  - Finding new $ASTERISK_SUPPORTS_DAHDI_HOTPLUG=yes in /etc/dahdi/init.conf
    This should be set only when Asterisk support hotplug and configured
    to use it (no_failed_channels==1).
  - DAHDI auto_assign_spans==0

* Adapt /usr/share/dahdi/astribank_hook:
  - Refactor old twinstar behavior into functions
  - Add new behavior in a function (just enable the Asrribank watchdog)
  - Call the correct function.

* Adapt init script:
  If asynchronous behavior is on, don't wait for all Astribanks to
  finish initialization (it's enough that we saw all/some of them)

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
(cherry picked from commit f11b937659)
2015-06-04 16:08:25 -05:00
Oron Peled
c7dc48e534 xpp: waitfor_xpds: assume astribank_is_starting exists
It's in the same package (dahdi-tools) for a long time

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
(cherry picked from commit cd6083b6ce)
2015-06-04 16:08:25 -05:00
Oron Peled
0ae73f0497 xpp: waitfor_xpds: expansion error with no ABs
Fix an exansion error in case there were no Astribanks on the system.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
(cherry picked from commit 0eb77e626e)
2015-06-04 16:08:25 -05:00
Oron Peled
93f85f7e6f xpp: astribank_is_starting: improve '-v' output
Do print a message if no semaphore exists. It means that either there
are no Astribanks, or existing Astribanks were already initialized.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
(cherry picked from commit 2e1c15baa3)
2015-06-04 16:08:25 -05:00
Russ Meyerriecks
e14958442d tonezone: Fix regression in Australian tone patch
Initialize db to 1.0 instead of doing it in a few, but not all, logic contexts.

Reported-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
(cherry picked from commit 094bb2c1e8)
2015-06-04 16:08:25 -05:00
Oron Peled
f3b18f7832 xpp: revert USB "clear_halt" change and better overrides.
Why:
 * Doing "clear_halt" is normally the right thing to do on startup.
 * The original observed problem is better fixed via USB bios settings.
 * Defaulting to no "clear_halt" cause more problems on other platform
   combinations (hardware/kernel).

The change:
 * We now reverted to do "clear_halt" by default.
 * The XTALK_OPTIONS may now contain either "use-clear-halt" (the default)
   or "no-use-clear-halt" to override for debugging/testing.

Original commit: ca7c04e9cb

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
(cherry picked from commit 9aee76a3a5)
2015-06-04 16:08:25 -05:00

View File

@@ -319,8 +319,9 @@ load_fw_device() {
if [ "$pri_spec_wildcard" != '' ]; then
debug "ECHO($dev_short): Found definitions for wildcard -- $pri_spec_wildcard"
fi
pri_spec=`echo "$pri_spec_wildcard $pri_spec" | tr -s ' \t\n' ','`
if [ "$pri_spec" != '' ]; then
pri_spec_params=""
if [ "$pri_spec$pri_spec_wildcard" != '' ]; then
pri_spec=`echo "$pri_spec_wildcard $pri_spec" | tr -s ' \t\n' ','`
pri_spec_params="-S $pri_spec"
debug "ECHO($dev_short): pri_spec_params='$pri_spec_params'"
fi