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] peer: Do not notify state changes when peer is
      not registered yet (Vasyl Vavrychuk)
   2. [PATCH 0/3] add option to enable auto connection for roaming
      (Christophe Ronco)
   3. [PATCH 1/3] main: add option to enable auto connection for
      roaming services (Christophe Ronco)
   4. [PATCH 2/3] service: implement option to enable auto
      connection for roaming services (Christophe Ronco)
   5. [PATCH 3/3] main.conf: document option to enable auto
      connection for roaming services (Christophe Ronco)
   6. Re: [PATCH 2/3] service: implement option to enable auto
      connection for roaming services (Jonas Bonn)
   7. [PATCH v2 0/3] add option to enable auto connection for
      roaming (Christophe Ronco)
   8. [PATCH v2 1/3] main: add option to enable auto connection for
      roaming services (Christophe Ronco)
   9. [PATCH v2 2/3] service: implement option to enable auto
      connection for roaming services (Christophe Ronco)
  10. [PATCH v2 3/3] main.conf: document option to enable auto
      connection for roaming services (Christophe Ronco)


----------------------------------------------------------------------

Message: 1
Date: Fri, 15 Dec 2017 06:57:05 +0200
From: Vasyl Vavrychuk <[email protected]>
To: Daniel Wagner <[email protected]>
Cc: [email protected], [email protected]
Subject: Re: [PATCH] peer: Do not notify state changes when peer is
        not registered yet
Message-ID:
        <cagj4m+7aheipj-oqvr3ty5v9ehndzgft4siznznp5vpvd-j...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi, Daniel,

I have found that situation with this issue is more interesting.

On Thu, Dec 7, 2017 at 10:16 AM, Daniel Wagner <[email protected]> wrote:

> Could you try this and see if everything is still okay after the added
> ref/unref?
>

Actually for __connman_agent_report_peer_error
-> connman_agent_report_error_full -> connman_agent_queue_message last
function perform ref for user_context and then agent_request_free perform
unref.

There is a bit problem that actually passed structure to context_ref/unref
is connman_peer but agent_driver treats it as connman_service. But
theoretically it should still work because refcount field is not the same
position and it should be always >= 2 during unref because
connman_peer_unregister performs agent cancel.

Now I do not know why this issue happens...

Kind regards,
Vasyl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.01.org/pipermail/connman/attachments/20171215/65b6e5d7/attachment-0001.html>

------------------------------

Message: 2
Date: Fri, 15 Dec 2017 09:32:40 +0100
From: Christophe Ronco <[email protected]>
To: [email protected]
Subject: [PATCH 0/3] add option to enable auto connection for roaming
Message-ID: <[email protected]>

Hi,

I need to auto-connect cellular services even if they are roaming.
So I added an option in main.conf to enable that (or not).
I don't know if this can be useful for other Connman users.

Best Regards,

Christophe Ronco

Christophe Ronco (3):
  main: add option to enable auto connection for roaming services
  service: implement option to enable auto connection for roaming
    services
  main.conf: document option to enable auto connection for roaming
    services

 doc/connman.conf.5.in |  5 +++++
 src/main.c            | 14 ++++++++++++++
 src/main.conf         |  5 +++++
 3 files changed, 24 insertions(+)

-- 
2.7.4



------------------------------

Message: 3
Date: Fri, 15 Dec 2017 09:32:41 +0100
From: Christophe Ronco <[email protected]>
To: [email protected]
Subject: [PATCH 1/3] main: add option to enable auto connection for
        roaming services
Message-ID: <[email protected]>

---
 src/main.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/main.c b/src/main.c
index 7b00eb3..e153291 100644
--- a/src/main.c
+++ b/src/main.c
@@ -79,6 +79,7 @@ static struct {
        bool enable_6to4;
        char *vendor_class_id;
        bool enable_online_check;
+       bool auto_connect_roaming_services;
 } connman_settings  = {
        .bg_scan = true,
        .pref_timeservers = NULL,
@@ -96,6 +97,7 @@ static struct {
        .enable_6to4 = false,
        .vendor_class_id = NULL,
        .enable_online_check = true,
+       .auto_connect_roaming_services = false,
 };
 
 #define CONF_BG_SCAN                    "BackgroundScanning"
@@ -114,6 +116,7 @@ static struct {
 #define CONF_ENABLE_6TO4                "Enable6to4"
 #define CONF_VENDOR_CLASS_ID            "VendorClassID"
 #define CONF_ENABLE_ONLINE_CHECK        "EnableOnlineCheck"
+#define CONF_AUTO_CONNECT_ROAMING_SERVICES "AutoConnectRoamingServices"
 
 static const char *supported_options[] = {
        CONF_BG_SCAN,
@@ -132,6 +135,7 @@ static const char *supported_options[] = {
        CONF_ENABLE_6TO4,
        CONF_VENDOR_CLASS_ID,
        CONF_ENABLE_ONLINE_CHECK,
+       CONF_AUTO_CONNECT_ROAMING_SERVICES,
        NULL
 };
 
@@ -408,6 +412,13 @@ static void parse_config(GKeyFile *config)
        }
 
        g_clear_error(&error);
+
+       boolean = __connman_config_get_bool(config, "General",
+                               CONF_AUTO_CONNECT_ROAMING_SERVICES, &error);
+       if (!error)
+               connman_settings.auto_connect_roaming_services = boolean;
+
+       g_clear_error(&error);
 }
 
 static int config_init(const char *file)
@@ -615,6 +626,9 @@ bool connman_setting_get_bool(const char *key)
        if (g_str_equal(key, CONF_ENABLE_ONLINE_CHECK))
                return connman_settings.enable_online_check;
 
+       if (g_str_equal(key, CONF_AUTO_CONNECT_ROAMING_SERVICES))
+               return connman_settings.auto_connect_roaming_services;
+
        return false;
 }
 
