Immutable VPN connection settings cannot be changed by SetProperty or
ClearProperty dbus API.
---
 vpn/vpn-provider.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c
index 2660c05..2a52856 100644
--- a/vpn/vpn-provider.c
+++ b/vpn/vpn-provider.c
@@ -408,6 +408,9 @@ static DBusMessage *set_property(DBusConnection *conn, 
DBusMessage *msg,
 
        DBG("conn %p", conn);
 
+       if (provider->immutable == TRUE)
+               return __connman_error_not_supported(msg);
+
        if (dbus_message_iter_init(msg, &iter) == FALSE)
                return __connman_error_invalid_arguments(msg);
 
@@ -458,6 +461,9 @@ static DBusMessage *clear_property(DBusConnection *conn, 
DBusMessage *msg,
 
        DBG("conn %p", conn);
 
+       if (provider->immutable == TRUE)
+               return __connman_error_not_supported(msg);
+
        dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &name,
                                                        DBUS_TYPE_INVALID);
 
-- 
1.7.11.4

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to