Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 3/5] modem: add support to restore state when resetting the modem
Date: Thu, 02 Dec 2010 13:47:14 -0600	[thread overview]
Message-ID: <4CF7F7C2.7000000@gmail.com> (raw)
In-Reply-To: <1290711740-27886-3-git-send-email-padovan@profusion.mobi>

[-- Attachment #1: Type: text/plain, Size: 924 bytes --]

Hi Gustavo,

> @@ -488,16 +465,18 @@ static void online_cb(const struct ofono_error *error, void *data)
>  	DBusMessage *reply;
>  
>  	if (error->type == OFONO_ERROR_TYPE_NO_ERROR &&
> -			modem->modem_state == MODEM_STATE_OFFLINE)
> +			modem->modem_state == MODEM_STATE_OFFLINE) {
> +		modem_change_state(modem, MODEM_STATE_ONLINE);
> +
> +		if (!modem->pending)
> +			return;
> +

Fair enough...

>  		reply = dbus_message_new_method_return(modem->pending);
> -	else
> +	} else {
>  		reply = __ofono_error_failed(modem->pending);

But what about the error case?

> +	}
>  
>  	__ofono_dbus_pending_reply(&modem->pending, reply);
> -
> -	if (error->type == OFONO_ERROR_TYPE_NO_ERROR &&
> -			modem->modem_state == MODEM_STATE_OFFLINE)
> -		modem_change_state(modem, MODEM_STATE_ONLINE);
>  }
>  
>  static void offline_cb(const struct ofono_error *error, void *data)

Regards,
-Denis

  parent reply	other threads:[~2010-12-02 19:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-25 19:02 [PATCH 1/5] Add ofono_modem_reset() Gustavo F. Padovan
2010-11-25 19:02 ` [PATCH 2/5] phonesim: Add modem reset trigger Gustavo F. Padovan
2010-11-25 19:02   ` [PATCH 3/5] modem: add support to restore state when resetting the modem Gustavo F. Padovan
2010-11-25 19:02     ` [PATCH 4/5] Add Lockdown property to Modem interface Gustavo F. Padovan
2010-11-25 19:02       ` [PATCH 5/5] Add test script for the Lockdown property Gustavo F. Padovan
2010-12-02 19:51         ` Denis Kenzior
2010-12-02 20:08       ` [PATCH 4/5] Add Lockdown property to Modem interface Denis Kenzior
2010-12-02 19:47     ` Denis Kenzior [this message]
2010-12-02 19:45 ` [PATCH 1/5] Add ofono_modem_reset() Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CF7F7C2.7000000@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox