broadband-modem: use InProgress instead of WrongState when appropriate

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.
This commit is contained in:
Ben Chan
2013-09-13 11:00:07 +02:00
committed by Aleksander Morgado
parent e446037aa7
commit 8a857b7b26
+2 -2
View File
@@ -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;