summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo F. Padovan <gustavo@padovan.org>2010-08-04 07:22:10 -0300
committerDenis Kenzior <denkenz@gmail.com>2010-08-05 10:34:38 -0500
commitc441ca167d7e190d4f38a703a3b18f13f3d1a71e (patch)
tree8f3a268a297dc8ccedbae71006b460b327d6905e
parent8eb9425f325c714aa128b416680a7d9e368ded1f (diff)
downloadofono-c441ca167d7e190d4f38a703a3b18f13f3d1a71e.tar.bz2
bluetooth: define DBUS_TIMEOUT macro
-rw-r--r--plugins/bluetooth.h2
-rw-r--r--plugins/hfp.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/plugins/bluetooth.h b/plugins/bluetooth.h
index fb0d841f..b70bb0c0 100644
--- a/plugins/bluetooth.h
+++ b/plugins/bluetooth.h
@@ -23,6 +23,8 @@
#define BLUEZ_ADAPTER_INTERFACE BLUEZ_SERVICE ".Adapter"
#define BLUEZ_DEVICE_INTERFACE BLUEZ_SERVICE ".Device"
+#define DBUS_TIMEOUT 15
+
#define HFP_AG_UUID "0000111F-0000-1000-8000-00805F9B34FB"
/* Profiles bitfield */
diff --git a/plugins/hfp.c b/plugins/hfp.c
index b6cd415d..03378917 100644
--- a/plugins/hfp.c
+++ b/plugins/hfp.c
@@ -595,7 +595,7 @@ static int hfp_enable(struct ofono_modem *modem)
status = bluetooth_send_with_reply(data->handsfree_path,
BLUEZ_GATEWAY_INTERFACE, "Connect",
hfp_connect_reply, modem, NULL,
- 15, DBUS_TYPE_INVALID);
+ DBUS_TIMEOUT, DBUS_TYPE_INVALID);
if (status < 0)
return -EINVAL;
@@ -636,8 +636,8 @@ static int hfp_disable(struct ofono_modem *modem)
if (data->agent_registered) {
status = bluetooth_send_with_reply(data->handsfree_path,
BLUEZ_GATEWAY_INTERFACE, "Disconnect",
- hfp_power_down, modem, NULL, 15,
- DBUS_TYPE_INVALID);
+ hfp_power_down, modem, NULL,
+ DBUS_TIMEOUT, DBUS_TYPE_INVALID);
if (status < 0)
return -EINVAL;