Hi Patrik,
On 10/18/2013 03:59 PM, Patrik Flykt wrote:
Hi,
On Thu, 2013-10-10 at 16:58 +0200, Daniel Wagner wrote:
During normal operation we only have to add or remove service
from service when the service enters or leaves READY or CONNECTED
state.
We need to do some more work (comparing) when a service or a
session is created. In the worst case we have n*m comparison
where n is the number of services and m the number of sessions.
The worst case happens if all session allow all kind of services
via the 'any' AllowedBearers. The most likely this is only relevant
for wifi.
The current implemention does not try to be extra clever, instead
it is kept as simple as possible. We can still optimize this later
if needed.
---
src/service.c | 139
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 139 insertions(+)
This code is all related to sessions but it is implemented to service.c.
If it is possible to have the code in session.c, it'd mean some changes
to the structures keeping track of services and sessions relations.
Yes, the code is handling the sessions inside service.c. In the end
the main trick is to have the session list inside struct session_service.
This could also be put outside but I figured let's start with KISS and
make it more complex later. Anyway, I'll try push more code to session.c
and see how this looks like.
cheers,
daniel
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman