Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3291135pxb; Mon, 16 Nov 2020 10:29:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJw6ZTWuec6/qG/uMaoMRLT4ePhLCGGP6QmEXi2/JdaJFtwbRj8yffVVk8PvxFVWsKTTMc03 X-Received: by 2002:a17:906:7cc6:: with SMTP id h6mr15160342ejp.161.1605551369158; Mon, 16 Nov 2020 10:29:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605551369; cv=none; d=google.com; s=arc-20160816; b=i92N8VBhTdSPgpfoxcY7fYo7YZlb7GmhU7ijL/Tn38kYJ77NmsUw7YpolHdC5fS/us MAK5lRWRM3Xp9Qu3n//Te9dHKDO98BSLu2H3XNmSZ4GGNnZsQLWe7BDdUIeb0S7tXk/z QWKz8NO9bkySLJS6UcR+uOgcRgV8QMirIDm2wOMLADw4VpozLRGg40qmNXJXf32v1hlA WRU8+xm9pkvZMzHhEzlaFxQbpS3T1Kzn446BSFUxjBDCq7ftut/2AYPiMptVrS6NEy+7 gbl1b/GJo7IrpaZ35zML7BbskQiij5ENFbOZlEbr89nYn3gZJ9OYVnIhxNXKrUWNNz13 85/A== 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=tO18+90EOV2bHOTSdvoYawjZxj6UFLMMK348UGkcVfY=; b=Ysu8Yk9JBqacKWK8E6dNoktjz6E7u2UjaJ8aO/O1Q4gHMmIEg9imrOwo1QT+mkz8FC pIy4sOUiDZktdn+Kn0B8fHEaIvkGRQXeZb2TLlDtnWZfomDoDMbaFoXfUyMkBkaB6Kzm B2nUvPBKy64bWw9sppPODS2pmxSPKiiax8wp480W+R+hcMXnSYyq6hSMC6e7MrDMMQzg +LzvEeDfWV6b12cxgSiAF0XdFznVK43QK98a68dEqJ13dReTNSPz6R01ExGuuGrBny/K DRknmWvDBdAOHt0T4xtnK6kRCCM6YNmrSuF+bSbe4wyok+lL+7GOuuBJYwbRtYyW+V9D i6ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="Yexe/DiT"; 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 e4si11604830ejh.230.2020.11.16.10.29.04; Mon, 16 Nov 2020 10:29:29 -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="Yexe/DiT"; 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 S1730379AbgKPS0c (ORCPT + 99 others); Mon, 16 Nov 2020 13:26:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729555AbgKPS0c (ORCPT ); Mon, 16 Nov 2020 13:26:32 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD7F6C0613CF for ; Mon, 16 Nov 2020 10:26:30 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id m186so7497709ybm.22 for ; Mon, 16 Nov 2020 10:26:30 -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=tO18+90EOV2bHOTSdvoYawjZxj6UFLMMK348UGkcVfY=; b=Yexe/DiT8zwIxXCi4QezLU2wpijCrDrRD3D9KijcNAi0wm4v5kJq4OFaG/WDPCHTm9 gWKNe5H7z8K7qy1BJjpp7cWezr5gsd5XUjA18bcVJeblkG77L/2B+U6IcGtaXlg9Eg0E MRE6zmzGALrOBhtqeEt3BVE0dyQqmWMHyk92Q7Sdf076oUudUSbbkVIY8vArCotE3NSl YbuxTEqnuLQj2iLfS9AgLhVfYI7R+3ZtrtRIgQ+l1WSBC6Ute/tirWUN2QuZ0+jrnvpT +qHN/NS8e/jAYEhQeyoHi5UC5KMQccnWjigKrfiR1eUEYA05jrdP4YJqkllzZGX+iK9A yHkQ== 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=tO18+90EOV2bHOTSdvoYawjZxj6UFLMMK348UGkcVfY=; b=IrJ/omu9dzaWXDipNpHuZFwpksyCXdoRX4sOPBSX++2H+0J9yT7rnKlsyAT8ISerR/ D7+kJvU8wFg8ECVf6gqQgJYs3ReJMNC8c5chAy3cqPhBuJf04eeSAtlB/MQyu7JQESv5 sZnBVCdWNrTNChtDDYz/jhpRsACYRG1T4qn7kYGBmVvLXLpYsnd0OtIpAvcFUiRGHDca 31mP8LkJu9cS2pVhDMzaI3I/b13+40HGf+Rn9say0MDw+0658YjrVGMH4ESZqcA/itTe F71EijAk8R7H0MXY0bUcK5aSaOJcy+t8TUZEPZbnWR3ck0W4jMZwowtR3bHJvEW2LCEG My2A== X-Gm-Message-State: AOAM531OrkXH0M9/waP4A5t9M70eL2qKGGTKVx73w/13yaFfi4J/WnJP mJol/xWdxiuX+RMGU/5QzsAz2oZwM+eIDA== 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:8884:: with SMTP id d4mr22486683ybl.58.1605551190073; Mon, 16 Nov 2020 10:26:30 -0800 (PST) Date: Mon, 16 Nov 2020 10:25:53 -0800 Message-Id: <20201116102547.bluez.v1.1.I4dd1c737d5f8806fe2aa99b8c2d8154fe58871ed@changeid> Mime-Version: 1.0 X-Mailer: git-send-email 2.29.2.299.gdc1121823c-goog Subject: [bluez PATCH v1] 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 --- 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 c786015c8..d4300c033 100644 --- a/src/adv_monitor.c +++ b/src/adv_monitor.c @@ -237,8 +237,9 @@ static void app_disconnect_cb(DBusConnection *conn, void *user_data) { struct adv_monitor_app *app = user_data; - 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 (app && queue_remove(app->manager->apps, app)) app_destroy(app); } @@ -312,8 +313,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; } @@ -330,8 +332,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; } @@ -431,8 +434,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; @@ -447,8 +451,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; } @@ -556,8 +561,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_release(monitor, NULL); return; } @@ -610,15 +616,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; } @@ -852,8 +860,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); } @@ -972,8 +981,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; } @@ -1044,8 +1053,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; } @@ -1387,8 +1397,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.299.gdc1121823c-goog