Send connman mailing list submissions to
        connman@lists.01.org

To subscribe or unsubscribe via email, send a message with subject or
body 'help' to
        connman-requ...@lists.01.org

You can reach the person managing the list at
        connman-ow...@lists.01.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."

Today's Topics:

   1. [PATCH] service: Revert GetProperties deprecation
      (VAUTRIN Emmanuel (Canal Plus Prestataire))


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

Date: Fri, 12 Feb 2021 18:52:10 +0000
From: "VAUTRIN Emmanuel (Canal Plus Prestataire)"
        <emmanuel.vaut...@cpexterne.org>
Subject: [PATCH] service: Revert GetProperties deprecation
To: "connman@lists.01.org" <connman@lists.01.org>
Message-ID:  <pr1pr02mb47944c660b2031cc21dbfc2b93...@pr1pr02mb4794.eur
        prd02.prod.outlook.com>
Content-Type: text/plain; charset="iso-8859-1"

Service GetProperties method is perfect to retrieve properties of a
single service and needs to be restored, to avoid processing and
transferring big amount of data that will be useless in this case.

Fixes: aedbdf2f8d64 ("doc: Mention deprecation of GetProperties methods")
Fixes: b957ceb15e5d ("service: Set deprecated flag for GetProperties method")
---
 doc/service-api.txt |  6 +++---
 src/service.c       | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/doc/service-api.txt b/doc/service-api.txt
index c0d5adbb2b57..b0db707658cf 100644
--- a/doc/service-api.txt
+++ b/doc/service-api.txt
@@ -5,13 +5,13 @@ Service               net.connman
 Interface      net.connman.Service
 Object path    [variable prefix]/{service0,service1,...}
 
-Methods                dict GetProperties()  [deprecated]
+Methods                dict GetProperties()
 
                        Returns properties for the service object. See
                        the properties section for available properties.
 
-                       Usage of this method is highly discouraged. Use
-                       the Manager.GetServices() method instead.
+                       This list will not contain sensitive information
+                       like passphrases etc.
 
                        Possible Errors: [service].Error.InvalidArguments
 
diff --git a/src/service.c b/src/service.c
index 69f0a511053e..48525a71074c 100644
--- a/src/service.c
+++ b/src/service.c
@@ -2516,8 +2516,8 @@ int 
connman_service_iterate_services(connman_service_iterate_cb cb,
        return ret;
 }
 
-static void append_properties(DBusMessageIter *dict, dbus_bool_t limited,
-                                       struct connman_service *service)
+static void append_properties(DBusMessageIter *dict,
+                               struct connman_service *service)
 {
        dbus_bool_t val;
        const char *str;
@@ -2668,7 +2668,7 @@ static void append_dict_properties(DBusMessageIter *dict, 
void *user_data)
 {
        struct connman_service *service = user_data;
 
-       append_properties(dict, TRUE, service);
+       append_properties(dict, service);
 }
 
 static void append_struct(gpointer value, gpointer user_data)
@@ -3260,7 +3260,7 @@ static DBusMessage *get_properties(DBusConnection *conn,
        dbus_message_iter_init_append(reply, &array);
 
        connman_dbus_dict_open(&array, &dict);
-       append_properties(&dict, FALSE, service);
+       append_properties(&dict, service);
        connman_dbus_dict_close(&array, &dict);
 
        return reply;
@@ -5001,7 +5001,7 @@ static bool allow_property_changed(struct connman_service 
*service)
 }
 
 static const GDBusMethodTable service_methods[] = {
-       { GDBUS_DEPRECATED_METHOD("GetProperties",
+       { GDBUS_METHOD("GetProperties",
                        NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
                        get_properties) },
        { GDBUS_METHOD("SetProperty",
-- 
2.25.1

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

Subject: Digest Footer

_______________________________________________
connman mailing list -- connman@lists.01.org
To unsubscribe send an email to connman-le...@lists.01.org


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

End of connman Digest, Vol 64, Issue 12
***************************************

Reply via email to