From patchwork Tue Apr 21 07:59:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archie Pusaka X-Patchwork-Id: 11500677 X-Patchwork-Delegate: luiz.dentz@gmail.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1C05D159A for ; Tue, 21 Apr 2020 07:59:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 01AFC21473 for ; Tue, 21 Apr 2020 07:59:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="SWpeN2Qu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726716AbgDUH72 (ORCPT ); Tue, 21 Apr 2020 03:59:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726691AbgDUH72 (ORCPT ); Tue, 21 Apr 2020 03:59:28 -0400 Received: from mail-pj1-x1049.google.com (mail-pj1-x1049.google.com [IPv6:2607:f8b0:4864:20::1049]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6A57C061A0F for ; Tue, 21 Apr 2020 00:59:26 -0700 (PDT) Received: by mail-pj1-x1049.google.com with SMTP id l9so2400612pjq.8 for ; Tue, 21 Apr 2020 00:59:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=HXFyDUscfdGi0ICO5wJP7agrZP67yVZV05e4YMvw9Tk=; b=SWpeN2QuWXTBr4GpLZq2XkDkvNlGEAvRV6L6NEh2rPNKeNE/puRDoe+BMlz5OC4vyZ 0ykYZK4VAynmXu+LJrFmZo99Mx/azKTxjma2995Js2qa/4yIkY+z96XovtBo/CjFnGzS TqZyer/pjJYQiGIa51dxY9THc3AnJmgtxqTUH74GWRqysn7wl6PZIKzzYFnjeUJMPOPg z/1edS46Nfhj1JEHFg9MQZ6SUelGSlvoAAu+6et4lOBSHylCRqQ5hvv+0ucd57AKGt14 Z+c60/rlW96w2dpWD9uhlbufZgoRP1VOxNUrDUc7wCcXzaPtFlwhSrlTmcgewnKNcTu9 JduA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=HXFyDUscfdGi0ICO5wJP7agrZP67yVZV05e4YMvw9Tk=; b=BqHlwT0N9lbvci40/wiUpckkLRkXvGfWDz6YrINnj38bcRZ+6W2eArswmhgWLFUFvr 3xpZ9KRAVhMGYojbqpB4RNfPR5CRJutui8dNVtQQMRTbr27vMfKFsVIzAOCA0YaBENWo wM4pYr3hjxvjXu8h8+GlRslhLMAkyc+TG3RUQyvsRQ6lFmg5J2RF/RrayJPy3lGoc2UO /gFJ4U0H+WD/kRXSdsK0or1h5AY8MWKLsjmaNrsgFkB9xa7JzmOeqz6YPnTRmQ/Mx4TS JZiyefC62tORyOePwromRAShvET0lgS6dAVQxQxL1SukzygJi4/8iSYTOjmC/Xtu9xSe 1euw== X-Gm-Message-State: AGi0PuYjN9KjYCZgNUN0Z/3IiwSq1ehwBrTKMsBW6zGWpL1gazzXhXaw R7wS4NMtQBIeypfn1QzWaniQhVkF0wxP7Du/Pn2rO9tFPc9TZGwsrJJ5XYWNNG9firlKkyr9Vnn 5zRas+GcpQTtTsha2+sn8GTqrhxGtEPkwFp+EvEMbMThsJoYoRaOw6H/WUvAUPsQODQCAwAZuH5 Ce X-Google-Smtp-Source: APiQypIvlB975qVtUHW8r5SMV/AGZasaU/ovhAuMDblxEMPFfFpBNlIdJ50rrmnnKNenfqW3tauc3QF9uI2U X-Received: by 2002:a17:90a:b884:: with SMTP id o4mr4075234pjr.8.1587455966342; Tue, 21 Apr 2020 00:59:26 -0700 (PDT) Date: Tue, 21 Apr 2020 15:59:14 +0800 Message-Id: <20200421155828.Bluez.v1.1.I6e4fbf41b1815dc3d497da5d9c94b18e9c912cba@changeid> Mime-Version: 1.0 X-Mailer: git-send-email 2.26.1.301.g55bc3eb7cb9-goog Subject: [Bluez PATCH v1] gatt: Fix service_changed characteristic permission From: Archie Pusaka To: linux-bluetooth , Luiz Augusto von Dentz Cc: Archie Pusaka Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Archie Pusaka According to bluetooth spec Ver 5.2, Vol 3, Part G, 7.1, the service_changed characteristic is not readable. Therefore, this patch marks it as such. --- src/gatt-database.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gatt-database.c b/src/gatt-database.c index f2da27694..8cbe09bae 100644 --- a/src/gatt-database.c +++ b/src/gatt-database.c @@ -1197,7 +1197,7 @@ static void populate_gatt_service(struct btd_gatt_database *database) bt_uuid16_create(&uuid, GATT_CHARAC_SERVICE_CHANGED); database->svc_chngd = gatt_db_service_add_characteristic(service, &uuid, - BT_ATT_PERM_READ, BT_GATT_CHRC_PROP_INDICATE, + BT_ATT_PERM_NONE, BT_GATT_CHRC_PROP_INDICATE, NULL, NULL, database); database->svc_chngd_ccc = service_add_ccc(service, database, NULL, NULL,