Don't allow remove method calls on non-favorite services
authorMarcel Holtmann <marcel@holtmann.org>
Fri, 15 May 2009 07:01:57 +0000 (00:01 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 15 May 2009 07:01:57 +0000 (00:01 -0700)
src/service.c

index bfc09ba..a6ee992 100644 (file)
@@ -417,6 +417,9 @@ static DBusMessage *remove_service(DBusConnection *conn,
        if (service->type == CONNMAN_SERVICE_TYPE_ETHERNET)
                return __connman_error_not_supported(msg);
 
+       if (service->favorite == FALSE)
+               return __connman_error_not_supported(msg);
+
        if (service->network != NULL) {
                struct connman_device *device;