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. [PATCH] client: Add support for ClearProperty Service API
(Saurav Babu)
2. [PATCH] service: Fix auto_connect service if state is not
failure and ClearProperty is called (Saurav Babu)
----------------------------------------------------------------------
Message: 1
Date: Wed, 20 Jan 2016 17:49:36 +0530
From: Saurav Babu <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: [PATCH] client: Add support for ClearProperty Service API
Message-ID:
<[email protected]>
ClearProperty API used by connman to clear the value of readonly Error property
of a service. This patch adds a new config_option "clear" in the Service
Configuration option to clear the readonly Error property.
---
client/commands.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/client/commands.c b/client/commands.c
index db24d16..70e5b62 100644
--- a/client/commands.c
+++ b/client/commands.c
@@ -1193,6 +1193,14 @@ static int cmd_config(char *args[], int num, struct
connman_option *options)
config_return, g_strdup(service_name),
NULL, NULL);
break;
+ case 'c':
+ res = __connmanctl_dbus_method_call(connection,
+ CONNMAN_SERVICE, path,
+ "net.connman.Service", "ClearProperty",
+ config_return, g_strdup(service_name),
+ config_append_str, &append);
+ index += append.values;
+ break;
default:
res = -EINVAL;
break;
@@ -2183,6 +2191,7 @@ static struct connman_option config_options[] = {
{"autoconnect", 'a', "yes|no"},
{"ipv4", 'i', "off|dhcp|manual <address> <netmask> <gateway>"},
{"remove", 'r', " Remove service"},
+ {"clear", 'c', "Error Clear readonly Error property"},
{ NULL, }
};
--
1.9.1
------------------------------
Message: 2
Date: Wed, 20 Jan 2016 17:52:45 +0530
From: Saurav Babu <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: [PATCH] service: Fix auto_connect service if state is not
failure and ClearProperty is called
Message-ID:
<[email protected]>
If ClearProperty method is called with property Error and service state
other than failure then connman tries to auto_connect service if
connect_reason was not CONNMAN_SERVICE_CONNECT_REASON_USER. This patch
tries to run auto_connect only when service state was changed to idle
from failure.
---
src/service.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/service.c b/src/service.c
index abf0899..65439d1 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3566,10 +3566,17 @@ static DBusMessage *clear_property(DBusConnection *conn,
DBUS_TYPE_INVALID);
if (g_str_equal(name, "Error")) {
+ int err;
+
set_error(service, CONNMAN_SERVICE_ERROR_UNKNOWN);
- __connman_service_clear_error(service);
- service_complete(service);
+ err = __connman_service_clear_error(service);
+
+ if (err < 0) {
+ g_get_current_time(&service->modified);
+ service_save(service);
+ } else
+ service_complete(service);
} else
return __connman_error_invalid_property(msg);
--
1.9.1
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 3, Issue 14
**************************************