Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1475793rwd; Thu, 1 Jun 2023 16:41:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4hRXA/6t1VFoa80FzsKKec/rMlalT3W9UF9lQroCaDnb5rndio6ueHzISp+qKmr9UupI/c X-Received: by 2002:a05:6358:52d0:b0:123:2d9a:5edb with SMTP id z16-20020a05635852d000b001232d9a5edbmr7851918rwz.15.1685662914292; Thu, 01 Jun 2023 16:41:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685662914; cv=none; d=google.com; s=arc-20160816; b=K6O5T/z+W6Lqmfc7LW5JeT70g7W4pSyCZ0p2qn02PiBN/TU01sJkBNb8q2NZwp7Hgr dPZBRRhu8/FIFoJji+dFZU/hUWX/9UPZ+ufNJmsp7jy61NdjvZtKfP9C4RsX4CidDF/z u3OYJRlIZOyCI1q8pvWEr7INAMXYD9+blrqZyps9aDedFGOWnkIp+CLH3wRRr8h4rAUh zwiHewHmlXYjc9Xv5nnzwq9BK5iyBdEJVfJdwbP24484kwSzLydQ7quWdxd423JsHwi1 A2iMninN0kOoLWK40ASRF7vZIJTPtSQWEsg0rJK5HxEHhPa5cFN8Qck/KiOc4Da5Bm6y BA5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=dSCV8BxOlg0I7DIlrGZCljWyg/rOkqmB/KoboSuxCjc=; b=xKPQhq2SqBI+mOrs9Z0DjgCKaqJPgLWxXJtPG3sfyO3kYxUNxqZphNwO2PB9Dhi/Xu puk9Itsvs0bbxL9EHtj0lUpR/kRky8QYAUDWo33PoMxAdIlkPIYjvr9fUxTwZIuNMMLg BgxjlP/71KFmoxdNVbZRv84c7FN/hIjl0jKizG9cI63cldadJ26kg+qwE8KynbjBM7I0 DhgnAFYZvda4Qgq1BZj1pIqn8a7jyGpphJSpFIX8v+l0x6s0qGf6GrZiOppRMn1aGQnB klSAL5M2iXTljIFBTEBftK0+jglVh6/J8ZiNaDBDpJ2+rW3rs6NjuxtYt1Ky9DvijSni swQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=mPpuwpVj; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w191-20020a6382c8000000b00541cf841637si937136pgd.539.2023.06.01.16.41.39; Thu, 01 Jun 2023 16:41:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=mPpuwpVj; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231942AbjFAXdZ (ORCPT + 99 others); Thu, 1 Jun 2023 19:33:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232772AbjFAXdX (ORCPT ); Thu, 1 Jun 2023 19:33:23 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD5431A1 for ; Thu, 1 Jun 2023 16:33:21 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1b1806264e9so8811695ad.0 for ; Thu, 01 Jun 2023 16:33:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685662400; x=1688254400; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=dSCV8BxOlg0I7DIlrGZCljWyg/rOkqmB/KoboSuxCjc=; b=mPpuwpVjy6uU471KBZDgykTjz90AgdiqN0r+Ql7kCk2iIABvof3/XTuVm/dM0kNiEb hC9BqOEADvYiJTB2s0u74mHp/qT+INAtqrT0NiSi7+P+rIwmToAuPovDpSxftW1dvgEW HJ0gzRciihl6sFR0OYI7RmfxGhxTHAeExK+8iZUkSM6CCkLu/rShfn2+RyUbM+une/bZ PQ02cGIS15vflQzrfWfPKcf4FDVJQCdDPDgpes3/kSfdq5eUbqSk8L7+8Ob0NCN6phby 6bnMd+W2zYScYFc8hNlS39wH8VoYR0LQeqDhbpC0Mz57QeNnsXmgmPxYqNpphdnx+mlI p8gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685662400; x=1688254400; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dSCV8BxOlg0I7DIlrGZCljWyg/rOkqmB/KoboSuxCjc=; b=C7p5qwGsSOO8kTdqd1qqhJiX9svxwJ7hn5D+vx9xBHuaTe79XFTM5RnS8cRkVQCWxE I8BbKn/PNd3m6TLMbloE7X2v1xUbbK0uORCAHn3Mu+6lanS6dykxbZ8k97n4141xO/oP s4vlbXju/yzM4kTllaHK7/yCg49K9kcmGsRkSs1takubdSSBiy7dp+IjMPgxzQiR12MR VOfWKPB/jF1MUNU2s2XBjCOyjFZwS5iG8b4sgFrVt3ulxGPckcYyBydpb7k2DxWuouL0 fOLI7IgPTuSrnC/tGAgp7+OtNwhRrR/Jjg5J6RuqTvlajEAH2dfJ/KIE66uYmQNVgt5t 99uQ== X-Gm-Message-State: AC+VfDygNQ/tMOkR4rYCZZdNAjwWxLgwWzfxa6V0psHlier6EkUwxTBs FsLXak9wRLJd6S+YiZjicN3y/e8LZEk= X-Received: by 2002:a17:902:8697:b0:1a1:a800:96a7 with SMTP id g23-20020a170902869700b001a1a80096a7mr734364plo.8.1685662400321; Thu, 01 Jun 2023 16:33:20 -0700 (PDT) Received: from lvondent-mobl4.. (c-71-59-129-171.hsd1.or.comcast.net. [71.59.129.171]) by smtp.gmail.com with ESMTPSA id s7-20020a170902a50700b001ab0b2dad2fsm4051420plq.211.2023.06.01.16.33.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 16:33:19 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ 2/2] shared/bap: Don't overwrite attribute declaration Date: Thu, 1 Jun 2023 16:33:17 -0700 Message-Id: <20230601233317.1419030-2-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230601233317.1419030-1-luiz.dentz@gmail.com> References: <20230601233317.1419030-1-luiz.dentz@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz The attribute declaration (e.g. characteristic properties) shall not be overwritten as they are part of the information that is part of the cache beside the same information is already stored as part of the bt_bap instance. --- src/shared/bap.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/shared/bap.c b/src/shared/bap.c index 26f41be768e9..86c2634472fb 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -3077,9 +3077,6 @@ static void read_source_pac_loc(bool success, uint8_t att_ecode, pacs->source_loc_value = get_le32(value); - gatt_db_attribute_write(pacs->source_loc, 0, value, length, 0, NULL, - NULL, NULL); - /* Resume reading sinks if supported but for some reason is empty */ if (pacs->source && queue_isempty(bap->rdb->sources)) { uint16_t value_handle; @@ -3113,9 +3110,6 @@ static void read_sink_pac_loc(bool success, uint8_t att_ecode, pacs->sink_loc_value = get_le32(value); - gatt_db_attribute_write(pacs->sink_loc, 0, value, length, 0, NULL, - NULL, NULL); - /* Resume reading sinks if supported but for some reason is empty */ if (pacs->sink && queue_isempty(bap->rdb->sinks)) { uint16_t value_handle; @@ -3149,9 +3143,6 @@ static void read_pac_context(bool success, uint8_t att_ecode, pacs->sink_context_value = le16_to_cpu(ctx->snk); pacs->source_context_value = le16_to_cpu(ctx->src); - - gatt_db_attribute_write(pacs->context, 0, value, length, 0, NULL, - NULL, NULL); } static void read_pac_supported_context(bool success, uint8_t att_ecode, @@ -3175,9 +3166,6 @@ static void read_pac_supported_context(bool success, uint8_t att_ecode, pacs->supported_sink_context_value = le16_to_cpu(ctx->snk); pacs->supported_source_context_value = le16_to_cpu(ctx->src); - - gatt_db_attribute_write(pacs->supported_context, 0, value, length, 0, - NULL, NULL, NULL); } static void foreach_pacs_char(struct gatt_db_attribute *attr, void *user_data) -- 2.40.1