[PATCH] broadband-modem: use InProgress instead of WrongState when appropriate
Ben Chan
benchan at chromium.org
Fri Sep 13 00:43:27 PDT 2013
This patch changes MMBroadbandModem to report an
org.freedesktop.ModemManager1.Error.Core.InProgress error, instead of an
org.freedesktop.ModemManager1.Error.Core.WrongState error, when one
tries to initialize a modem that is already being initialized, or to
enable a modem that is already being enabled.
---
src/mm-broadband-modem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index b3b6985..1657b11 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -8681,7 +8681,7 @@ enable (MMBaseModem *self,
case MM_MODEM_STATE_ENABLING:
g_simple_async_result_set_error (result,
MM_CORE_ERROR,
- MM_CORE_ERROR_WRONG_STATE,
+ MM_CORE_ERROR_IN_PROGRESS,
"Cannot enable modem: "
"already being enabled");
break;
@@ -9157,7 +9157,7 @@ initialize (MMBaseModem *self,
case MM_MODEM_STATE_INITIALIZING:
g_simple_async_result_set_error (result,
MM_CORE_ERROR,
- MM_CORE_ERROR_WRONG_STATE,
+ MM_CORE_ERROR_IN_PROGRESS,
"Cannot initialize modem: "
"already being initialized");
break;
--
1.8.4
More information about the ModemManager-devel
mailing list