Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp554822ioo; Sat, 21 May 2022 07:01:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8JY9DmaXdVBjGz9CjpgESj5pEbVeYtqxjcKPmNy064uDPyoDMlxLvXdS0ORKlec30+vHJ X-Received: by 2002:a17:906:39d1:b0:6fa:8e62:c8a2 with SMTP id i17-20020a17090639d100b006fa8e62c8a2mr13177149eje.487.1653141669082; Sat, 21 May 2022 07:01:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653141669; cv=none; d=google.com; s=arc-20160816; b=z8SCh/5MnQs918CnXKWill9RIGB4MjLVtCOyxYa1r1uitzSKwgONZiVCumt+nYrWZq /SKFqWmRT9bt4lcZxC3U1carzMqT2/ePmVYtw7qyG1sbArjYywpxSuycWqg43coQKXZp Xf71W68VxR4BmvhaANntbi4xv72dBER3vGid51WkaAKHyB0t1Qyc0GFME2epCyaXulqJ UJR0WyER0EuretNo+d/Gn4rWM7OhHwD8ARcvVJ4JrSjLjTqVRn1J4ObYKqT6xK56d27u mZbFCQMf9LeWqxlbWV2MItj0abO/IUHW7AcXMvRwDhpV8W9zODgWNYHwK8GInWOAzKEE 7DAg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=GTKfKzTkV6KfkDtrgN0rzE+lgJrCtkgT3Q9qo7/YtTQ=; b=Q8EHDRVDXn23QImEbazxx0u4HDiJdw9/QLXjBdXL7r7Xobb25h5syTnhTp4IKIDsBi 2QiHvxbpZq+pesuIIfzKwbMGbFpD7oOJ7NCVTW65uIaaXIppThna0t21uqPqn3DWYYGE JMf6j1rZpVSAECxdJhYKkPYsHoH82lJh6d8bO3B1SxNVt8V0lPSvQ2T+yagAa3eucr7R +VdpR69AJqL/bh0oko6YiK/F+8394nO+yz0b6X3H1/fZ3Zsly9AMeKYW6GWexoADO/QU exTuNU4zW0o7UTWZV1rmpHmdYvS516S3U+fOy3JkzaSoEjFUYLuj/pNA58tPWLM7lv5d QPNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GT74DSe4; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o15-20020a170906288f00b006fea3727f33si1076435ejd.115.2022.05.21.07.00.27; Sat, 21 May 2022 07:01:09 -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=@intel.com header.s=Intel header.b=GT74DSe4; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238067AbiETXl7 (ORCPT + 99 others); Fri, 20 May 2022 19:41:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230462AbiETXl6 (ORCPT ); Fri, 20 May 2022 19:41:58 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6A5119FF7F for ; Fri, 20 May 2022 16:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653090117; x=1684626117; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=lAP+YC/9SDKjV/LypDEsjeWwr6G1ZDMair0ke2iZJGQ=; b=GT74DSe4AaXBAMfD1gIgx8KtujpsCOrcMKe7LP7FYKoC5Rxlbf+BaX2Z 4MNWSmMWxh94a5P/PM8li+xyQew4E29SfS933++h9g5BII2YJj1T97iFa DNoPvIpBqtaSdNI7kAW2TzEGYfSbj5VaRkzTO8cFQjPc7xIz1ouwk9KqK dwL09mm901T7gxBnGOdHDx69vpJcUud5LndsUW5OBe9063Uzjk0zJoSJW ezzEg95us6fDoCHwppstdnYuY58ybQfYz+T4V5Rzkn+yX6b1vMMkQv/d0 +TwbxNbnGmS61jnXfj4AvPFgEytI+ZRyhYVZqi4bC+1qh5GCudBT7KDSB Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="252658493" X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="252658493" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 16:41:57 -0700 X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="571079050" Received: from kepettin-mobl1.amr.corp.intel.com (HELO istotlan-desk.intel.com) ([10.212.166.25]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 16:41:57 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: luiz.von.dentz@intel.com, Inga Stotland Subject: [PATCH BlueZ] client: Fix settingof advertisement interval Date: Fri, 20 May 2022 16:41:51 -0700 Message-Id: <20220520234151.19286-1-inga.stotland@intel.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE,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 This fixes incorrect argument read when using "interval" command in "advertisement" submenu --- client/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/main.c b/client/main.c index ccbfc620b..1df94f000 100644 --- a/client/main.c +++ b/client/main.c @@ -2768,7 +2768,7 @@ static void cmd_advertise_interval(int argc, char *argv[]) max = min; if (argc > 2) { - max = strtol(argv[1], &endptr, 0); + max = strtol(argv[2], &endptr, 0); if (!endptr || *endptr != '\0' || max < 20 || max > 10485) { bt_shell_printf("Invalid argument\n"); return bt_shell_noninteractive_quit(EXIT_FAILURE); -- 2.35.3