Compare commits

...

5 Commits

Author SHA1 Message Date
Shaun Ruffell
a18878fbe8 Use autotagged externals
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/tags/2.5.0-rc2@10078 17933a7a-c749-41c5-a318-cba88f637d49
2011-07-21 21:58:37 +00:00
Shaun Ruffell
c7e93f4d1f Importing files for 2.5.0-rc2 release.
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/tags/2.5.0-rc2@10077 17933a7a-c749-41c5-a318-cba88f637d49
2011-07-21 21:58:24 +00:00
Shaun Ruffell
d14276d2d8 Creating tag for the release of dahdi-tools-2.5.0-rc2
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/tags/2.5.0-rc2@10076 17933a7a-c749-41c5-a318-cba88f637d49
2011-07-21 21:57:52 +00:00
Russ Meyerriecks
505621a31c patlooptest: Ignore the first buffered event
Fixes the feature introduced in r9909 that allows patlooptest to
monitor channel events. Patlooptest was reporting events that we don't
care about, prior to reading from the channel. This fix ignore the first
event read on a channel and reports all subsequent events properly.

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10071 17933a7a-c749-41c5-a318-cba88f637d49
2011-07-21 17:29:34 +00:00
Tzafrir Cohen
f2152481e9 astribank_hook: startup lock and more
* Silently exit right away if user did not set XPP_HOTPLUG_DAHDI.
* Only one Astribank should be allowed to run the startup script:
  - Protect that section with a "lock" (symlinking a file).
  - Sadly we can't rely on /run and may have to wait for a r/w file-system.
  - And thus even this waiting needs to be run in the background
    as to not hold udev.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10068 17933a7a-c749-41c5-a318-cba88f637d49
2011-07-21 13:40:18 +00:00
4 changed files with 1669 additions and 16 deletions

1
.version Normal file
View File

@@ -0,0 +1 @@
2.5.0-rc2

1624
ChangeLog Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -167,6 +167,7 @@ int main(int argc, char *argv[])
char * device;
int opt;
int oldstyle_cmdline = 1;
unsigned int event_count = 0;
/* Parse the command line arguments */
while((opt = getopt(argc, argv, "b:s:t:r:v?h")) != -1) {
@@ -248,9 +249,14 @@ int main(int argc, char *argv[])
write_again:
res = write(fd,outbuf,bs);
if (res != bs) {
printf("W: Res is %d: %s\n", res, strerror(errno));
ioctl(fd, DAHDI_GETEVENT, &x);
printf("Event: %d\n", x);
if (ELAST == errno) {
ioctl(fd, DAHDI_GETEVENT, &x);
if (event_count > 0)
printf("Event: %d\n", x);
++event_count;
} else {
printf("W: Res is %d: %s\n", res, strerror(errno));
}
goto write_again;
}

View File

@@ -27,6 +27,10 @@ else
dahdi_conf="/etc/dahdi"
fi
if [ "$XPP_HOTPLUG_DAHDI" != yes ]; then
exit 0
fi
export XPPORDER_CONF="$dahdi_conf/xpp_order"
if [ ! -r "$XPPORDER_CONF" ]; then
(
@@ -62,26 +66,24 @@ matched_devices() {
NUM_WANTED=`clean_lines | sed '/^$/d' | wc -l`
NUM_GOOD=`matched_devices | wc -l`
LOCK="/var/lock/twinstar_startup"
start_dahdi() {
script=/etc/init.d/dahdi
if [ "$XPP_HOTPLUG_DAHDI" = yes ]; then
echo "Starting $script."
"$script" start | logger -i -t "$script"
status=$?
echo "Status($script): $status"
else
echo "$0: Skip($script): No XPP_HOTPLUG_DAHDI=yes in /etc/dahdi/init.conf"
exit 0
fi
echo "Starting $script."
"$script" start | logger -i -t "$script"
status=$?
echo "Status($script): $status"
if [ -x "$dir/twinstar_hook" ]; then
"$dir/twinstar_hook"
fi
# Finished astribanks
echo "Removing semaphore"
astribank_is_starting -v -r
rm -f "$LOCK"
}
#echo "$0: $ACTION($XBUS_NAME)" | $LOGGER
case "$ACTION" in
add)
;;
@@ -90,9 +92,28 @@ remove)
online)
echo "$ACTION($XBUS_NAME): $NUM_GOOD/$NUM_WANTED from $XPPORDER_CONF" | $LOGGER
if [ "$NUM_GOOD" -eq "$NUM_WANTED" ]; then
echo "START-DAHDI: Total $NUM_GOOD online." | $LOGGER
# Fork services
start_dahdi < /dev/null 2>&1 | $LOGGER &
(
# Delay the initialization of the Astribank until the filesystem
# is mounted read-write:
test_file="/var/lock/astribank_test_file"
for i in `seq 1 20`; do
if touch $test_file 2> /dev/null; then
rm -f $test_file
break
else
echo "$0: [$i] - Failed writing '$test_file'...waiting" | $LOGGER
sleep 1;
fi
done
if ln -s "$XBUS_NAME" "$LOCK"; then
echo "START-DAHDI: Total $NUM_GOOD online." | $LOGGER
# Fork services
start_dahdi < /dev/null 2>&1 | $LOGGER
else
echo "$0: Was started: $(ls -l $LOCK)" | $LOGGER
fi
) < /dev/null 2>&1 | $LOGGER &
fi
;;
offline)
@@ -100,8 +121,9 @@ offline)
if [ "$NUM_GOOD" -eq 0 ]; then
echo "All Astribanks offline" | $LOGGER
if [ -x "$dir/twinstar_hook" ]; then
"$dir/twinstar_hook"
"$dir/twinstar_hook" || :
fi
rm -f "$LOCK"
fi
;;
*)