[PATCH BlueZ 3/3] core/agent: Set first agent as default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

This sets the first agent automatically as default so systems with a
single agent should never have to bother with RequestDefaultAgent.
---
 src/agent.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/agent.c b/src/agent.c
index 7880ba6..aa8ba33 100644
--- a/src/agent.c
+++ b/src/agent.c
@@ -930,6 +930,9 @@ static DBusMessage *register_agent(DBusConnection *conn,
 
 	DBG("agent %s", agent->owner);
 
+	if (g_hash_table_size(agent_list) == 0)
+		set_default_agent(agent);
+
 	g_hash_table_replace(agent_list, agent->owner, agent);
 
 	return dbus_message_new_method_return(msg);
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux