From 47ed19d5be68f139d4fbb00c997cd2805488ace7 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Sat, 8 Sep 2018 10:04:58 +0200 Subject: broadband-bearer: don't do connection checks on CDMA On CDMA-only connections we won't have a CID defined, so instead of getting in a loop of warnings reporting "cid not defined", early error out with an UNSUPPORTED error so that the connection check isn't tried any more. https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/83 --- src/mm-broadband-bearer.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c index 6321de25..779cd9a3 100644 --- a/src/mm-broadband-bearer.c +++ b/src/mm-broadband-bearer.c @@ -1992,6 +1992,14 @@ load_connection_status (MMBaseBearer *self, MM_BASE_BEARER_MODEM, &modem, NULL); + /* No connection status checks on CDMA-only */ + if (MM_BROADBAND_BEARER (self)->priv->connection_type == CONNECTION_TYPE_CDMA) { + g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, + "Couldn't load connection status: unsupported in CDMA"); + g_object_unref (task); + goto out; + } + /* If CID not defined, error out */ if (!MM_BROADBAND_BEARER (self)->priv->cid) { g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, -- cgit v1.2.3-70-g09d2