wwan: don't warn on disconnect if ModemManager isn't running

If ModemManager quit or was terminated, and that caused the disconnect,
don't bother printing out a warning if MM couldn't be started.
This commit is contained in:
Dan Williams 2015-03-02 13:55:53 -06:00
parent ad2b17bfb4
commit e93309e81d

View file

@ -948,10 +948,11 @@ simple_disconnect_ready (MMModemSimple *modem_iface,
GError *error = NULL;
if (!mm_modem_simple_disconnect_finish (modem_iface, res, &error)) {
if (ctx->warn)
if (ctx->warn && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN)) {
nm_log_warn (LOGD_MB, "(%s) failed to disconnect modem: %s",
nm_modem_get_uid (NM_MODEM (ctx->self)),
error->message);
}
g_simple_async_result_take_error (ctx->result, error);
}