Message ID | AM0PR10MB3265CE91F2AB6FF1F8C8013298619@AM0PR10MB3265.EURPRD10.PROD.OUTLOOK.COM |
---|---|
State | New |
Headers | show
Return-Path: <linux-bluetooth-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11080C433E0 for <linux-bluetooth@archiver.kernel.org>; Fri, 26 Mar 2021 12:40:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD77961992 for <linux-bluetooth@archiver.kernel.org>; Fri, 26 Mar 2021 12:40:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230121AbhCZMj2 (ORCPT <rfc822;linux-bluetooth@archiver.kernel.org>); Fri, 26 Mar 2021 08:39:28 -0400 Received: from mail-eopbgr80041.outbound.protection.outlook.com ([40.107.8.41]:14595 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230141AbhCZMjW (ORCPT <rfc822; linux-bluetooth@vger.kernel.org>); Fri, 26 Mar 2021 08:39:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OFUV3bXR71oDvkORbcoKxR87wY2LGZoUBB9+pldKvEdp1jytEdIJ5rRic8p7g1d3B4EABiiLr7rAjCdp96rH1JEW73DIvnUoIm0JpYtpdGPueroQGWm9l5zajjYmnHVwos36fgIHd0fNH7+5BRSc8nZ2kXCkN2d437tb565pelQIgTb3clHvCcjI9g8DN72C3jyyB1//XmAqAZUA0NudGZnybgaHUkPkpRqK2ePlF8ZC5vBgkc2D2JUd7B5v+Z4FMwakG2CCJMUvlUOnVGiXebUmGpLLRnYCMHpHdDQ+xLhM60UcGWuNp93NzO9OHU6tW+iNUQoYIg3HpNwfT1xO0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tt/qfW3p17xhOhtBULtzXuCujSN3XmuHrt4qNjRQ9DM=; b=Iob+Q+ffvkFeRn12iPef6xJk44NlV1B5OeRFIZmwPMhfdS1Lfpen21+HT75em5wpV1nEN0MDcX5xiyqDMftDL21M1fO3EM0o0C62bvRFxot6rnRboqAWumuj/Wm0+wMh8gyg+qHVJKWncI6T5SWZCu4YGHkhBmFX2ImLhgye3nBXGPuqduioklWJXoDdkBiAvwXtQ0KO/H/H9rIS/4FQLIJIWx5Co+S5Cw5VFW5d+eiZRjwBr9u52fFm0tV9D3DA903QbsTZfoxV282HdiqD+KDCJo/sfkxG1i4YLmTglcYUOYEb6Q+Aw2fWAG5O0Q3dwSCggKSIiWIRdpl7EQfUCA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=expleogroup.com; dmarc=pass action=none header.from=expleogroup.com; dkim=pass header.d=expleogroup.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=expleogroup.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tt/qfW3p17xhOhtBULtzXuCujSN3XmuHrt4qNjRQ9DM=; b=lV32Ejsc+8osYuFg3E5bmQRr6BgMlWHv7GSK4VjdMAyy+nIP5M5vJ0lWIXAJfgSvosqP6QbZCWxbvdft6hl8qQwEfmzRCT8KKzZbeX58BqKARe1Vwa23LQMGVK4+pz6yA4fgJS1xvNEMUcNCf614Y931uZ2njEDHxVNtG7p4++yGR+gJaz2L1U3Zg+mIahTrYZIy9K28ReUjrizLcZkW+DogQCNDgGMHC1YaQtBrIdqaxaXfP5JItzbuznC7kx6l28XXtm26E0WejFe9PJa3x2vIo/EALbqQjUGkt6WjJyeMr6lRFXcDqJ2tfSyohml2ZU9y34ekMJ+WPDW1FqIybQ== Received: from AM0PR10MB3265.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:18c::20) by AM9PR10MB4104.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:1f2::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25; Fri, 26 Mar 2021 12:39:18 +0000 Received: from AM0PR10MB3265.EURPRD10.PROD.OUTLOOK.COM ([fe80::ccd0:37d7:6174:642e]) by AM0PR10MB3265.EURPRD10.PROD.OUTLOOK.COM ([fe80::ccd0:37d7:6174:642e%9]) with mapi id 15.20.3977.025; Fri, 26 Mar 2021 12:39:18 +0000 From: Alexander Haas <alexander.haas@expleogroup.com> To: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org> Subject: [PATCH BlueZ] gatt: allow 'notify' and 'indicate' flags Thread-Topic: [PATCH BlueZ] gatt: allow 'notify' and 'indicate' flags Thread-Index: AdciNuAAb0iKY3IsSDGgpvHlk9uNHA== Date: Fri, 26 Mar 2021 12:39:18 +0000 Message-ID: <AM0PR10MB3265CE91F2AB6FF1F8C8013298619@AM0PR10MB3265.EURPRD10.PROD.OUTLOOK.COM> Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=expleogroup.com; x-originating-ip: [92.218.234.3] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 15475506-71a1-4de3-7716-08d8f0542c36 x-ms-traffictypediagnostic: AM9PR10MB4104: x-microsoft-antispam-prvs: <AM9PR10MB410455187DCD682FCB6F504E98619@AM9PR10MB4104.EURPRD10.PROD.OUTLOOK.COM> x-ms-oob-tlc-oobclassifiers: OLM:5236; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pj4Fl6mHh4lD8M2gAfAcKFVeFSQBftRU1OBo5mgeFnwwmGWVyNTmtJh8p1mryBqJbLx6Hgqs8aELgGF+PAgD5PcGWREFkcX1t41JR+h4+gq+HcG3QU8LGc1bhqVQZMIdw1pQuSDfn6rDP4FI5RNuIk7K8ky5zIMYbkRDp9Bh3+hgSGzlMlRXpql/+Fd+4qVKZKh2oaj4NPg2gWsWXcDIq/AZSuxlYymZnoxX8COHBO63PEt9bm1sE2EPrPSV/Hw49o7Gxiv+WTi5ddo5NvxZomfRRy2VFCJ6mQ4WSamq3IZEXh+7oP5E13N9z9PS5oHIR8MSpPLcVIl8bxrsASkmTLqYKrOz6V4d6lNWXm4uGBxPNg+70/8+NR/VvvYXh03+kzxUzxanLOyQaW8IC6lm7Nm+sMiexbhV5zyKIqXNDb0OPfrFQUzErqBPruxSOY5B8zal3mtQhIl90U/W6/t01WZ8o2c6ipdo8DiJqXKbkkOUHohgTpWyzuly9E2GxCXmdGXFYvFZIoeztCV+elUYNPCnK35nEvsC07BWqsi4vdvi6qtvin9IMQCpOj944m4ZY/9n509N22WBB0qXUJp4cPD1tPj0IZwDbFFFvrxapNUAz6z2PwliyKIrdSMlU2VsZ/DEESnDDBLnv+i93EZsTTX8Rsr0Q+SGVtRnhyTqNg8= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR10MB3265.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(376002)(39860400002)(136003)(366004)(396003)(346002)(33656002)(76116006)(64756008)(6916009)(86362001)(66476007)(66556008)(66446008)(5660300002)(52536014)(71200400001)(8676002)(316002)(7696005)(44832011)(66574015)(478600001)(8936002)(6506007)(9686003)(83380400001)(38100700001)(66946007)(26005)(186003)(55016002)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?utf-8?q?gEWfHuaFtsEN9+O/dX6rwzpQmxo?= =?utf-8?q?1wREtp531i40j0aCUUd7msIyNuT2TferXlHEVDRm/AT8Mi8tQEubNYKG?= =?utf-8?q?Vaja9wK+GE6ThskZLDa6lrYiJfHft8fUQZC+MBFhPderMhdAfJsCWjla?= =?utf-8?q?qlksXgoxoopqXyFgm5x/DXrot91iT2Fje0/giwQ7MYu0IPJiuGPF27nB?= =?utf-8?q?FCLoR53PBuXMMfL3OXHS2/mMij6wsorI4MlPBi4DFbz8RNN8nBUaq0bP?= =?utf-8?q?ZMRrz6ceoGkAxtJblIn/vU7dLGpOXMySB1neXfHAIgKTy7xL7Un7ofR8?= =?utf-8?q?reHcHYcv+NO6sfJ6jkgwrbhebdqsQBuP4oN5MfPRNbQVKX6INP00i2ln?= =?utf-8?q?HUwQlHvhK0jj8c2DRIKneudEUQtGg4HpIl7HomsYaCzVYEx4XE/WGIzQ?= =?utf-8?q?Hh+4IVS/kia/y1XZ0hJJnd56/a/bTqQbYTDJnip9MtXoJzW4gONYZIvj?= =?utf-8?q?DFav9OzMqH5fcAcD3ki5B36/5NMuAulYRKCrFpssLK00+Tko0TReEiX3?= =?utf-8?q?oqSJVMpdccQNi9+PNJiUQdhimmMy+VRU7SPo3vk6U0gTaMa0Sr90v6zz?= =?utf-8?q?liBQHfDq4uI4yOuRcC6KIQcKsY/HvTEHOySj3LjuDI0eWtE2v4gNiTQ8?= =?utf-8?q?0PgslWOKMq5p7WonEKUT9zFMk3+byGDk8idvzgFw//b8KChql1ERQuvu?= =?utf-8?q?B93QiLYsl82xIsDVTesmR06+gOHJ8yJ7jUcCW/1DXeSwjsG0flP7c/qK?= =?utf-8?q?+/Hmp/vwWYGgb4lMKXVHYKQg9RZtX6C0qvEcSGX64yEq04quxTXSjMPh?= =?utf-8?q?H6U0mQMuejz/muhWos78qq1eEjQ5gjNk8RvovZVLIWpf1j1UI9Zmmx2c?= =?utf-8?q?eG4Uuk8IWGsB9SRTG3DZ21c+0NDp0peoJR6l06QA3nOpFHlI45RlRpFc?= =?utf-8?q?3IpNTlK84K8LpaMAS9ftJvRaHFNWqetco+lm2f3AZZ/3Q0FgQ/p3A4Tu?= =?utf-8?q?G57wXSVodgsFvYdg0I1NmKLdEcy1UYzJKUkCRSqb/U8ynvsC7h0SpqqR?= =?utf-8?q?brUP/9yNXNm4n4kNbRb7BCIdRcJUYaWAI7uzwzEueNvYLpv1hc31Il9R?= =?utf-8?q?Bf4dk88/aXDulNYWTNwptFnKbF9zw6scYxXgbI6cYq/OpPXknWHZXrEm?= =?utf-8?q?GLHN8erIVyhQNO9n6mfHSY/j3/KrGrWbWv0w8mCF5NVqbV3boVrpTAO5?= =?utf-8?q?TyzI43+pAylHflE8C68jLPK09C8Q8dD6yQ94cGRz/2jPUCz7DLWw1KDs?= =?utf-8?q?1xKl+BqXRecKZmqlggPH0569pu9jtLFuhVWO7EH2QrQIfEOQmTOKnQZx?= =?utf-8?q?9e/2ZmYk=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: expleogroup.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM0PR10MB3265.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 15475506-71a1-4de3-7716-08d8f0542c36 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2021 12:39:18.1605 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3b0e7247-e0d5-44bf-8ed1-d01b18d16ca2 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qYNU9h3494kgTzBFM1N9f86kNpzByLH1bqZA/2CmVanWayWHr9oaftuhAA51Yu6w2QRMg9xcj0AMjSkzHrGQxGUavSeKTEjfEDT57/GABNE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR10MB4104 Precedence: bulk List-ID: <linux-bluetooth.vger.kernel.org> X-Mailing-List: linux-bluetooth@vger.kernel.org |
Series |
[BlueZ] gatt: allow 'notify' and 'indicate' flags
|
expand
|
diff --git a/src/gatt-database.c b/src/gatt-database.c index be6dfb265..8e16c1d79 100644 --- a/src/gatt-database.c +++ b/src/gatt-database.c @@ -2648,9 +2648,9 @@ static uint8_t ccc_write_cb(struct pending_op *op, void *user_data) return BT_ATT_ERROR_INSUFFICIENT_RESOURCES; /* Don't support undefined CCC values yet */ - if (value > 2 || - (value == 1 && !(chrc->props & BT_GATT_CHRC_PROP_NOTIFY)) || - (value == 2 && !(chrc->props & BT_GATT_CHRC_PROP_INDICATE))) + if (value > 3 || + (value & 0x1 && !(chrc->props & BT_GATT_CHRC_PROP_NOTIFY)) || + (value & 0x2 && !(chrc->props & BT_GATT_CHRC_PROP_INDICATE))) return BT_ERROR_CCC_IMPROPERLY_CONFIGURED; if (chrc->notify_io) {