aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/base-files/lib
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-10-19 10:08:56 +0000
committerJohn Crispin <john@openwrt.org>2015-10-19 10:08:56 +0000
commite1d585d99fda52cd6621cb73cd73765a915e2d2f (patch)
tree50afad7f9d02b3be261ea2187e161024cdb1a6ca /target/linux/lantiq/base-files/lib
parent21e1b4163f48a76dd34f35ca6e158f2b4e1aa03e (diff)
downloadupstream-e1d585d99fda52cd6621cb73cd73765a915e2d2f.tar.gz
upstream-e1d585d99fda52cd6621cb73cd73765a915e2d2f.tar.bz2
upstream-e1d585d99fda52cd6621cb73cd73765a915e2d2f.zip
lantiq: Synchronize access to the DSL command pipe
Whenever two processes were executing different commands at the same time then one of the commands sometimes got the response of the other command. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> SVN-Revision: 47213
Diffstat (limited to 'target/linux/lantiq/base-files/lib')
-rwxr-xr-xtarget/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh
index dbeb344cde..22e65cb148 100755
--- a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh
+++ b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh
@@ -12,8 +12,10 @@ fi
#
dsl_cmd() {
killall -0 ${XDSL_CTRL} && (
+ lock /var/lock/dsl_pipe
echo "$@" > /tmp/pipe/dsl_cpe0_cmd
cat /tmp/pipe/dsl_cpe0_ack
+ lock -u /var/lock/dsl_pipe
)
}
dsl_val() {