From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 01/11] gprs: Add private APIs to activate/deactivate private contexts
Date: Thu, 30 Jun 2011 01:11:07 -0500 [thread overview]
Message-ID: <4E0C137B.9010200@gmail.com> (raw)
In-Reply-To: <4E0CA34B.2000903@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1716 bytes --]
Hi Philippe,
>>> static GSList *g_drivers = NULL;
>>> static GSList *g_context_drivers = NULL;
>>> +static GSList *g_private_contexts = NULL;
>>
>> So this part is quite wrong ;) What you have done here is to make stk
>> activated contexts shared across all gprs atoms, with potentially
>> duplicate ids.
>>
>
> The gprs_private_contexts are linked to one specific gprs atom as for
> ofono_gprs_contexts. So, I don't understand your point.
> Also, could we think to have more than one gprs atom? In which condition?
>
You are using a global variable, such that this list is shared across
all atoms. Remember, oFono has multiple modem objects, each one having
a gprs atom. The idmap for each gprs atom is independent, so your
gprs_private_context_by_id implementation will fall flat on its face as
soon as you have multiple STK enabled modems in the system ;)
> The idea of this list was to offer the possibility to active/deactivate
> a private context from any atom, not only STK. Hence, the private
> context is not specifically an STK context.
> If we consider that this is not really useful, I can handle only one
> static _gprs_private_context_ pointer.
> This way, it means also that we don't need to return a cid to the STK atom.
>
> So, I presume, I should simplify and remove this list?
>
This thought did come across my mind when I reviewed this patch.
Honestly I don't ever see a case where we would need to activate a
context outside of stk. And I don't think stk is ever going to activate
multiple contexts...
Certainly this simplification will make the API and implementation a bit
cleaner without having any negative impact.
Regards,
-Denis
next prev parent reply other threads:[~2011-06-30 6:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-28 17:16 [PATCH 00/11] Add BIP command support Philippe Nunes
2011-06-28 17:16 ` [PATCH 01/11] gprs: Add private APIs to activate/deactivate private contexts Philippe Nunes
2011-06-29 22:22 ` Denis Kenzior
2011-06-30 16:24 ` Philippe Nunes
2011-06-30 6:11 ` Denis Kenzior [this message]
2011-06-28 17:16 ` [PATCH 02/11] stk: Add support for the proactive command 'Open channel' Philippe Nunes
2011-06-29 22:38 ` Denis Kenzior
2011-06-28 17:16 ` [PATCH 03/11] stk: Add support for the proactive command 'Get channel status' Philippe Nunes
2011-06-28 17:16 ` [PATCH 04/11] stk: Add support for the proactive command 'Close channel' Philippe Nunes
2011-06-28 17:16 ` [PATCH 05/11] stk: Add 'ofono_stk_activate_cb' definition Philippe Nunes
2011-06-28 17:16 ` [PATCH 06/11] stk: Add 'ofono_stk_deactivate_context_cb' definition Philippe Nunes
2011-06-28 17:16 ` [PATCH 07/11] stk: Add support for the proactive command 'Receive data' Philippe Nunes
2011-06-28 17:16 ` [PATCH 08/11] stk: Add support for the proactive command 'Send data' Philippe Nunes
2011-06-28 17:16 ` [PATCH 09/11] stk: Add support of the Setup event list proactive command Philippe Nunes
2011-06-28 17:16 ` [PATCH 10/11] stk: Add host route to route the traffic through the stk interface Philippe Nunes
2011-06-28 17:16 ` [PATCH 11/11] gprs: Add API to set a 'detach'notification callback Philippe Nunes
2011-06-29 22:46 ` 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=4E0C137B.9010200@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