When we get a disconnect event that we wanted to ignore, set the
DisconnectRequest property instead so clients on dbus can act on it.
Also upgrade the logs from dbg to msg (info) as there would be otherwise
no message indicating the disconnect request if it is not acted on.
This was checked with dbus-monitor:
```
$ dbus-monitor --system "type='signal',sender='org.freedesktop.ModemManager1'"
signal time=1747362238.227804 sender=:1.73798 -> destination=(null destination) serial=741 path=/org/freedesktop/ModemManager1/Bearer/0; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.freedesktop.ModemManager1.Bearer"
array [
dict entry(
string "DisconnectRequest"
variant boolean true
)
]
array [
]
```
Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
To report that the bearer has been killed from the modem side and
the connection should be terminated.
Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
When bearer gets an event that should trigger a disconnection but we
cannot disconnect (for example because we're waiting for pppd to close),
we now trigger a new 'disconnect-request' event instead
This was tested with the following hook:
```
$ cat /etc/ModemManager/connection.d/handle-disconnect-request.sh
#!/bin/sh
if [ "$4" != disconnect-request ]; then
exit 0
fi
iface=$(mmcli -b "$2" -K | awk '/bearer.status.interface/ { print $3 }')
if pkill -f "pppd\>.*\<$iface\>"; then
logger -t mm-disconnect-request "Killed $iface pppd"
else
logger -t mm-disconnect-request "No pppd found for $iface"
fi
```
Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
The next commit will introduce a new dispatcher event.
This commit should not change anything user-facing
Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>