diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-iface-modem-messaging.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mm-iface-modem-messaging.c b/src/mm-iface-modem-messaging.c index f9c2c98b..bd9efcea 100644 --- a/src/mm-iface-modem-messaging.c +++ b/src/mm-iface-modem-messaging.c @@ -193,7 +193,12 @@ handle_delete_auth_ready (MMBaseModem *self, MM_IFACE_MODEM_STATE, &modem_state, NULL); - if (modem_state < MM_MODEM_STATE_ENABLED) { + /* We do allow deleting SMS messages while enabling or disabling, it doesn't + * interfere with the state transition logic to do so. The main reason to allow + * this is that during modem enabling we're emitting "Added" signals before we + * reach the enabled state, and so users listening to the signal may want to + * delete the SMS message as soon as it's read. */ + if (modem_state <= MM_MODEM_STATE_DISABLED) { g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_WRONG_STATE, |