-- 
2.7.4



------------------------------

Message: 4
Date: Fri, 15 Dec 2017 09:32:42 +0100
From: Christophe Ronco <[email protected]>
To: [email protected]
Subject: [PATCH 2/3] service: implement option to enable auto
        connection for roaming services
Message-ID: <[email protected]>

---
 src/main.conf | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/main.conf b/src/main.conf
index 882e327..85401c2 100644
--- a/src/main.conf
+++ b/src/main.conf
@@ -122,3 +122,8 @@
 # other which is already connected.
 # This setting has no effect if SingleConnectedTechnologies is enabled.
 # AlwaysConnectedTechnologies =
+
+# Enable auto connection of services in roaming.
+# If this setting is false, roaming services are not auto-connected by Connman.
+# Default value is false.
+# AutoConnectRoamingServices = false
-- 
2.7.4



------------------------------

Message: 5
Date: Fri, 15 Dec 2017 09:32:43 +0100
From: Christophe Ronco <[email protected]>
To: [email protected]
Subject: [PATCH 3/3] main.conf: document option to enable auto
        connection for roaming services
Message-ID: <[email protected]>

---
 doc/connman.conf.5.in | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/doc/connman.conf.5.in b/doc/connman.conf.5.in
index eee51ef..1dbed53 100644
--- a/doc/connman.conf.5.in
+++ b/doc/connman.conf.5.in
@@ -151,6 +151,11 @@ connectivity is successful. Only then the service will be
 transitioned to ONLINE state.
 If this setting is false, the default service will remain in READY state.
 Default value is true.
+.TP
+.BI AutoConnectRoamingServices=true\ \fR|\fB\ false
+Automatically connect roaming services. This is not recommended unless you know
+you won't have any billing problem.
+Default value is false.
 .SH "EXAMPLE"
 The following example configuration disables hostname updates and enables
 ethernet tethering.
-- 
2.7.4



------------------------------

Message: 6
Date: Fri, 15 Dec 2017 10:03:45 +0100
From: Jonas Bonn <[email protected]>
To: Christophe Ronco <[email protected]>, [email protected]
Subject: Re: [PATCH 2/3] service: implement option to enable auto
        connection for roaming services
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed

On 12/15/2017 09:32 AM, Christophe Ronco wrote:
> ---
>   src/main.conf | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/src/main.conf b/src/main.conf
> index 882e327..85401c2 100644
> --- a/src/main.conf
> +++ b/src/main.conf
> @@ -122,3 +122,8 @@
>   # other which is already connected.
>   # This setting has no effect if SingleConnectedTechnologies is enabled.
>   # AlwaysConnectedTechnologies =
> +
> +# Enable auto connection of services in roaming.
> +# If this setting is false, roaming services are not auto-connected by 
> Connman.
> +# Default value is false.
> +# AutoConnectRoamingServices = false

Looks like you're missing some code here... the service implementation?

/Jonas


------------------------------

Message: 7
Date: Fri, 15 Dec 2017 10:34:20 +0100
From: Christophe Ronco <[email protected]>
To: [email protected]
Subject: [PATCH v2 0/3] add option to enable auto connection for
        roaming
Message-ID: <[email protected]>

Hi,

I need to auto-connect cellular services even if they are roaming.
So I added an option in main.conf to enable that (or not).
I don't know if this can be useful for other Connman users.

Best Regards,

Christophe Ronco

Christophe Ronco (3):
  main: add option to enable auto connection for roaming services
  service: implement option to enable auto connection for roaming
    services
  main.conf: document option to enable auto connection for roaming
    services

 doc/connman.conf.5.in |  5 +++++
 src/main.c            | 14 ++++++++++++++
 src/main.conf         |  5 +++++
 3 files changed, 24 insertions(+)

-- 
2.7.4



------------------------------

