diff options
author | Alok Barsode <alok.barsode@azingo.com> | 2008-07-09 12:57:13 +0530 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@indt.org.br> | 2008-07-28 10:34:17 -0300 |
commit | 46fd7beaa5b27f74e64d77449247e5459d7a3084 (patch) | |
tree | 1b9d312654022718b0e9368774bdbd919557736d /hcid/agent.c | |
parent | aec749f0732638f182c4b50fb59d6c905a80d42d (diff) |
Adding device_get_path.
Signed-off-by: Alok Barsode <alok.barsode@azingo.com>
Diffstat (limited to 'hcid/agent.c')
-rw-r--r-- | hcid/agent.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/hcid/agent.c b/hcid/agent.c index ab326789..a2b04be2 100644 --- a/hcid/agent.c +++ b/hcid/agent.c @@ -441,13 +441,14 @@ int agent_request_pincode(struct agent *agent, struct device *device, agent_pincode_cb cb, void *user_data) { struct agent_request *req; + const gchar *dev_path = device_get_path(device); if (agent->request) return -EBUSY; req = agent_request_new(agent, AGENT_REQUEST_PINCODE, cb, user_data); - req->call = pincode_request_new(agent, device->path, FALSE); + req->call = pincode_request_new(agent, dev_path, FALSE); if (!req->call) goto failed; @@ -593,6 +594,7 @@ int agent_request_passkey(struct agent *agent, struct device *device, agent_passkey_cb cb, void *user_data) { struct agent_request *req; + const gchar *dev_path = device_get_path(device); if (agent->request) return -EBUSY; @@ -602,7 +604,7 @@ int agent_request_passkey(struct agent *agent, struct device *device, req = agent_request_new(agent, AGENT_REQUEST_PASSKEY, cb, user_data); - req->call = passkey_request_new(agent, device->path); + req->call = passkey_request_new(agent, dev_path); if (!req->call) goto failed; @@ -653,6 +655,7 @@ int agent_request_confirmation(struct agent *agent, struct device *device, void *user_data) { struct agent_request *req; + const gchar *dev_path = device_get_path(device); if (agent->request) return -EBUSY; @@ -663,7 +666,7 @@ int agent_request_confirmation(struct agent *agent, struct device *device, req = agent_request_new(agent, AGENT_REQUEST_CONFIRMATION, cb, user_data); - req->call = confirmation_request_new(agent, device->path, passkey); + req->call = confirmation_request_new(agent, dev_path, passkey); if (!req->call) goto failed; @@ -682,6 +685,7 @@ int agent_display_passkey(struct agent *agent, struct device *device, uint32_t passkey) { DBusMessage *message; + const gchar *dev_path = device_get_path(device); message = dbus_message_new_method_call(agent->name, agent->path, "org.bluez.Agent", "DisplayPasskey"); @@ -691,7 +695,7 @@ int agent_display_passkey(struct agent *agent, struct device *device, } dbus_message_append_args(message, - DBUS_TYPE_OBJECT_PATH, &device->path, + DBUS_TYPE_OBJECT_PATH, &dev_path, DBUS_TYPE_UINT32, &passkey, DBUS_TYPE_INVALID); |