diff options
| -rw-r--r-- | hcid/adapter.c | 2 | ||||
| -rw-r--r-- | hcid/agent.c | 5 | ||||
| -rw-r--r-- | hcid/agent.h | 4 | 
3 files changed, 6 insertions, 5 deletions
| diff --git a/hcid/adapter.c b/hcid/adapter.c index 6deb93b5..62b17334 100644 --- a/hcid/adapter.c +++ b/hcid/adapter.c @@ -3836,7 +3836,7 @@ static DBusHandlerResult register_agent(DBusConnection *conn,  	name = dbus_message_get_sender(msg); -	agent = agent_create(name, path, NULL, +	agent = agent_create(adapter, name, path, NULL,  				(agent_remove_cb) agent_removed, adapter);  	if (!agent) {  		dbus_message_unref(reply); diff --git a/hcid/agent.c b/hcid/agent.c index f7fdca1d..edd8cf05 100644 --- a/hcid/agent.c +++ b/hcid/agent.c @@ -150,14 +150,15 @@ static gboolean agent_timeout(struct agent *agent)  	return FALSE;  } -struct agent *agent_create(const char *name, const char *path, -				const char *address, +struct agent *agent_create(struct adapter *adapter, const char *name, +				const char *path, const char *address,  				agent_remove_cb cb, void *remove_cb_data)  {  	struct agent *agent;  	agent = g_new0(struct agent, 1); +	agent->adapter = adapter;  	agent->name = g_strdup(name);  	agent->path = g_strdup(path);  	agent->remove_cb = cb; diff --git a/hcid/agent.h b/hcid/agent.h index e17e513e..9a4fed70 100644 --- a/hcid/agent.h +++ b/hcid/agent.h @@ -32,8 +32,8 @@ typedef void (*agent_passkey_cb) (struct agent *agent, DBusError *err,  typedef void (*agent_remove_cb) (struct agent *agent, void *user_data); -struct agent *agent_create(const char *name, const char *path, -				const char *address, +struct agent *agent_create(struct adapter *adapter, const char *name, +				const char *path, const char *address,  				agent_remove_cb cb, void *remove_cb_data);  int agent_destroy(struct agent *agent, gboolean exited); | 
