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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user