All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v0 1/2] hfp_hf_bluez5: Add local HFP version tracking
@ 2013-02-20 22:26 Claudio Takahasi
  2013-02-20 22:26 ` [PATCH v0 2/2] hfp_hf_bluez5: Send HFP version when registering the profile Claudio Takahasi
  2013-02-21  3:40 ` [PATCH v0 1/2] hfp_hf_bluez5: Add local HFP version tracking Denis Kenzior
  0 siblings, 2 replies; 3+ messages in thread
From: Claudio Takahasi @ 2013-02-20 22:26 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 984 bytes --]

Fallback to HFP 1.5 if defer setup is not supported since it is not
possible to proceed with codec negotiation.
---
 plugins/hfp_hf_bluez5.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c
index 5de6188..cc4e0a2 100644
--- a/plugins/hfp_hf_bluez5.c
+++ b/plugins/hfp_hf_bluez5.c
@@ -65,6 +65,7 @@ struct hfp {
 
 static GDBusClient *bluez = NULL;
 static guint sco_watch = 0;
+static uint16_t local_hfp_version = HFP_VERSION_1_6;
 
 static void hfp_debug(const char *str, void *user_data)
 {
@@ -502,9 +503,11 @@ static int sco_init(void)
 	}
 
 	if (setsockopt(sk, SOL_BLUETOOTH, BT_DEFER_SETUP,
-				&defer_setup, sizeof(defer_setup)) < 0)
+				&defer_setup, sizeof(defer_setup)) < 0) {
 		ofono_warn("Can't enable deferred setup: %s (%d)",
 						strerror(errno), errno);
+		local_hfp_version = HFP_VERSION_1_5;
+	}
 
 	if (listen(sk, 5) < 0) {
 		close(sk);
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-21  3:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-20 22:26 [PATCH v0 1/2] hfp_hf_bluez5: Add local HFP version tracking Claudio Takahasi
2013-02-20 22:26 ` [PATCH v0 2/2] hfp_hf_bluez5: Send HFP version when registering the profile Claudio Takahasi
2013-02-21  3:40 ` [PATCH v0 1/2] hfp_hf_bluez5: Add local HFP version tracking Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.