modemmanager: add missing mmcli timeout option during ubus call
authorFlorian Eckert <redacted>
Tue, 25 Feb 2025 08:09:07 +0000 (09:09 +0100)
committerFlorian Eckert <redacted>
Tue, 1 Apr 2025 08:08:27 +0000 (10:08 +0200)
The default 'timeout' value is 30 seconds when calling an mmcli action. That
is too long. For this reason, the mmcli 'timeout' option is specified for
calls and the value is set to 10 seconds.

Signed-off-by: Florian Eckert <redacted>
net/modemmanager/Makefile
net/modemmanager/files/usr/libexec/rpcd/modemmanager

index 6fb6539de1ae67de3aa06c6ba739c0307f074982..69d364a767b3ebfccabe88ffb7833f548531b177 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=modemmanager
 PKG_VERSION:=1.22.0
-PKG_RELEASE:=21
+PKG_RELEASE:=22
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git
index 0f0d24a48dc11b71014028d23742bbd555e71020..436ca0a409f8cb3b5b7683c5cbe7bc97d199b3a0 100644 (file)
@@ -12,7 +12,7 @@ local info = {}
 
 function mm_get_modem_bearer(index)
 
-       local command = string.format("/usr/bin/mmcli --bearer=%s --output-json 2>/dev/null", index)
+       local command = string.format("/usr/bin/mmcli --bearer=%s --timeout=10 --output-json 2>/dev/null", index)
 
        local handle = io.popen(command)
        local output = handle:read("*a")
@@ -31,7 +31,7 @@ end
 
 function mm_get_modem_sim(index)
 
-       local command = string.format("/usr/bin/mmcli --sim=%s --output-json 2>/dev/null", index)
+       local command = string.format("/usr/bin/mmcli --sim=%s --timeout=10 --output-json 2>/dev/null", index)
 
        local handle = io.popen(command)
        local output = handle:read("*a")
@@ -50,7 +50,7 @@ end
 
 function mm_get_modem_signal(modem)
 
-       local command = string.format("/usr/bin/mmcli --modem=%s --signal-get --output-json 2>/dev/null", modem)
+       local command = string.format("/usr/bin/mmcli --modem=%s --signal-get --timeout=10 --output-json 2>/dev/null", modem)
 
        local handle = io.popen(command)
        local output = handle:read("*a")
@@ -69,7 +69,7 @@ end
 
 function mm_get_modem_location(modem)
 
-       local command = string.format("/usr/bin/mmcli --modem=%s --location-get --output-json 2>/dev/null", modem)
+       local command = string.format("/usr/bin/mmcli --modem=%s --location-get --timeout=10 --output-json 2>/dev/null", modem)
 
        local handle = io.popen(command)
        local output = handle:read("*a")
@@ -88,7 +88,7 @@ end
 
 function mm_get_modem_status(modem)
 
-       local command = string.format("/usr/bin/mmcli --modem=%s --output-json 2>/dev/null", modem)
+       local command = string.format("/usr/bin/mmcli --modem=%s --timeout=10 --output-json 2>/dev/null", modem)
 
        local handle = io.popen(command)
        local output = handle:read("*a")
@@ -145,7 +145,7 @@ end
 
 function aquire_data_modemmanager()
 
-       local command = string.format("/usr/bin/mmcli --list-modems --output-json 2>/dev/null")
+       local command = string.format("/usr/bin/mmcli --list-modems --timeout=10 --output-json 2>/dev/null")
 
        local handle = io.popen(command)
        local output = handle:read("*a")
git clone https://git.99rst.org/PROJECT