diff options
author | Dan Williams <dan@bigw.org> | 2025-02-24 14:57:28 +0000 |
---|---|---|
committer | Dan Williams <dan@bigw.org> | 2025-02-24 14:57:28 +0000 |
commit | 46d126f5055da6efaa63fb83d9e44eeecc5f1469 (patch) | |
tree | 7a338acf83a87b7cf958d90f0e93a34836ca30a4 | |
parent | 7055b94eee3586e291c0bd155cee0dc2464c2438 (diff) | |
parent | 0d6c9279d36d35f0d776a82224865d085b811d4e (diff) |
Merge request !1242 from 'supported_storage_changes_check'
iface-modem-messaging: Validate supported storages
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1242
-rw-r--r-- | src/mm-iface-modem-messaging.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mm-iface-modem-messaging.c b/src/mm-iface-modem-messaging.c index c89477fb..a064f11e 100644 --- a/src/mm-iface-modem-messaging.c +++ b/src/mm-iface-modem-messaging.c @@ -428,11 +428,9 @@ handle_set_default_storage_auth_ready (MMBaseModem *self, return; } - if (ctx->storage == MM_SMS_STORAGE_UNKNOWN) { - mm_dbus_method_invocation_return_error (ctx->invocation, - MM_CORE_ERROR, - MM_CORE_ERROR_UNSUPPORTED, - "Cannot set default storage: Unknown storage"); + /* Check if the requested storage is supported or not */ + if (!mm_iface_modem_messaging_is_storage_supported_for_storing (ctx->self, ctx->storage, &error)) { + mm_dbus_method_invocation_take_error (ctx->invocation, error); handle_set_default_storage_context_free (ctx); return; } |