Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp117497pxu; Wed, 25 Nov 2020 14:54:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxWNkute7cEkuVPvwRQPts28ziv2DhnWQNl31KQ5ssY+HK1CaB2rXYVqLupkdTTv1UkiarR X-Received: by 2002:a05:6402:1389:: with SMTP id b9mr5700570edv.178.1606344876033; Wed, 25 Nov 2020 14:54:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606344876; cv=none; d=google.com; s=arc-20160816; b=hK1oHGBbeslS4xtcCVI4SJLC2WymQN2KVRETBY9l2Ri44HirfUqEiIZkvuF6hpVI83 KmvPbqdQyr8DT7Zay6DfHi/xxzg1HbsMgn+eU0xLQhyNohLzKcnl7MPqkUPvID1h8cTm wB0DQ9rzGLHGWpUWBGoEISF36XN4mVXOtky3QwusR3Z1Hhv1T11Mk7c7IcE3GrfFE+ck eH5VaN4X8CZN4t0vIbb1tbSrGxqyX6UXMA9eI9mzby5YthaouvDOY9qNsfAlXRyOjLK5 jVwqm/hp11EGuwggJC8QbOBtuGrOnFrbAdIIOjxIW7m6le29WWWSkWwHYesXNo8SY6G5 +d7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :sender:dkim-signature; bh=WAMiLvVDV3ukDWbsvwQ/iKjjKPj8liDfWUiBOm9jQhE=; b=uUI22FbXHBT/FtlGVOwCSbIJiFeMlmkwoGMahsEfnxz2OZzC3Bz8fPcMtTAUeacK1Y 5WAx1ZP0Eo8XhvgVVhTUooGDtZhrqDE/XSCr9WK7QqxMeWAH5JHBsViNea0M4mvJ3nHq DKZlsrNUqhb7h8hNpFiZGIFISK/q9+FKJrmrRDT+CkQbyB08gPV7STMN2sxcW8D0z+rR ngamVrc67HM2zuXU1CtZZ30oedCNBSSel8/2vA37orp/d/LPZ1zzg3WJCV3d3rBUkIx1 4ycJ0hn9G/MKk5Q0+kmdEBF/3H68Lon4ZTk7LAchSY77arrL1dQmI1NCzN2/mVgPGMVJ +HyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Zs4Igh0X; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b17si1968877edr.104.2020.11.25.14.53.57; Wed, 25 Nov 2020 14:54:36 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=Zs4Igh0X; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729059AbgKYUSw (ORCPT + 99 others); Wed, 25 Nov 2020 15:18:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729040AbgKYUSw (ORCPT ); Wed, 25 Nov 2020 15:18:52 -0500 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4609C0613D4 for ; Wed, 25 Nov 2020 12:18:51 -0800 (PST) Received: by mail-yb1-xb49.google.com with SMTP id r4so1114212ybs.1 for ; Wed, 25 Nov 2020 12:18:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=WAMiLvVDV3ukDWbsvwQ/iKjjKPj8liDfWUiBOm9jQhE=; b=Zs4Igh0XpFqFUHhU4ScFQr1NTTTgbmvu30GoUXoAB0+1v7TK7jh0Byv20TWrxJKIvx seaO66oZt/69Nr1qsV7+6axGf+73PjNP9NnWMV0N4bADXOmMdrqutBMnRnRMJV3644ef 8EWcw2EACiTNxEbOnsYb/cAGdHzLHHKl3+G1jjdcLBte3DFSZwHq19a55cA0R48J3tuA y+4pFHu7WBIsRd+mbX/SV53Rb7lyzzFrcRfv3YPVQLQpZXclG+UX0osFot1M7goZG21e 8UjZdAhvbKaiSTr/hMJjvI9I2KD6ChOVI2UtfSXoW5hpLLyoCe7ezoMXuip5YTvSIG8H dlrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=WAMiLvVDV3ukDWbsvwQ/iKjjKPj8liDfWUiBOm9jQhE=; b=nwzyQpboNLKbdi0n14MEg2uhhY9EuCttS3Od0TQRASz1ppIa6FHMrL3TLhVoFNcRof Coyx0bHRf4gdbmcJmF5O1Pbm8Dsup9KakhvSRdVkjuh4sMK3l1QOqY7SPwQmtgwZpHLE iMAbDYQrYjj8dBjCq/vgjpUgzvBQZ0Cf/wo8e0lv4qTuhGWlj7CvkvJ8ARUoQRzwES2x VaJe2Vxe4+1Cf77NWVtUcLmLcjijY7qcVjhnOBiBCPCinHFJD4FNOKOPp809qnUJflhM A3+jdw/84dByIzu8YJPyKrCAVWzjoyXV33SIMtyCdZeRRNi3WRLwDij6nkW7K+EtZwIi QU2Q== X-Gm-Message-State: AOAM533gfhVtGIVnqKGtBBlPVy5Tifo8IW4+m7shooF+pgt5XanDOGPv U3V55JGQtJX2HKrPsglYQGSLNLc8hLhVAw== Sender: "mmandlik via sendgmr" X-Received: from mmandlik.mtv.corp.google.com ([2620:15c:202:201:f693:9fff:fef4:e50e]) (user=mmandlik job=sendgmr) by 2002:a25:3a86:: with SMTP id h128mr5366248yba.401.1606335530896; Wed, 25 Nov 2020 12:18:50 -0800 (PST) Date: Wed, 25 Nov 2020 12:18:46 -0800 Message-Id: <20201125121844.bluez.v2.1.I4dd1c737d5f8806fe2aa99b8c2d8154fe58871ed@changeid> Mime-Version: 1.0 X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog Subject: [bluez PATCH v2] adv_monitor: Update log messages From: Manish Mandlik To: marcel@holtmann.org, luiz.dentz@gmail.com Cc: linux-bluetooth@vger.kernel.org, chromeos-bluetooth-upstreaming@chromium.org, Manish Mandlik , mcchou@chromium.org, alainm@chromium.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Update log messages to avoid breaking of user-visible log strings to make it easy to grep for them. Reviewed-by: mcchou@chromium.org Reviewed-by: alainm@chromium.org Signed-off-by: Manish Mandlik --- Changes in v2: - Fix merge conflicts src/adv_monitor.c | 58 +++++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/src/adv_monitor.c b/src/adv_monitor.c index fc058dbf1..767c1c82d 100644 --- a/src/adv_monitor.c +++ b/src/adv_monitor.c @@ -318,8 +318,9 @@ static void app_disconnect_cb(DBusConnection *conn, void *user_data) return; } - btd_info(app->manager->adapter_id, "Adv Monitor app %s disconnected " - "from D-Bus", app->owner); + btd_info(app->manager->adapter_id, + "Adv Monitor app %s disconnected from D-Bus", + app->owner); if (queue_remove(app->manager->apps, app)) { queue_foreach(app->monitors, monitor_state_released, NULL); @@ -396,8 +397,9 @@ static bool parse_monitor_type(struct adv_monitor *monitor, const char *path) uint16_t adapter_id = monitor->app->manager->adapter_id; if (!g_dbus_proxy_get_property(monitor->proxy, "Type", &iter)) { - btd_error(adapter_id, "Failed to retrieve property Type from " - "the Adv Monitor at path %s", path); + btd_error(adapter_id, + "Failed to retrieve property Type from the " + "Adv Monitor at path %s", path); return false; } @@ -414,8 +416,9 @@ static bool parse_monitor_type(struct adv_monitor *monitor, const char *path) } failed: - btd_error(adapter_id, "Invalid argument of property Type of the Adv " - "Monitor at path %s", path); + btd_error(adapter_id, + "Invalid argument of property Type of the Adv Monitor " + "at path %s", path); return false; } @@ -515,8 +518,9 @@ failed: monitor->high_rssi_timeout = ADV_MONITOR_UNSET_TIMER; monitor->low_rssi_timeout = ADV_MONITOR_UNSET_TIMER; - btd_error(adapter_id, "Invalid argument of property " - "RSSIThresholdsAndTimers of the Adv Monitor at path %s", + btd_error(adapter_id, + "Invalid argument of property RSSIThresholdsAndTimers " + "of the Adv Monitor at path %s", path); return false; @@ -531,8 +535,9 @@ static bool parse_patterns(struct adv_monitor *monitor, const char *path) uint16_t adapter_id = monitor->app->manager->adapter_id; if (!g_dbus_proxy_get_property(monitor->proxy, "Patterns", &array)) { - btd_error(adapter_id, "Failed to retrieve property Patterns " - "from the Adv Monitor at path %s", path); + btd_error(adapter_id, + "Failed to retrieve property Patterns from the " + "Adv Monitor at path %s", path); return false; } @@ -640,8 +645,9 @@ static void add_adv_patterns_monitor_cb(uint8_t status, uint16_t length, uint16_t adapter_id = monitor->app->manager->adapter_id; if (status != MGMT_STATUS_SUCCESS || !param) { - btd_error(adapter_id, "Failed to Add Adv Patterns Monitor " - "with status 0x%02x", status); + btd_error(adapter_id, + "Failed to Add Adv Patterns Monitor with status" + " 0x%02x", status); monitor->state = MONITOR_STATE_FAILED; monitor_destroy(monitor); return; @@ -696,15 +702,17 @@ static void monitor_proxy_added_cb(GDBusProxy *proxy, void *user_data) } if (queue_find(app->monitors, monitor_match, proxy)) { - btd_error(adapter_id, "Adv Monitor proxy already exists with " - "path %s", path); + btd_error(adapter_id, + "Adv Monitor proxy already exists with path %s", + path); return; } monitor = monitor_new(app, proxy); if (!monitor) { - btd_error(adapter_id, "Failed to allocate an Adv Monitor for " - "the object at %s", path); + btd_error(adapter_id, + "Failed to allocate an Adv Monitor for the " + "object at %s", path); return; } @@ -882,8 +890,9 @@ static DBusMessage *unregister_monitor(DBusConnection *conn, queue_remove(manager->apps, app); app_destroy(app); - btd_info(manager->adapter_id, "Path %s removed along with Adv Monitor " - "app %s", match.path, match.owner); + btd_info(manager->adapter_id, + "Path %s removed along with Adv Monitor app %s", + match.path, match.owner); return dbus_message_new_method_return(msg); } @@ -1021,8 +1030,8 @@ static void adv_monitor_removed_callback(uint16_t index, uint16_t length, const uint16_t adapter_id = manager->adapter_id; if (length < sizeof(*ev)) { - btd_error(adapter_id, "Wrong size of Adv Monitor Removed " - "event"); + btd_error(adapter_id, + "Wrong size of Adv Monitor Removed event"); return; } @@ -1093,8 +1102,9 @@ static void read_adv_monitor_features_cb(uint8_t status, uint16_t length, struct btd_adv_monitor_manager *manager = user_data; if (status != MGMT_STATUS_SUCCESS || !param) { - btd_error(manager->adapter_id, "Failed to Read Adv Monitor " - "Features with status 0x%02x", status); + btd_error(manager->adapter_id, + "Failed to Read Adv Monitor Features with " + "status 0x%02x", status); return; } @@ -1436,8 +1446,8 @@ static void adv_monitor_filter_rssi(struct adv_monitor *monitor, if (!dev) { dev = monitor_device_create(monitor, device); if (!dev) { - btd_error(adapter_id, "Failed to create Adv Monitor " - "device object."); + btd_error(adapter_id, + "Failed to create Adv Monitor device object."); return; } } -- 2.29.2.454.gaff20da3a2-goog