aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-10-19 10:08:56 +0000
committerJohn Crispin <blogic@openwrt.org>2015-10-19 10:08:56 +0000
commit4e0383d3c94676f922c6937b586641159d578d35 (patch)
tree574c447a1f66d4d19bd6a6d9ec670dfc9b3bdb28
parent90b56ccfced309831385e50d484664ec38ddfec5 (diff)
downloadmaster-187ad058-4e0383d3c94676f922c6937b586641159d578d35.tar.gz
master-187ad058-4e0383d3c94676f922c6937b586641159d578d35.tar.bz2
master-187ad058-4e0383d3c94676f922c6937b586641159d578d35.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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47213 3c298f89-4303-0410-b956-a3cf2f4a3e73
-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() {