Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5587075ybv; Mon, 17 Feb 2020 23:52:39 -0800 (PST) X-Google-Smtp-Source: APXvYqxFzlmxgL2Vuz/qEZUMYAesBPtzByuufZ+0pgqgKzDnHNy8TC4Jnm+5TbxyJQDtCk9rtpJF X-Received: by 2002:a9d:7d8b:: with SMTP id j11mr15705032otn.259.1582012358970; Mon, 17 Feb 2020 23:52:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582012358; cv=none; d=google.com; s=arc-20160816; b=J0cLqYbF4/5iaNuQWODmhoq5F9oAKIfM6oWMz1MBCCRGj/YcgNYif/014sM6HMZo2n exzJCq20FgtAmD1FnWmuuNW1YDEnsJK7tH5kbAXF0V6YsLEacYhAZ4H2UrjO4AXkJktc qwkSqJ3hXzhd/rZrAMVJoAm7Jhk7R6+NuhpvTUDybQ84FdfguuO3THQ1vt8LiL6bUEgH 86d3ocXB+pW26LQnkXtH1HPE+MhU/yOuvqNoovbYXpsjbYMSm3lZVAiJA+t3XhDtaym1 n1Af+nChQ4t4g/nelnqZTG/UioDgZfeiXyMOI/nt5zlR9zo2JJfEjLkgkasLkntqk+JI iipA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Y3aaNEPWmthDrXDDFRJAkvIMe2B+78ZHAoQwHz0uvH4=; b=PJLHundQ/mYworBhdxyUX5x8VKsFpUNKxiboMA1aJpO5CxrgSlo+23s6+xr/SbDAz5 TwQQZEmmC67QNzMM1ibNBZeYjR2toIwpeecaCaSgzNabgUtnw7q+C6ej7FyTlvKcz2Wu 7engyTv/TyX9wkJ9PTgbOX0sDrmjnLHcTENudIl3RTfps8iN//u2lmnf/7a4ec2lA3JT /BLX0hb3kud9OvqKAwuCuV8bcJaqpU3Zie2J4kYf6UpwkwC6c4eTVQJBvrE227fBIAU/ 8HVjsTeFMKn3bnTc2D07OVdp9yUg/tLHu9hL7orgmF6rL8n7bfTyrZ7wgIosaPhWRr3G FDTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id a12si7716730oid.189.2020.02.17.23.52.11; Mon, 17 Feb 2020 23:52:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 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 S1726154AbgBRHwK (ORCPT + 99 others); Tue, 18 Feb 2020 02:52:10 -0500 Received: from mga04.intel.com ([192.55.52.120]:35670 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbgBRHwK (ORCPT ); Tue, 18 Feb 2020 02:52:10 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Feb 2020 23:52:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,455,1574150400"; d="scan'208";a="224063695" Received: from ingas-nuc1.sea.intel.com ([10.252.201.157]) by orsmga007.jf.intel.com with ESMTP; 17 Feb 2020 23:52:09 -0800 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, Inga Stotland Subject: [PATCH BlueZ] test/test-mesh: Fix output of MessageReceived method Date: Mon, 17 Feb 2020 23:52:08 -0800 Message-Id: <20200218075208.17135-1-inga.stotland@intel.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This fixes formatted output of recieved message parameters. --- test/test-mesh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/test-mesh b/test/test-mesh index 5777fcebc..929e28fd3 100755 --- a/test/test-mesh +++ b/test/test-mesh @@ -559,8 +559,15 @@ class Element(dbus.service.Object): @dbus.service.method(MESH_ELEMENT_IFACE, in_signature="qqvay", out_signature="") def MessageReceived(self, source, key, destination, data): - print('Message Received on Element %d, src=%04x, dst=%s' % - self.index, source, destination) + print(('Message Received on Element %02x') % self.index, end='') + print(', src=', format(source, '04x'), end='') + + if isinstance(destination, int): + print(', dst=%04x' % destination) + elif isinstance(destination, dbus.Array): + dst_str = array_to_string(destination) + print(', dst=' + dst_str) + for model in self.models: model.process_message(source, key, data) -- 2.21.1