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