3
0
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:
Jukka Rissanen 2015-03-02 16:19:07 +02:00 committed by Denis Kenzior
parent 405b724266
commit 02a8eddd8f

View File

@ -395,6 +395,13 @@ bool agent_setup(struct l_dbus_interface *interface)
return true;
}
static void release_agent(struct agent *agent)
{
send_request(agent, "Release");
agent_free(agent);
}
bool agent_init(void)
{
return true;
@ -402,5 +409,8 @@ bool agent_init(void)
void agent_exit(void)
{
if (!default_agent)
return;
release_agent(default_agent);
}