Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. Re: [PATCH 2/5] session: Callback hook for policy plugins to
update session state. (Daniel Wagner)
2. Re: [PATCH 3/5] service: Query function to retrieve service
handle (Daniel Wagner)
3. Move pacrunner to mozjs38 (Marcos Mello)
4. Re: [PATCH 4/5] Session: Callback hook for policy plugin to
return service of session. (Daniel Wagner)
5. Re: [PATCH 5/5] Session: Interface to query session->mark
value (Daniel Wagner)
6. Re: Move pacrunner to mozjs38 (Daniel Wagner)
7. Re: Move pacrunner to mozjs38 (Marcos Mello)
----------------------------------------------------------------------
Message: 1
Date: Sun, 9 Apr 2017 21:02:26 +0200
From: Daniel Wagner <[email protected]>
To: [email protected], thb1hi
<[email protected]>
Cc: [email protected], [email protected]
Subject: Re: [PATCH 2/5] session: Callback hook for policy plugins to
update session state.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
Hi Bjoern,
On 04/06/2017 02:53 PM, [email protected] wrote:
> From: thb1hi <[email protected]>
>
> Called when state of session changes.
>
> Signed-off-by: thb1hi <[email protected]>
> Signed-off-by: Mounesh Sutar <[email protected]>
>
> diff --git a/include/session.h b/include/session.h
> index 48f1510..25a5e58 100644
> --- a/include/session.h
> +++ b/include/session.h
> @@ -55,6 +55,12 @@ enum connman_session_id_type {
> CONNMAN_SESSION_ID_TYPE_LSM = 3,
> };
>
> +enum connman_session_state {
> + CONNMAN_SESSION_STATE_DISCONNECTED = 0,
> + CONNMAN_SESSION_STATE_CONNECTED = 1,
> + CONNMAN_SESSION_STATE_ONLINE = 2,
> +};
> +
> struct connman_session;
>
> struct connman_session_config {
> @@ -85,6 +91,8 @@ struct connman_session_policy {
> GSList *bearers);
> bool (*allowed)(struct connman_session *session,
> struct connman_service *service);
> + void (*update_session_state)(struct connman_session* session,
> + enum connman_session_state state);
> };
>
> int connman_session_policy_register(struct connman_session_policy *config);
> diff --git a/src/session.c b/src/session.c
> index a64df64..776e0d7 100644
> --- a/src/session.c
> +++ b/src/session.c
> @@ -38,11 +38,6 @@ static GHashTable *service_hash;
> static struct connman_session *ecall_session;
> static uint32_t session_mark = 256;
>
> -enum connman_session_state {
> - CONNMAN_SESSION_STATE_DISCONNECTED = 0,
> - CONNMAN_SESSION_STATE_CONNECTED = 1,
> - CONNMAN_SESSION_STATE_ONLINE = 2,
> -};
>
> struct session_info {
> struct connman_session_config config;
> @@ -1686,6 +1681,10 @@ static void update_session_state(struct
> connman_session *session)
> update_firewall(session);
> update_routing_table(session);
> update_nat_rules(session);
> +
> + if (policy && policy->update_session_state)
> + policy->update_session_state(session, state);
Indention seems to be wrong.
Thanks,
Daniel
------------------------------
Message: 2
Date: Sun, 9 Apr 2017 21:04:42 +0200
From: Daniel Wagner <[email protected]>
To: [email protected], thb1hi
<[email protected]>
Cc: [email protected], [email protected]
Subject: Re: [PATCH 3/5] service: Query function to retrieve service
handle
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
Hi Bjoern,
On 04/06/2017 02:53 PM, [email protected] wrote:
> From: thb1hi <[email protected]>
>
> Query function to retrieve service handle for service identifier string
>
> Signed-off-by: thb1hi <[email protected]>
> Signed-off-by: Mounesh Sutar <[email protected]>
>
> diff --git a/include/service.h b/include/service.h
> index 185f008..958e7fd 100644
> --- a/include/service.h
> +++ b/include/service.h
> @@ -130,6 +130,7 @@ bool connman_service_get_favorite(struct connman_service
> *service);
> bool connman_service_get_autoconnect(struct connman_service *service);
>
> struct connman_service *connman_service_lookup_from_network(struct
> connman_network *network);
> +struct connman_service *connman_service_lookup_from_identifier(const char*
> identifier);
>
> void connman_service_create_ip4config(struct connman_service *service,
> int index);
> diff --git a/src/service.c b/src/service.c
> index 2289d54..9943e96 100644
> --- a/src/service.c
> +++ b/src/service.c
> @@ -6404,6 +6404,13 @@ static struct connman_service
> *lookup_by_identifier(const char *identifier)
> return g_hash_table_lookup(service_hash, identifier);
> }
>
> +
> +struct connman_service *connman_service_lookup_from_identifier(const char*
> identifier)
> +{
> + return lookup_by_identifier(identifier);
> +}
> +
> +
Whitespace nitpicking. Too many empty lines.
Thanks,
Daniel
------------------------------
Message: 3
Date: Sun, 9 Apr 2017 16:09:15 -0300
From: Marcos Mello <[email protected]>
To: [email protected]
Subject: Move pacrunner to mozjs38
Message-ID:
<cajzvdjbqah+e3q4lhjtuffkqzm0b2mgmexm-g0xhxpmywo+...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Months ago Jeremy Linton posted patches porting pacrunner to mozjs24
then mozjs38:
https://lists.01.org/pipermail/connman/2016-September/020903.html
https://lists.01.org/pipermail/connman/2016-September/020963.html
https://lists.01.org/pipermail/connman/2016-September/020964.html
https://lists.01.org/pipermail/connman/2016-September/020965.html
The patches still apply fine in git master. Just need to run
"autoreconf -fi" and build as usual.
Things still work. My proxy exclusions based on isPlainHostName(),
dnsDomainIs(), isInNet(), are working.
Are there any objections to these patches? mozjs185 is complete
obsolete at this point.
------------------------------
Message: 4
Date: Sun, 9 Apr 2017 21:27:21 +0200
From: Daniel Wagner <[email protected]>
To: [email protected], thb1hi
<[email protected]>
Cc: [email protected], [email protected]
Subject: Re: [PATCH 4/5] Session: Callback hook for policy plugin to
return service of session.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
Hi Bjoern,
On 04/06/2017 02:53 PM, [email protected] wrote:
> From: thb1hi <[email protected]>
>
> Returns the allowed service for a session based on a provided list of
> available services.
>
> Signed-off-by: thb1hi <[email protected]>
> Signed-off-by: Mounesh Sutar <[email protected]>
>
> diff --git a/include/session.h b/include/session.h
> index 25a5e58..0d66f48 100644
> --- a/include/session.h
> +++ b/include/session.h
> @@ -93,6 +93,8 @@ struct connman_session_policy {
> struct connman_service *service);
> void (*update_session_state)(struct connman_session* session,
> enum connman_session_state state);
> + struct connman_service* (*get_service_for_session)(struct
> connman_session* session,
> + GSList* services);
> };
>
> int connman_session_policy_register(struct connman_session_policy *config);
> diff --git a/src/session.c b/src/session.c
> index 776e0d7..602f4cc 100644
> --- a/src/session.c
> +++ b/src/session.c
> @@ -1753,6 +1753,42 @@ static void session_activate(struct connman_session
> *session)
> if (!service_hash)
> return;
>
> + if (policy && policy->get_service_for_session)
> + {
if (...) {
> + struct connman_service *service;
> + struct connman_service_info *info;
> + GSList *service_list = NULL;
> + GHashTableIter iter;
> + gpointer key, value;
> + enum connman_service_state state =
> CONNMAN_SESSION_STATE_DISCONNECTED;
'info' is not used in this basic block. 'iter' is shadowing the one
declared in the block above. Same goes for 'key' and 'value'.
Also don't mix the deceleration and the initialization part.
> +
> + g_hash_table_iter_init(&iter, service_hash);
> +
> + while (g_hash_table_iter_next(&iter, &key, &value)) {
> + struct connman_service_info *info = value;
> + struct connman_service *service_lookup;
src/session.c: In function ?session_activate?:
src/session.c:1775:28: error: unused variable ?service_lookup?
[-Werror=unused-variable]
struct connman_service *service_lookup;
^~~~~~~~~~~~~~
Empty line here.
> + state = __connman_service_get_state(info->service);
> + if (is_session_connected(session, state)) {
> + service_list = g_slist_prepend(service_list,
> + info->service);
> + }
No brackets for single line bodies.
> + }
Empty line.
> + service_list = g_slist_reverse(service_list);
> + service = policy->get_service_for_session(session,service_list);
Empty line.
> + if (service) {
> + info = g_hash_table_lookup(service_hash,service);
> + DBG("session %p add service %p", session,
> info->service);
> +
> + info->sessions = g_slist_prepend(info->sessions,
> + session);
> + session->service = info->service;
> + update_session_state(session);
> + }
> +
> + g_slist_free(service_list);
> + return;
> + }
> +
> g_hash_table_iter_init(&iter, service_hash);
> while (g_hash_table_iter_next(&iter, &key, &value)) {
> struct connman_service_info *info = value;
>
Thanks,
Daniel
------------------------------
Message: 5
Date: Sun, 9 Apr 2017 21:36:23 +0200
From: Daniel Wagner <[email protected]>
To: [email protected], thb1hi
<[email protected]>
Cc: [email protected], [email protected]
Subject: Re: [PATCH 5/5] Session: Interface to query session->mark
value
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
Hi Bjoern,
On 04/06/2017 02:53 PM, [email protected] wrote:
> From: thb1hi <[email protected]>
Please add some a commit message explaining why.
> Signed-off-by: thb1hi <[email protected]>
> Signed-off-by: Mounesh Sutar <[email protected]>
>
> diff --git a/include/session.h b/include/session.h
> index 0d66f48..4e15ed4 100644
> --- a/include/session.h
> +++ b/include/session.h
> @@ -23,6 +23,7 @@
> #define __CONNMAN_SESSION_H
>
> #include <connman/service.h>
> +#include <stdint.h>
Move the standard include before the ConnMan's.
>
> #ifdef __cplusplus
> extern "C" {
> @@ -97,6 +98,7 @@ struct connman_session_policy {
> GSList* services);
> };
>
> +uint32_t connman_session_firewall_get_fwmark(struct connman_session
> *session);
> int connman_session_policy_register(struct connman_session_policy *config);
> void connman_session_policy_unregister(struct connman_session_policy
> *config);
>
> diff --git a/src/session.c b/src/session.c
> index 602f4cc..9082447 100644
> --- a/src/session.c
> +++ b/src/session.c
> @@ -427,6 +427,12 @@ static void add_nat_rules(struct connman_session
> *session)
> g_free(ifname);
> }
>
> +uint32_t connman_session_firewall_get_fwmark(struct connman_session *session)
> +{
> + return session->mark;
Tab indention not spaces.
> +}
> +
> +
Too many spaces.
> static void cleanup_routing_table(struct connman_session *session)
> {
> DBG("");
>
Thanks,
Daniel
------------------------------
Message: 6
Date: Sun, 9 Apr 2017 21:41:08 +0200
From: Daniel Wagner <[email protected]>
To: Marcos Mello <[email protected]>, [email protected]
Subject: Re: Move pacrunner to mozjs38
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
Hi Marcos,
On 04/09/2017 09:09 PM, Marcos Mello wrote:
> Months ago Jeremy Linton posted patches porting pacrunner to mozjs24
> then mozjs38:
>
> https://lists.01.org/pipermail/connman/2016-September/020903.html
> https://lists.01.org/pipermail/connman/2016-September/020963.html
> https://lists.01.org/pipermail/connman/2016-September/020964.html
> https://lists.01.org/pipermail/connman/2016-September/020965.html
>
> The patches still apply fine in git master. Just need to run
> "autoreconf -fi" and build as usual.
>
> Things still work. My proxy exclusions based on isPlainHostName(),
> dnsDomainIs(), isInNet(), are working.
>
> Are there any objections to these patches? mozjs185 is complete
> obsolete at this point.
I think those patches fell through the crack. Would you mind to
update them and resend it? At least for the first patch there
was some feedback from Tomasz.
Thanks,
Daniel
------------------------------
Message: 7
Date: Mon, 10 Apr 2017 09:05:25 -0300
From: Marcos Mello <[email protected]>
To: Daniel Wagner <[email protected]>
Cc: [email protected], Jeremy Linton <[email protected]>
Subject: Re: Move pacrunner to mozjs38
Message-ID:
<CAJZVDJAr7RLgMrGMwy-tY=gjmkon_3bjpyuyvkgak-tzu35...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
2017-04-09 16:41 GMT-03:00 Daniel Wagner <[email protected]>:
> Hi Marcos,
>
>
> On 04/09/2017 09:09 PM, Marcos Mello wrote:
>>
>> Months ago Jeremy Linton posted patches porting pacrunner to mozjs24
>> then mozjs38:
>>
>> https://lists.01.org/pipermail/connman/2016-September/020903.html
>> https://lists.01.org/pipermail/connman/2016-September/020963.html
>> https://lists.01.org/pipermail/connman/2016-September/020964.html
>> https://lists.01.org/pipermail/connman/2016-September/020965.html
>>
>> The patches still apply fine in git master. Just need to run
>> "autoreconf -fi" and build as usual.
>>
>> Things still work. My proxy exclusions based on isPlainHostName(),
>> dnsDomainIs(), isInNet(), are working.
>>
>> Are there any objections to these patches? mozjs185 is complete
>> obsolete at this point.
>
>
> I think those patches fell through the crack. Would you mind to
> update them and resend it? At least for the first patch there
> was some feedback from Tomasz.
>
CCing Jeremy.
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 18, Issue 8
**************************************