Author: blogic
Date: 2015-10-19 12:08:56 +0200 (Mon, 19 Oct 2015)
New Revision: 47213

Modified:
   trunk/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh
Log:
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 <[email protected]>

Modified: trunk/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh
===================================================================
--- trunk/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh    
2015-10-19 10:08:50 UTC (rev 47212)
+++ trunk/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh    
2015-10-19 10:08:56 UTC (rev 47213)
@@ -12,8 +12,10 @@
 #
 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() {
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to