Skip to contentSkip to conversation

service: Ask for password when using native autoconnect

PATCH In review Daniel Wagner 2 participants 3 messages Jun 23, 2021 – Jun 24, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 service: Ask for password when using native autoconnect

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(-)
src/service.c +2 -1
index 20917a8923a4..eb74a85d6e32 100644
@@ -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);
Signature · 1 line
2.32.0
#1 lore raw
Quoted 4 lines · 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")

Patch applied

#2 lore raw
In reply to Daniel Wagner

On Wed, 23 Jun 2021 09:21:30 +0200 Daniel Wagner <[email protected]> said:

Confirmed. It works now. Thanks! :)

Quoted 36 lines

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(-)
src/service.c +2 -1
index 20917a8923a4..eb74a85d6e32 100644
@@ -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);
Signature · 1 line
2.32.0
Signature · 2 lines
------------- Codito, ergo sum - "I code, therefore I am" --------------
Carsten Haitzler - [email protected]