Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1820392pxb; Fri, 6 Nov 2020 23:07:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbP+hkpq0ymDdesoOa0FDjaxVprshir5jmWDXhVq9+gDxzRM5rCQ1xEUKFXOuA0Q4NFDbB X-Received: by 2002:aa7:c44d:: with SMTP id n13mr6039722edr.138.1604732832007; Fri, 06 Nov 2020 23:07:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604732831; cv=none; d=google.com; s=arc-20160816; b=Ba+5jEwGwgevtvO2mm8Ebh1tPKjaheCQuNZum//V1vWrqoNZW/2cFZnH+eZpknN/g6 4ByLhAZFqT+CjbYeiPlzTfLZ73O468WOhisQ0tdJjZGaOB5phEfs9h/M7Tjy1jFmBCIz y3WISHnHOKSkyFxf7U70KFYRpsoRebMh4fsfUyaKdhcz2t12gMp9jek4ej5OXhDjS+RV yxwf0Due7h/mAkAcpvQvE7bch8ySW6BDxCG9ttz1HpvfIC0IwRZddAO7bbTKDPkWj6bV H9U31VgJ/N5zpeyn0oJqmABS9iJyxmuTckRgopuVohR7LMwgWoTp8ZBRiZa/IpfeeOx1 FgHA== 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 :ironport-sdr:ironport-sdr; bh=/Uj/mV4l3V3ZuvZJGdqmfDrepkJ6XpjwtgCoMEt74s0=; b=aWs5R/pZVOts3Txxb0YfbRFsz6NoR8AJOXfe2iz8b2iJwh7Hk/NW3MsGJNh0y2CCkU PRRTHPoxTSSa+2ikLPgti+fuxRKe5QaekPlNL2sQor1Xc1Huq1ZTxr2Fs2C/p8gPsIvH 8B0303o9bZrrwzInkGb1n47Cu4tdDHVfUu6/ua8nPeKx41mwYprGPiwQxwRBzIN4xnMP ZislH0fiHKoQjAgTMyxWEDnSKSNhT7wrbLrmj19AMTK3fM3FXqKqhFnpy33bfvh/riam TnoFGReRp6spC10HdyhX28dEcWsKEqM0p/nNcWT062b/jh/CnsxoOzb0OsRy4GAjhvjC ROrg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gn11si2579900ejc.638.2020.11.06.23.06.47; Fri, 06 Nov 2020 23:07:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727841AbgKGHDe (ORCPT + 99 others); Sat, 7 Nov 2020 02:03:34 -0500 Received: from mga17.intel.com ([192.55.52.151]:45630 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727830AbgKGHDd (ORCPT ); Sat, 7 Nov 2020 02:03:33 -0500 IronPort-SDR: zDK7wJFGdaBCNb5q9yJikTT3Ow1SJGeHVGPAKXc0w/iZ0gucdJ0FoNH2xAmW3l5uBDl5LHa+iX BnA5YKipIJiw== X-IronPort-AV: E=McAfee;i="6000,8403,9797"; a="149485520" X-IronPort-AV: E=Sophos;i="5.77,458,1596524400"; d="scan'208";a="149485520" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2020 23:03:33 -0800 IronPort-SDR: a8ln/8/M3Nn2eqo/0e2EcVg8SymcH4SVsEFGFmkER1De5ymuOgUlZL/3Aop/+RrNAO5T4zZg/S 3zLYywbGXuzw== X-IronPort-AV: E=Sophos;i="5.77,458,1596524400"; d="scan'208";a="359032054" Received: from ralassax-mobl.amr.corp.intel.com (HELO ingas-nuc1.intel.com) ([10.209.101.141]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2020 23:03:33 -0800 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: luiz.von.dentz@intel.com, Inga Stotland Subject: [RFC PATCH BlueZ 09/10] tools/mgmt-tester: Convert to use ELL library Date: Fri, 6 Nov 2020 23:03:11 -0800 Message-Id: <20201107070312.8561-10-inga.stotland@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201107070312.8561-1-inga.stotland@intel.com> References: <20201107070312.8561-1-inga.stotland@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This reworks the source code to use ELL primitives and removes dependecies on GLib. --- Makefile.tools | 4 ++-- tools/mgmt-tester.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile.tools b/Makefile.tools index 03264cff9..e65547c3f 100644 --- a/Makefile.tools +++ b/Makefile.tools @@ -106,12 +106,12 @@ tools_3dsp_SOURCES = tools/3dsp.c monitor/bt.h tools_3dsp_LDADD = src/libshared-mainloop.la tools_mgmt_tester_SOURCES = tools/mgmt-tester.c monitor/bt.h \ - emulator/hciemu.h emulator/hciemu.c \ + emulator/hciemu.h emulator/hciemu-ell.c \ emulator/btdev.h emulator/btdev.c \ emulator/bthost.h emulator/bthost.c \ emulator/smp.c tools_mgmt_tester_LDADD = lib/libbluetooth-internal.la \ - src/libshared-glib.la $(GLIB_LIBS) + src/libshared-ell.la $(ell_ldadd) tools_l2cap_tester_SOURCES = tools/l2cap-tester.c monitor/bt.h \ emulator/hciemu.h emulator/hciemu-ell.c \ diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index d8554411f..75f6457d2 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -18,7 +18,7 @@ #include #include -#include +#include #include "lib/bluetooth.h" #include "lib/hci.h" @@ -130,7 +130,8 @@ static void read_info_callback(uint8_t status, uint16_t length, tester_print(" Name: %s", rp->name); tester_print(" Short name: %s", rp->short_name); - if (strcmp(hciemu_get_address(data->hciemu), addr)) { + if (!hciemu_get_address(data->hciemu) || + (strcmp(hciemu_get_address(data->hciemu), addr))) { tester_pre_setup_failed(); return; } -- 2.26.2