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 <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert
2024-09-26 10:16:13 +02:00
committed by Robert Marko
parent 64bd9e9d08
commit cdda998996

View File

@@ -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