From: Brian Gix <brian.gix@intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: inga.stotland@intel.com, michal.lowas-rzechonek@silvair.com,
brian.gix@intel.com
Subject: [PATCH BlueZ 4/8] mesh: Expose mapping function for D-Bus errors
Date: Wed, 10 Jul 2019 16:07:53 -0700 [thread overview]
Message-ID: <20190710230757.8425-5-brian.gix@intel.com> (raw)
In-Reply-To: <20190710230757.8425-1-brian.gix@intel.com>
---
mesh/mesh.c | 8 ++++----
mesh/mesh.h | 1 +
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/mesh/mesh.c b/mesh/mesh.c
index 26acfd4dc..62c80c0f3 100644
--- a/mesh/mesh.c
+++ b/mesh/mesh.c
@@ -266,7 +266,7 @@ static void prov_disc_cb(struct l_dbus *bus, void *user_data)
free_pending_join_call(true);
}
-static const char *prov_status_str(uint8_t status)
+const char *mesh_prov_status_str(uint8_t status)
{
switch (status) {
case PROV_ERR_SUCCESS:
@@ -301,7 +301,7 @@ static void send_join_failed(const char *owner, const char *path,
MESH_APPLICATION_INTERFACE,
"JoinFailed");
- l_dbus_message_set_arguments(msg, "s", prov_status_str(status));
+ l_dbus_message_set_arguments(msg, "s", mesh_prov_status_str(status));
l_dbus_send(dbus_get_bus(), msg);
free_pending_join_call(true);
@@ -316,7 +316,7 @@ static bool prov_complete_cb(void *user_data, uint8_t status,
const char *path;
const uint8_t *token;
- l_debug("Provisioning complete %s", prov_status_str(status));
+ l_debug("Provisioning complete %s", mesh_prov_status_str(status));
if (!join_pending)
return false;
@@ -342,7 +342,7 @@ static bool prov_complete_cb(void *user_data, uint8_t status,
l_dbus_message_set_arguments(msg, "t", l_get_be64(token));
- l_dbus_send(dbus_get_bus(), msg);
+ l_dbus_send(dbus, msg);
free_pending_join_call(false);
diff --git a/mesh/mesh.h b/mesh/mesh.h
index 14b1fb517..2ef77b57d 100644
--- a/mesh/mesh.h
+++ b/mesh/mesh.h
@@ -42,3 +42,4 @@ bool mesh_send_pkt(uint8_t count, uint16_t interval, uint8_t *data,
bool mesh_send_cancel(const uint8_t *filter, uint8_t len);
bool mesh_reg_prov_rx(prov_rx_cb_t cb, void *user_data);
void mesh_unreg_prov_rx(prov_rx_cb_t cb);
+const char *mesh_prov_status_str(uint8_t status);
--
2.14.5
next prev parent reply other threads:[~2019-07-10 23:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 23:07 [PATCH BlueZ 0/8] mesh: Provisioner Initiator added Brian Gix
2019-07-10 23:07 ` [PATCH BlueZ 1/8] doc: Cleanup API Provisioner1 interface Brian Gix
2019-07-10 23:07 ` [PATCH BlueZ 2/8] mesh: Fix support for Provisioner Initiator Brian Gix
2019-07-11 7:10 ` Michał Lowas-Rzechonek
2019-07-10 23:07 ` [PATCH BlueZ 3/8] mesh: Add special Beacon handler for Provisioning Brian Gix
2019-07-10 23:07 ` Brian Gix [this message]
2019-07-10 23:07 ` [PATCH BlueZ 5/8] mesh: Expose resources needed by Management1 interface Brian Gix
2019-07-10 23:07 ` [PATCH BlueZ 6/8] mesh: Fix implementation of Provisioner Initiator Brian Gix
2019-07-11 7:33 ` Michał Lowas-Rzechonek
2019-07-11 15:48 ` Gix, Brian
2019-07-10 23:07 ` [PATCH BlueZ 7/8] mesh: Implement DBus Provisioning methods Brian Gix
2019-07-10 23:07 ` [PATCH BlueZ 8/8] test: This extends the mesh tool to exercise " Brian Gix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190710230757.8425-5-brian.gix@intel.com \
--to=brian.gix@intel.com \
--cc=inga.stotland@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=michal.lowas-rzechonek@silvair.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).