mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
agent: Send Release/Cancel with no_reply flag set
These method calls did not process or expect a reply.
This commit is contained in:
parent
051a911840
commit
eb84e29c81
32
src/agent.c
32
src/agent.c
@ -74,24 +74,6 @@ static unsigned int agent_timeout_input_request(void)
|
||||
return 120;
|
||||
}
|
||||
|
||||
static void send_request(struct agent *agent, const char *request)
|
||||
{
|
||||
struct l_dbus_message *message;
|
||||
|
||||
l_debug("send %s request to %s %s", request, agent->owner,
|
||||
agent->path);
|
||||
|
||||
message = l_dbus_message_new_method_call(dbus_get_bus(),
|
||||
agent->owner,
|
||||
agent->path,
|
||||
IWD_AGENT_INTERFACE,
|
||||
request);
|
||||
|
||||
l_dbus_message_set_arguments(message, "");
|
||||
|
||||
l_dbus_send(dbus_get_bus(), message);
|
||||
}
|
||||
|
||||
static void send_cancel_request(void *user_data, int reason)
|
||||
{
|
||||
struct agent *agent = user_data;
|
||||
@ -125,6 +107,7 @@ static void send_cancel_request(void *user_data, int reason)
|
||||
"Cancel");
|
||||
|
||||
l_dbus_message_set_arguments(message, "s", reasonstr);
|
||||
l_dbus_message_set_no_reply(message, true);
|
||||
|
||||
l_dbus_send(dbus_get_bus(), message);
|
||||
}
|
||||
@ -616,8 +599,19 @@ static void setup_agent_interface(struct l_dbus_interface *interface)
|
||||
static bool release_agent(void *data, void *user_data)
|
||||
{
|
||||
struct agent *agent = data;
|
||||
struct l_dbus_message *message;
|
||||
|
||||
send_request(agent, "Release");
|
||||
l_debug("send Release to %s %s", agent->owner, agent->path);
|
||||
|
||||
message = l_dbus_message_new_method_call(dbus_get_bus(),
|
||||
agent->owner,
|
||||
agent->path,
|
||||
IWD_AGENT_INTERFACE,
|
||||
"Release");
|
||||
|
||||
l_dbus_message_set_arguments(message, "");
|
||||
l_dbus_message_set_no_reply(message, true);
|
||||
l_dbus_send(dbus_get_bus(), message);
|
||||
|
||||
agent_free(agent);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user