From: Florian Eckert Date: Thu, 26 Sep 2024 08:16:13 +0000 (+0200) Subject: modemmanager: add missing interface argument to function modemmanager_check_state X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=cdda99899697598c17ff341470254530f4d4a026;p=feed%2Fpackages.git modemmanager: add missing interface argument to function modemmanager_check_state The variable interface is used in the sub-function 'modemmanager_check_state'. However, this is not an argument of the function and so the global value is used. Addding the variable as an function call argument fixes this. Signed-off-by: Florian Eckert --- diff --git a/net/modemmanager/files/lib/netifd/proto/modemmanager.sh b/net/modemmanager/files/lib/netifd/proto/modemmanager.sh index a0bc232aad..0827c27136 100644 --- a/net/modemmanager/files/lib/netifd/proto/modemmanager.sh +++ b/net/modemmanager/files/lib/netifd/proto/modemmanager.sh @@ -355,8 +355,9 @@ modemmanager_check_state_locked() { modemmanager_check_state() { local device="$1" - local modemstatus="$2" - local pincode="$3" + local interface="$2" + local modemstatus="$3" + local pincode="$4" local state @@ -486,7 +487,7 @@ proto_modemmanager_setup() { } echo "modem available at ${modempath}" - modemmanager_check_state "$device" "${modemstatus}" "$pincode" + modemmanager_check_state "$device" "$interface" "${modemstatus}" "$pincode" [ "$?" -ne "0" ] && return 1 # always cleanup before attempting a new connection, just in case