Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7382951rwl; Thu, 23 Mar 2023 03:41:11 -0700 (PDT) X-Google-Smtp-Source: AK7set85VUwY4gjdliQU/vJM7w1F10JPAIxawj1d0QFONO/E+F6rhtgwtu3dmmlY4kP7SolqLLx8 X-Received: by 2002:aa7:c6c3:0:b0:4fe:1b62:4741 with SMTP id b3-20020aa7c6c3000000b004fe1b624741mr9619789eds.28.1679568071617; Thu, 23 Mar 2023 03:41:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679568071; cv=none; d=google.com; s=arc-20160816; b=yKJgcgJ21EM7w0QGP1d+h40uDzHu2eIoOBhpr+VyelPrcgFSFRTUnWTWDTcpFHhLCx L2RDUxyvF0cgL5Fx+Pjer/Iq7pKXEvKDNScVbDGNlWS9U03iyegPZpOMYAra+SrDq3B6 pw4jAgYy8IP1OJFqmepg7+iAC5GlClxgh8J4W/ra+8cmTwhKEBvjelB5grYhaj6YeS7x VhGRHimwSP1muTR+gBCljIGtKG9WvLejCUlt/clJ9sOzy/PFuLaySxZvQyTHEWvrrgWq Pt+zMDD0s+AjkF3BJLzou7rJ0kGLltJsy+9ljUhT/tLnDMzP3PM6GJNijBB3IAzcnzsJ Pm1g== 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:cc:to:from :dkim-signature; bh=qyszvu/uUvUultdr5LryrAA3EmGp70fEi+2Bwj0O3p4=; b=yjEFEyAukuUcnCX1ThAzi5zW6SckZablV4z1KvnJvM9FvZkwisUB54dTth2iFJkt0B r3aoi2WPO3T7Oa1hZcsjLTZhAkjTIiX7+kNQARFwm2BoGJ/rbuOtOM3nqAxVcyuCVNoz Bj9PhOVmugJ+Ex48snPYkiO7lk49hWBLKomOR+0Ah8jRyilLab7qTv3L7ciTDWSa/uVj zb79y33XVxLKzfjD5KPIvEaGjSe+REOt305S2H5POaUP36zse5Dpw6HUGS7KQuBLDxB7 ydUSNiKVuhR7boJu6W1KDP8+ziJZ4guk5tUYlkn05RUEL9OG3hdydOaQRw69f3/RgWPU aTgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@streamunlimited.com header.s=google header.b=GMFSl2KJ; 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=NONE dis=NONE) header.from=streamunlimited.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r16-20020aa7cb90000000b00501db82b63csi6264852edt.172.2023.03.23.03.40.47; Thu, 23 Mar 2023 03:41:11 -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=@streamunlimited.com header.s=google header.b=GMFSl2KJ; 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=NONE dis=NONE) header.from=streamunlimited.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229923AbjCWKck (ORCPT + 99 others); Thu, 23 Mar 2023 06:32:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230459AbjCWKcL (ORCPT ); Thu, 23 Mar 2023 06:32:11 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2846E1C33F for ; Thu, 23 Mar 2023 03:29:04 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id eh3so84268131edb.11 for ; Thu, 23 Mar 2023 03:29:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=streamunlimited.com; s=google; t=1679567342; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qyszvu/uUvUultdr5LryrAA3EmGp70fEi+2Bwj0O3p4=; b=GMFSl2KJbNG9p340hRgtA+LG65TJFa0rQWS5qFBAsJEm4m/yuSVBkMHzac3i1d38Fq DZ7yxDsy1k8MFGg/+goufuuT8o6AnXdB6Jm1UmcqARKS2n6Kgt7VF5D4KpIpEXziywv/ HWkPmXagBRyU0qiwxMSjSVBHijjYRBiqZPZ1Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679567342; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qyszvu/uUvUultdr5LryrAA3EmGp70fEi+2Bwj0O3p4=; b=Be70vImJm2dX72TZig5rBnE0nP9rwgq+nCSgkDbviRvUi61xPVi1XcEjdbUxtLq7z2 yREiOg2D/lJMbszAhWaLSC/5T435k8rKeEupF1X2Z9uPb2yVFobQ2XiFfN7gq2+NUpAq nQfNvKFvHVMlSl1Mbh+YblkLUx4yhfvfTU38huygWaVYLu1H1OfL3S0u7EinPcNATYMh 4b2cn84flu9wXJgrfXVIqEVbUenk6SXCnPJ5OJ75/V2GCOZi0C2433vizceswauE5wwx EEfqD6kj0MHNngEBbWynKiNMxdZO92WLO/2LQVyg3rI824LEQ13bk7jarm+8ikOhIfsn E3Uw== X-Gm-Message-State: AO0yUKXPnMp/1ba23vnQKhwUJ2hFtDcsvS+Cc16N7Q2CHsd9oNVgANiM u44HJKN+h++BZqU+syIq/UtxhQ1YNQlWRrFMlgQ= X-Received: by 2002:a17:906:d8d8:b0:8b1:fc58:a4ad with SMTP id re24-20020a170906d8d800b008b1fc58a4admr10706710ejb.11.1679567342426; Thu, 23 Mar 2023 03:29:02 -0700 (PDT) Received: from smi-ubuntu.sueba ([2a01:390:0:101:4f8c:7da4:48b2:8bd2]) by smtp.gmail.com with ESMTPSA id s9-20020a170906454900b008f89953b761sm8459883ejq.3.2023.03.23.03.29.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Mar 2023 03:29:02 -0700 (PDT) From: Simon Mikuda To: linux-bluetooth@vger.kernel.org Cc: Simon Mikuda Subject: [PATCH BlueZ 2/2] monitor: Fix printing Signed Write Command Date: Thu, 23 Mar 2023 11:28:58 +0100 Message-Id: <20230323102858.566934-3-simon.mikuda@streamunlimited.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230323102858.566934-1-simon.mikuda@streamunlimited.com> References: <20230323102858.566934-1-simon.mikuda@streamunlimited.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Data field were print twice (1 time incorrectly): > ACL Data RX: Handle 64 flags 0x02 dlen 19 ATT: Signed Write Command (0xd2) len 14 Handle: 0x006f Type: Vendor specific (f7debc9a-7856-3412-7856-341278563412) Data: 0800000087f303c224516133 Data: Signature: 0800000087f303c224516133 --- monitor/att.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monitor/att.c b/monitor/att.c index d3b82074f..18a5af05b 100644 --- a/monitor/att.c +++ b/monitor/att.c @@ -2934,13 +2934,14 @@ static void print_write(const struct l2cap_frame *frame, uint16_t handle, struct gatt_handler *handler; print_handle(frame, handle, false); - print_hex_field(" Data", frame->data, frame->size); if (len > frame->size) { print_text(COLOR_ERROR, "invalid size"); return; } + print_hex_field(" Data", frame->data, len); + attr = get_attribute(frame, handle, false); if (!attr) return; @@ -3105,7 +3106,6 @@ static void att_signed_write_command(const struct l2cap_frame *frame) } print_write(frame, handle, frame->size - 12); - print_hex_field(" Data", frame->data, frame->size - 12); print_hex_field(" Signature", frame->data + frame->size - 12, 12); } -- 2.34.1