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: WiFi autoscan improvement (Daniel Wagner)
2. Re: [PATCH 3/5] service: add mDNS support. (Daniel Wagner)
3. Re: autoconnect should be disabled while password input is in
progress (Daniel Wagner)
4. Re: [PATCH 1/2] wifi: Fix behaviour when Background scanning
is disabled (Daniel Wagner)
5. [PATCH] wifi: Don't perform handle_wps_completion() when p2p
is connecting (Saurav Babu)
6. [PATCH] peer: Don't try to connect to already connected peer
(Saurav Babu)
7. [PATCH] client: add newline to every error message
(Mikhail Kovyazin)
----------------------------------------------------------------------
Message: 1
Date: Sun, 15 Oct 2017 21:54:12 +0200
From: Daniel Wagner <[email protected]>
To: [email protected], Jose Blanquicet
<[email protected]>
Cc: [email protected]
Subject: Re: WiFi autoscan improvement
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
Hi Raul,
On 10/10/2017 10:05 PM, [email protected] wrote:
> With this patch, connman will be able to perform either a "periodic" or
> "exponential" autoscan scheme by setting the AUTOSCAN_DEFAULT var as
> "exponential:xxx:xxx" or "periodic:xxx",
> exactly same way in which wpa_supplicant (autoscan) can be set on config
> file. The connman version I use is 1.33.
IIRC, there was some discussion on choosing the 'right' values. The
periodic configuration seems to targeting a different use case.
@Jose, what is your input on this? You are our wifi expert :)
I think setting the value via changing the define sounds a bit too
hackish :) There a couple of ways how we could address this. One way
could be going via configure.ac. The other is to extend the config
parser and allow plugins via /etc/connman/wifi.conf (just an example).
> The reason why I am sending this to you, is because I would like to know
> if this feature can be implemented on connman oficial release. We really
> want to contribute to the connman community.
That is nice to hear :)
> Due to this is my fist time that I participate on this community, I hope
> I did it in a correct way.
No worries everybody starts at one point. There a few things you could
do next time. Plain text mails are highly preferred on this mailing
list. If you use 'git send-email' is also helping a lot. Usually,
sending patches from a corporate network can be 'challenging'. There a
few good tutorial how you can setup your environment.
Furthermore, we use kernel coding style, that means you can check the
patch with checkpatch.pl for style errors.
Thanks,
Daniel
------------------------------
Message: 2
Date: Sun, 15 Oct 2017 22:29:16 +0200
From: Daniel Wagner <[email protected]>
To: Ismo Puustinen <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 3/5] service: add mDNS support.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Ismo,
The whole series already pretty good to me. There are only a bunch of
nitpicks in this patch.
On 10/12/2017 04:43 PM, Ismo Puustinen wrote:
> Add two boolean D-Bus properties for services: mDNS [readonly] and
> mDNS.Configuration [readwrite]. The mDNS support for a service is
> enabled or disabled by setting true or false to mDNS.Configuration.
>
> Not all DNS backends support mDNS. Currently only systemd-resolved does.
> If a DNS backend doesn't support mDNS, the properties are not exposed
> over D-Bus.
I don't think we should do this. For me it is something I would not
expect from the D-Bus API. It contradicts the idea of the least surprise
design approach. If it is not supported, the property should set to false.
> @@ -2344,6 +2404,7 @@ static void append_properties(DBusMessageIter *dict,
> dbus_bool_t limited,
> dbus_bool_t val;
> const char *str;
> GSList *list;
> + enum dnsproxy_capabilities dns_caps;
Usually, we have the variable decleration sorted by length if possible.
So not sure if dns_caps could go a bit higher up.
>
> str = __connman_service_type2string(service->type);
> if (str)
> @@ -2452,6 +2513,20 @@ static void append_properties(DBusMessageIter *dict,
> dbus_bool_t limited,
> connman_dbus_dict_append_dict(dict, "Proxy.Configuration",
> append_proxyconfig, service);
>
> + /* Check if mDNS support is available. Only add mDNS properties if it
> + * is there.
> + */
Please do this kind of comments:
/*
* Comment
*/
> + dns_caps = __connman_dnsproxy_get_capabilities();
> + if (dns_caps & DNSPROXY_CAP_MDNS) {
> + val = service->mdns;
> + connman_dbus_dict_append_basic(dict, "mDNS", DBUS_TYPE_BOOLEAN,
> + &val);
> +
> + val = service->mdns_config;
> + connman_dbus_dict_append_basic(dict, "mDNS.Configuration",
> + DBUS_TYPE_BOOLEAN, &val);
> + }
> +
> connman_dbus_dict_append_dict(dict, "Provider",
> append_provider, service);
> }
> @@ -3571,6 +3646,26 @@ static DBusMessage *set_property(DBusConnection *conn,
> __connman_notifier_proxy_changed(service);
>
> service_save(service);
> + } else if (g_str_equal(name, "mDNS.Configuration")) {
> + dbus_bool_t val;
> + enum dnsproxy_capabilities dns_caps;
> +
Here you could switch order of the deceleration to have the reverse xmas
tree style. As I said it is not everywhere consistently used.
> + dns_caps = __connman_dnsproxy_get_capabilities();
> +
> + if (service->immutable || !(dns_caps & DNSPROXY_CAP_MDNS))
> + return __connman_error_not_supported(msg);
> +
> + if (type != DBUS_TYPE_BOOLEAN)
> + return __connman_error_invalid_arguments(msg);
> +
> + dbus_message_iter_get_basic(&value, &val);
> + service->mdns_config = val;
> +
> + mdns_configuration_changed(service);
> +
> + set_mdns(service, service->mdns_config);
> +
> + service_save(service);
> } else if (g_str_equal(name, "IPv4.Configuration") ||
> g_str_equal(name, "IPv6.Configuration")) {
>
> @@ -5273,6 +5368,12 @@ void __connman_service_set_search_domains(struct
> connman_service *service,
> searchdomain_add_all(service);
> }
>
> +int __connman_service_set_mdns(struct connman_service *service,
> + bool enabled)
> +{
> + return set_mdns(service, enabled);
> +}
> +
> static void report_error_cb(void *user_context, bool retry,
> void *user_data)
> {
> @@ -6001,6 +6102,7 @@ int __connman_service_ipconfig_indicate_state(struct
> connman_service *service,
> "Default service remains in READY state.");
> if (type == CONNMAN_IPCONFIG_TYPE_IPV4)
> service_rp_filter(service, true);
> + set_mdns(service, service->mdns_config);
> break;
> case CONNMAN_SERVICE_STATE_ONLINE:
> break;
>
Thanks,
Daniel
------------------------------
Message: 3
Date: Sun, 15 Oct 2017 22:34:45 +0200
From: Daniel Wagner <[email protected]>
To: Vasyl Vavrychuk <[email protected]>
Cc: [email protected]
Subject: Re: autoconnect should be disabled while password input is in
progress
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Vasyl,
On 10/12/2017 11:25 PM, Vasyl Vavrychuk wrote:
> Hi All,
>
> I can reproduce situation described in this commit
> https://git.merproject.org/mer-core/connman/commit/b060f70489a431b9fa13f9c47ab642edf74bdb53
>
> 1. Suppose we are already connected to some network.
> 2. Click on another WPA-personal network to connect for which we do not
> have password recorded.
> 3. Password popup dialog will appear.
>
> Problem: status of connected network will be changed to: connect-failed,
> connecting... etc.
>
> Is it possible to integrate mentioned patch?
The patch seems to fix a real concurrency problem if I understood it
correctly. Please send it to mailing list with a better commit message
describing it in more details what is happening.
Thanks,
Daniel
------------------------------
Message: 4
Date: Sun, 15 Oct 2017 22:36:40 +0200
From: Daniel Wagner <[email protected]>
To: [email protected], [email protected]
Cc: [email protected]
Subject: Re: [PATCH 1/2] wifi: Fix behaviour when Background scanning
is disabled
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi,
Do we have any updates on this series? Ready to apply?
Thanks,
Daniel
------------------------------
Message: 5
Date: Mon, 16 Oct 2017 19:24:49 +0530
From: Saurav Babu <[email protected]>
To: [email protected]
Cc: [email protected], Saurav Babu <[email protected]>
Subject: [PATCH] wifi: Don't perform handle_wps_completion() when p2p
is connecting
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
When p2p is connecting and other device acts as Group owner then
G_SUPPLICANT_STATE_COMPLETED is received after P2P Group formation is
success. handle_wps_completion() function disconnects the network if
wps_ssid doesn't match with ssid, due to this reason P2P connection is
never successful.
---
plugins/wifi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 74f216d..a874112 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -2415,6 +2415,9 @@ static void interface_state(GSupplicantInterface
*interface)
/* though it should be already stopped: */
stop_autoscan(device);
+ if (wifi->p2p_connecting)
+ break;
+
if (!handle_wps_completion(interface, network, device, wifi))
break;
--
1.9.1
------------------------------
Message: 6
Date: Mon, 16 Oct 2017 19:27:12 +0530
From: Saurav Babu <[email protected]>
To: [email protected]
Cc: [email protected], Saurav Babu <[email protected]>
Subject: [PATCH] peer: Don't try to connect to already connected peer
Message-ID:
<[email protected]>
Content-Type: text/plain; charset="utf-8"
Signed-off-by: Saurav Babu <[email protected]>
---
src/peer.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/peer.c b/src/peer.c
index 340cbcc..1b9b80e 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -606,6 +606,9 @@ static int peer_connect(struct connman_peer *peer)
{
int err = -ENOTSUP;
+ if (is_connected(peer))
+ return -EISCONN;
+
if (peer_driver->connect)
err = peer_driver->connect(peer,
CONNMAN_PEER_WPS_UNKNOWN, NULL);
--
1.9.1
------------------------------
Message: 7
Date: Mon, 16 Oct 2017 17:47:17 +0300
From: Mikhail Kovyazin <[email protected]>
To: [email protected]
Subject: [PATCH] client: add newline to every error message
Message-ID: <[email protected]>
---
client/commands.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/client/commands.c b/client/commands.c
index 583095b1..39f15b0a 100644
--- a/client/commands.c
+++ b/client/commands.c
@@ -245,7 +245,7 @@ static int state_print(DBusMessageIter *iter, const char
*error,
DBusMessageIter entry;
if (error) {
- fprintf(stderr, "Error: %s", error);
+ fprintf(stderr, "Error: %s\n", error);
return 0;
}
@@ -272,7 +272,7 @@ static int clock_print(DBusMessageIter *iter, const char
*error,
DBusMessageIter entry;
if (error) {
- fprintf(stderr, "Error: %s", error);
+ fprintf(stderr, "Error: %s\n", error);
return 0;
}
@@ -1735,7 +1735,7 @@ static int session_connect_cb(DBusMessageIter *iter,
const char *error,
void *user_data)
{
if (error) {
- fprintf(stderr, "Error: %s", error);
+ fprintf(stderr, "Error: %s\n", error);
return 0;
}
@@ -1754,7 +1754,7 @@ static int session_disconnect_cb(DBusMessageIter *iter,
const char *error,
void *user_data)
{
if (error)
- fprintf(stderr, "Error: %s", error);
+ fprintf(stderr, "Error: %s\n", error);
return 0;
}
@@ -3012,7 +3012,7 @@ static int populate_technology_hash(DBusMessageIter
*iter, const char *error,
void *user_data)
{
if (error) {
- fprintf(stderr, "Error getting technologies: %s", error);
+ fprintf(stderr, "Error getting technologies: %s\n", error);
return 0;
}
--
2.14.2
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 24, Issue 19
***************************************