Message: 8
Date: Fri, 15 Dec 2017 10:34:21 +0100
From: Christophe Ronco <[email protected]>
To: [email protected]
Subject: [PATCH v2 1/3] main: add option to enable auto connection for
        roaming services
Message-ID: <[email protected]>

---
 src/main.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/main.c b/src/main.c
index 7b00eb3..e153291 100644
--- a/src/main.c
+++ b/src/main.c
@@ -79,6 +79,7 @@ static struct {
        bool enable_6to4;
        char *vendor_class_id;
        bool enable_online_check;
+       bool auto_connect_roaming_services;
 } connman_settings  = {
        .bg_scan = true,
        .pref_timeservers = NULL,
@@ -96,6 +97,7 @@ static struct {
        .enable_6to4 = false,
        .vendor_class_id = NULL,
        .enable_online_check = true,
+       .auto_connect_roaming_services = false,
 };
 
 #define CONF_BG_SCAN                    "BackgroundScanning"
@@ -114,6 +116,7 @@ static struct {
 #define CONF_ENABLE_6TO4                "Enable6to4"
 #define CONF_VENDOR_CLASS_ID            "VendorClassID"
 #define CONF_ENABLE_ONLINE_CHECK        "EnableOnlineCheck"
+#define CONF_AUTO_CONNECT_ROAMING_SERVICES "AutoConnectRoamingServices"
 
 static const char *supported_options[] = {
        CONF_BG_SCAN,
@@ -132,6 +135,7 @@ static const char *supported_options[] = {
        CONF_ENABLE_6TO4,
        CONF_VENDOR_CLASS_ID,
        CONF_ENABLE_ONLINE_CHECK,
+       CONF_AUTO_CONNECT_ROAMING_SERVICES,
        NULL
 };
 
@@ -408,6 +412,13 @@ static void parse_config(GKeyFile *config)
        }
 
        g_clear_error(&error);
+
+       boolean = __connman_config_get_bool(config, "General",
+                               CONF_AUTO_CONNECT_ROAMING_SERVICES, &error);
+       if (!error)
+               connman_settings.auto_connect_roaming_services = boolean;
+
+       g_clear_error(&error);
 }
 
 static int config_init(const char *file)
@@ -615,6 +626,9 @@ bool connman_setting_get_bool(const char *key)
        if (g_str_equal(key, CONF_ENABLE_ONLINE_CHECK))
                return connman_settings.enable_online_check;
 
+       if (g_str_equal(key, CONF_AUTO_CONNECT_ROAMING_SERVICES))
+               return connman_settings.auto_connect_roaming_services;
+
        return false;
 }
 
-- 
2.7.4



------------------------------

Message: 9
Date: Fri, 15 Dec 2017 10:34:22 +0100
From: Christophe Ronco <[email protected]>
To: [email protected]
Subject: [PATCH v2 2/3] service: implement option to enable auto
        connection for roaming services
Message-ID: <[email protected]>

---
 src/service.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/service.c b/src/service.c
index 197f266..0c422a6 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3809,7 +3809,8 @@ static bool is_ignore(struct connman_service *service)
        if (!service->autoconnect)
                return true;
 
-       if (service->roaming)
+       if (!connman_setting_get_bool("AutoConnectRoamingServices") &&
+                                                       service->roaming)
                return true;
 
        if (service->ignore)
-- 
2.7.4



------------------------------

Message: 10
Date: Fri, 15 Dec 2017 10:34:23 +0100
From: Christophe Ronco <[email protected]>
To: [email protected]
Subject: [PATCH v2 3/3] main.conf: document option to enable auto
        connection for roaming services
Message-ID: <[email protected]>

---
 doc/connman.conf.5.in | 5 +++++
 src/main.conf         | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/connman.conf.5.in b/doc/connman.conf.5.in
index eee51ef..1dbed53 100644
--- a/doc/connman.conf.5.in
+++ b/doc/connman.conf.5.in
@@ -151,6 +151,11 @@ connectivity is successful. Only then the service will be
 transitioned to ONLINE state.
 If this setting is false, the default service will remain in READY state.
 Default value is true.
+.TP
+.BI AutoConnectRoamingServices=true\ \fR|\fB\ false
+Automatically connect roaming services. This is not recommended unless you know
+you won't have any billing problem.
+Default value is false.
 .SH "EXAMPLE"
 The following example configuration disables hostname updates and enables
 ethernet tethering.
diff --git a/src/main.conf b/src/main.conf
index 882e327..85401c2 100644
--- a/src/main.conf
+++ b/src/main.conf
@@ -122,3 +122,8 @@
 # other which is already connected.
 # This setting has no effect if SingleConnectedTechnologies is enabled.
 # AlwaysConnectedTechnologies =
+
+# Enable auto connection of services in roaming.
+# If this setting is false, roaming services are not auto-connected by Connman.
+# Default value is false.
+# AutoConnectRoamingServices = false
-- 
2.7.4



------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 26, Issue 14
***************************************

Reply via email to