]> git.pld-linux.org Git - packages/bluez-utils.git/blame - bluez-utils-dbus.patch
- todo security
[packages/bluez-utils.git] / bluez-utils-dbus.patch
CommitLineData
702e67fe 1--- bluez-utils-2.15/hcid/dbus.c.new_dbus_api 2005-03-08 15:43:44.890267000 -0500
2+++ bluez-utils-2.15/hcid/dbus.c 2005-03-08 16:38:37.361500000 -0500
3@@ -72,7 +72,7 @@
4 size_t len;
5 char *pin;
6
7- message = dbus_pending_call_get_reply(call);
8+ message = dbus_pending_call_steal_reply(call);
9
10 if (dbus_message_is_error(message, WRONG_ARGS_ERROR))
11 goto error;
12@@ -83,7 +83,7 @@
13 if (type != DBUS_TYPE_STRING)
14 goto error;
15
16- pin = dbus_message_iter_get_string(&iter);
17+ dbus_message_iter_get_basic(&iter, &pin);
18 len = strlen(pin);
19
20 memset(&pr, 0, sizeof(pr));
21@@ -93,6 +93,7 @@
22 hci_send_cmd(req->dev, OGF_LINK_CTL, OCF_PIN_CODE_REPLY,
23 PIN_CODE_REPLY_CP_SIZE, &pr);
24
25+ dbus_message_unref (message);
26 return;
27
28 error:
29@@ -127,11 +128,7 @@
30 req->dev = dev;
31 bacpy(&req->bda, &ci->bdaddr);
32
33- dbus_message_append_iter_init(message, &iter);
34-
35- dbus_message_iter_append_boolean(&iter, ci->out);
36- dbus_message_iter_append_byte_array(&iter,
37- (unsigned char *) &ci->bdaddr, sizeof(ci->bdaddr));
38+ dbus_message_append_args(message, &iter, DBUS_TYPE_BOOLEAN, &ci->out, DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &ci->bdaddr, sizeof(bdaddr_t), DBUS_TYPE_INVALID);
39
40 if (dbus_connection_send_with_reply(connection, message,
41 &pending, TIMEOUT) == FALSE) {
This page took 0.06918 seconds and 4 git commands to generate.