aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Williams <dan@bigw.org>2025-02-24 14:57:28 +0000
committerDan Williams <dan@bigw.org>2025-02-24 14:57:28 +0000
commit46d126f5055da6efaa63fb83d9e44eeecc5f1469 (patch)
tree7a338acf83a87b7cf958d90f0e93a34836ca30a4 /src
parent7055b94eee3586e291c0bd155cee0dc2464c2438 (diff)
parent0d6c9279d36d35f0d776a82224865d085b811d4e (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
Diffstat (limited to 'src')
-rw-r--r--src/mm-iface-modem-messaging.c8
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;
}