This removes calls to reference/unrefernce D-Bus messages for the methods that are called on org.bluez.mesh.ProvisionAgent1 interface since the referenced messages are not used. --- mesh/agent.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/mesh/agent.c b/mesh/agent.c index 4f99bad7b..1cd09eee8 100644 --- a/mesh/agent.c +++ b/mesh/agent.c @@ -199,7 +199,6 @@ static void agent_free(void *agent_data) break; } - l_dbus_message_unref(req->msg); l_free(req); } @@ -310,8 +309,6 @@ static void simple_reply(struct l_dbus_message *reply, void *user_data) err = get_reply_error(reply); - l_dbus_message_unref(req->msg); - if (req->cb) { cb = req->cb; cb(req->user_data, err); @@ -345,8 +342,6 @@ static void numeric_reply(struct l_dbus_message *reply, void *user_data) } } - l_dbus_message_unref(req->msg); - if (req->cb) { cb = req->cb; cb(req->user_data, err, count); @@ -402,8 +397,6 @@ static void key_reply(struct l_dbus_message *reply, void *user_data) } done: - l_dbus_message_unref(req->msg); - if (req->cb) { cb = req->cb; cb(req->user_data, err, buf, n); @@ -444,8 +437,6 @@ static int output_request(struct mesh_agent *agent, const char *action, l_dbus_send_with_reply(dbus_get_bus(), msg, simple_reply, agent, NULL); - agent->req->msg = l_dbus_message_ref(msg); - return MESH_ERROR_NONE; } @@ -486,8 +477,6 @@ static int prompt_input(struct mesh_agent *agent, const char *action, l_dbus_send_with_reply(dbus_get_bus(), msg, reply_cb, agent, NULL); - agent->req->msg = l_dbus_message_ref(msg); - return MESH_ERROR_NONE; } @@ -519,8 +508,6 @@ static int request_key(struct mesh_agent *agent, l_dbus_send_with_reply(dbus_get_bus(), msg, key_reply, agent, NULL); - agent->req->msg = l_dbus_message_ref(msg); - return MESH_ERROR_NONE; } @@ -554,10 +541,7 @@ int mesh_agent_display_string(struct mesh_agent *agent, const char *str, l_dbus_send_with_reply(dbus_get_bus(), msg, simple_reply, agent, NULL); - agent->req->msg = l_dbus_message_ref(msg); - return MESH_ERROR_NONE; - } int mesh_agent_display_number(struct mesh_agent *agent, bool initiator, -- 2.21.0