From c441ca167d7e190d4f38a703a3b18f13f3d1a71e Mon Sep 17 00:00:00 2001 From: "Gustavo F. Padovan" Date: Wed, 4 Aug 2010 07:22:10 -0300 Subject: [PATCH] bluetooth: define DBUS_TIMEOUT macro --- plugins/bluetooth.h | 2 ++ plugins/hfp.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/bluetooth.h b/plugins/bluetooth.h index fb0d841..b70bb0c 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 b6cd415..0337891 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; -- 2.7.4