mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 19:02:34 +01:00
agent: Release the agent when iwd quits
Send Release command to agent and remove used resources when iwd exits.
This commit is contained in:
parent
405b724266
commit
02a8eddd8f
12
src/agent.c
12
src/agent.c
@ -395,6 +395,13 @@ bool agent_setup(struct l_dbus_interface *interface)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void release_agent(struct agent *agent)
|
||||||
|
{
|
||||||
|
send_request(agent, "Release");
|
||||||
|
|
||||||
|
agent_free(agent);
|
||||||
|
}
|
||||||
|
|
||||||
bool agent_init(void)
|
bool agent_init(void)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
@ -402,5 +409,8 @@ bool agent_init(void)
|
|||||||
|
|
||||||
void agent_exit(void)
|
void agent_exit(void)
|
||||||
{
|
{
|
||||||
return;
|
if (!default_agent)
|
||||||
|
return;
|
||||||
|
|
||||||
|
release_agent(default_agent);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user