[PATCH] broadband-modem: use InProgress instead of WrongState when appropriate
Aleksander Morgado
aleksander at lanedo.com
Fri Sep 13 02:02:19 PDT 2013
On 13/09/13 09:43, Ben Chan wrote:
> 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.
> ---
Pushed, thanks.
> 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;
>
--
Aleksander
More information about the ModemManager-devel
mailing list