All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 4/9] gprs: pri_activate_callback: optional msg reply
Date: Thu, 17 Mar 2016 12:41:04 -0500	[thread overview]
Message-ID: <56EAEC30.4010701@gmail.com> (raw)
In-Reply-To: <1458234140-7936-5-git-send-email-dragos@endocode.com>

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

Hi Dragos,

On 03/17/2016 12:02 PM, Dragos Tatulea wrote:
> For automatic context activation there's no initial message to send a
> reply to.
> ---
>   src/gprs.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/gprs.c b/src/gprs.c
> index 9192e68..233ab1a 100644
> --- a/src/gprs.c
> +++ b/src/gprs.c
> @@ -887,8 +887,10 @@ static void pri_activate_callback(const struct ofono_error *error, void *data)
>   	}
>
>   	ctx->active = TRUE;
> -	__ofono_dbus_pending_reply(&ctx->pending,
> -				dbus_message_new_method_return(ctx->pending));
> +
> +	if (ctx->pending)
> +		__ofono_dbus_pending_reply(&ctx->pending,
> +				bus_message_new_method_return(ctx->pending));

So this is a bit tricky.  While this is strictly okay to do right now, 
since pending is only used for Activate/Deactivate, I'd prefer that we 
make a separate callback for the read_settings case.  Even if it does 
mean a bit of code duplication.

>
>   	if (gc->settings->interface != NULL) {
>   		pri_ifupdown(gc->settings->interface, TRUE);
>

Regards,
-Denis

  reply	other threads:[~2016-03-17 17:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-17 17:02 [PATCH 0/9] allow automatic context activation Dragos Tatulea
2016-03-17 17:02 ` [PATCH 1/9] idmap: add api for finding a certain id in map Dragos Tatulea
2016-03-17 17:42   ` Denis Kenzior
2016-03-17 17:02 ` [PATCH 2/9] gprs-context.h: add op for reading context config Dragos Tatulea
2016-03-17 17:29   ` Denis Kenzior
2016-03-17 17:02 ` [PATCH 3/9] gprs.h: automatic context configuration notifier Dragos Tatulea
2016-03-17 17:33   ` Denis Kenzior
2016-03-17 17:02 ` [PATCH 4/9] gprs: pri_activate_callback: optional msg reply Dragos Tatulea
2016-03-17 17:41   ` Denis Kenzior [this message]
2016-03-17 17:02 ` [PATCH 5/9] gprs: pri_set_apn: make reply msg optional Dragos Tatulea
2016-03-17 17:39   ` Denis Kenzior
2016-03-17 17:02 ` [PATCH 6/9] gprs: custom cid for assign_context Dragos Tatulea
2016-03-17 17:27   ` Denis Kenzior
2016-03-17 17:02 ` [PATCH 7/9] gprs: implement ofono_gprs_cid_activated Dragos Tatulea
2016-03-17 17:48   ` Denis Kenzior
2016-03-17 17:02 ` [PATCH 8/9] atmodem: gprs: handle automatic context activation Dragos Tatulea
2016-03-17 17:56   ` Denis Kenzior
2016-03-17 17:02 ` [PATCH 9/9] ubloxmodem: support automatic ctx activation Dragos Tatulea
  -- strict thread matches above, loose matches on Subject: below --
2016-03-18 10:47 [PATCH v2 0/9] allow automatic context activation Dragos Tatulea
2016-03-18 10:47 ` [PATCH 4/9] gprs: pri_activate_callback: optional msg reply Dragos Tatulea
2016-03-18 11:53 [PATCH v3 0/9] allow automatic context activation Dragos Tatulea
2016-03-18 11:53 ` [PATCH 4/9] gprs: pri_activate_callback: optional msg reply Dragos Tatulea

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=56EAEC30.4010701@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.