mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-09 23:40:33 +01:00
wwan: don't disconnect if nothing to disconnect
Avoid this error: NetworkManager[25181]: <warn> (cdc-wdm1): Failed to connect 'T-Mobile Internet': Connection requested IPv4 but IPv4 is unsuported by the modem. NetworkManager[25181]: <info> (cdc-wdm1): device state change: prepare -> failed (reason 'modem-init-failed') [40 120 28] ** (NetworkManager:25181): CRITICAL **: mm_modem_simple_disconnect: assertion 'MM_IS_MODEM_SIMPLE (self)' failed self->priv->simple_iface is only valid if stage1/prepare actually completes, so don't try to access it if stage1/prepare failed.
This commit is contained in:
parent
b5817dffa0
commit
20081816e1
1 changed files with 5 additions and 1 deletions
|
|
@ -866,11 +866,15 @@ simple_disconnect_ready (MMModemSimple *modem_iface,
|
|||
}
|
||||
|
||||
static void
|
||||
disconnect (NMModem *self,
|
||||
disconnect (NMModem *modem,
|
||||
gboolean warn)
|
||||
{
|
||||
NMModemBroadband *self = NM_MODEM_BROADBAND (modem);
|
||||
SimpleDisconnectContext *ctx;
|
||||
|
||||
if (!self->priv->simple_iface)
|
||||
return;
|
||||
|
||||
ctx = g_slice_new (SimpleDisconnectContext);
|
||||
ctx->self = g_object_ref (self);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue