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
This commit is contained in:
Aleksander Morgado
2018-09-08 10:04:58 +02:00
parent 21420e450d
commit 47ed19d5be

View File

@@ -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,