From cdda99899697598c17ff341470254530f4d4a026 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 26 Sep 2024 10:16:13 +0200 Subject: [PATCH] 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 --- net/modemmanager/files/lib/netifd/proto/modemmanager.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 2.30.2