modemmanager: do not set proto_notify_error on teardown
authorFlorian Eckert <fe@dev.tdt.de>
Fri, 21 Jul 2023 10:56:34 +0000 (12:56 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Mon, 24 Jul 2023 07:41:51 +0000 (09:41 +0200)
If on teardown the 'proto_notify_error' is set to 'MM_TEARDOWN_IN_PROGRESS',
then an error which is set on 'setup' is not visible in the ubus
network.interface.<iface> status output.

{
  "up": false,
  "pending": false,
  "available": true,
  "autostart": false,
  "dynamic": false,
  "proto": "modemmanager",
  "data": {
  },
  "errors": [
    {
      "subsystem": "dualsim",
      "code": "MM_TEARDOWN_IN_PROGRESS"
    }
  ]
}

It alway shows the code 'MM_TEARDWON_IN_PROGRESS'!

By removing the line 'proto_notify_error "${interface}" MM_TEARDOWN_IN_PROGRESS'
in teardown, the last error is show in the proto stack from setup.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
net/modemmanager/Makefile
net/modemmanager/files/modemmanager.proto

index aa141ad736d588f680f3dc2f0e3cd6c46fdfcebe..df2e1e71b1f3490edda5e247085c054f0d8d7f86 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=modemmanager
 PKG_SOURCE_VERSION:=1.20.6
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git
index 239148798030dbc1c1e4eec2754bc559720aff8f..d2483207f3081a1e5dfd8b4416a2b461510ce8ff 100755 (executable)
@@ -505,7 +505,6 @@ proto_modemmanager_teardown() {
        json_get_vars device lowpower iptype
 
        echo "stopping network"
-       proto_notify_error "${interface}" MM_TEARDOWN_IN_PROGRESS
 
        # load connected bearer information, just the first one should be ok
        modemstatus=$(mmcli --modem="${device}" --output-keyvalue)