connman.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] service: Ask for password when using native autoconnect
@ 2021-06-23  7:21 Daniel Wagner
  2021-06-23  7:39 ` Daniel Wagner
  2021-06-24  8:45 ` Carsten Haitzler
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Wagner @ 2021-06-23  7:21 UTC (permalink / raw)
  To: connman; +Cc: Carsten Haitzler, Daniel Wagner

When the native mode is activated we still need to ask for the
password if it's unknown.

Fixes: 561f318003c1 ("service: Teach autoconnect algorithm native mode")
---

Hi Carsten,

Sorry it took so long. There were some fallouts from recent gcc
warnings I had to look after first. Anyway, this patch fixed the
problem you reported for me. Please, let me know if there is still a
problem after this patch.

Thanks,
Daniel

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

diff --git a/src/service.c b/src/service.c
index 20917a8923a4..eb74a85d6e32 100644
--- a/src/service.c
+++ b/src/service.c
@@ -6756,7 +6756,8 @@ int __connman_service_connect(struct connman_service *service,
 				service->provider)
 			connman_provider_disconnect(service->provider);
 
-	if (service->connect_reason == CONNMAN_SERVICE_CONNECT_REASON_USER) {
+	if (reason == CONNMAN_SERVICE_CONNECT_REASON_USER ||
+			reason == CONNMAN_SERVICE_CONNECT_REASON_NATIVE) {
 		if (err == -ENOKEY || err == -EPERM) {
 			DBusMessage *pending = NULL;
 			const char *dbus_sender = get_dbus_sender(service);
-- 
2.32.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] service: Ask for password when using native autoconnect
  2021-06-23  7:21 [PATCH] service: Ask for password when using native autoconnect Daniel Wagner
@ 2021-06-23  7:39 ` Daniel Wagner
  2021-06-24  8:45 ` Carsten Haitzler
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Wagner @ 2021-06-23  7:39 UTC (permalink / raw)
  To: connman; +Cc: Carsten Haitzler

On Wed, Jun 23, 2021 at 09:21:30AM +0200, Daniel Wagner wrote:
> When the native mode is activated we still need to ask for the
> password if it's unknown.
> 
> Fixes: 561f318003c1 ("service: Teach autoconnect algorithm native mode")

Patch applied

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] service: Ask for password when using native autoconnect
  2021-06-23  7:21 [PATCH] service: Ask for password when using native autoconnect Daniel Wagner
  2021-06-23  7:39 ` Daniel Wagner
@ 2021-06-24  8:45 ` Carsten Haitzler
  1 sibling, 0 replies; 3+ messages in thread
From: Carsten Haitzler @ 2021-06-24  8:45 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: connman

On Wed, 23 Jun 2021 09:21:30 +0200 Daniel Wagner <wagi@monom.org> said:

Confirmed. It works now. Thanks! :)

> When the native mode is activated we still need to ask for the
> password if it's unknown.
> 
> Fixes: 561f318003c1 ("service: Teach autoconnect algorithm native mode")
> ---
> 
> Hi Carsten,
> 
> Sorry it took so long. There were some fallouts from recent gcc
> warnings I had to look after first. Anyway, this patch fixed the
> problem you reported for me. Please, let me know if there is still a
> problem after this patch.
> 
> Thanks,
> Daniel
> 
>  src/service.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/service.c b/src/service.c
> index 20917a8923a4..eb74a85d6e32 100644
> --- a/src/service.c
> +++ b/src/service.c
> @@ -6756,7 +6756,8 @@ int __connman_service_connect(struct connman_service
> *service, service->provider)
>  			connman_provider_disconnect(service->provider);
>  
> -	if (service->connect_reason == CONNMAN_SERVICE_CONNECT_REASON_USER) {
> +	if (reason == CONNMAN_SERVICE_CONNECT_REASON_USER ||
> +			reason == CONNMAN_SERVICE_CONNECT_REASON_NATIVE) {
>  		if (err == -ENOKEY || err == -EPERM) {
>  			DBusMessage *pending = NULL;
>  			const char *dbus_sender = get_dbus_sender(service);
> -- 
> 2.32.0
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
Carsten Haitzler - raster@rasterman.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-24  8:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23  7:21 [PATCH] service: Ask for password when using native autoconnect Daniel Wagner
2021-06-23  7:39 ` Daniel Wagner
2021-06-24  8:45 ` Carsten Haitzler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).