Skip to contentSkip to conversation

Fix Connected status when PS3 BD remote connects

PATCH In review Bastien Nocera 2 participants 2 messages Sep 2, 2010 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix Connected status when PS3 BD remote connects

Hey,

This fixes a problem where the BD remote didn't appear as connected even though it was.

Cheers

Quoted 1 line

From 5e636f5633c1af92880a249b50bf60f78a4350bb Mon Sep 17 00:00:00 2001

From: Bastien Nocera <[email protected]>
Date: Thu, 2 Sep 2010 16:55:30 +0100
Subject: [PATCH] Fix Connected status when PS3 BD remote connects

The PS3 BD remote isn't connectable from the outside, so the only way to use it with BlueZ is to make it connect. But the code to create a new connection was never setting the connected flags on the fake connection, so the remote wrongly appeared as disconnected even though it was present.

---
 input/device.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
input/device.c +2 -0
index 5187f41..0bcbbdb 100644
@@ -640,6 +640,8 @@ static int hidp_add_connection(const struct input_device *idev,
 		fake->disconnect = fake_hid_disconnect;
 		fake->priv = fake_hid;
 		err = fake_hid_connadd(fake, iconn->intr_io, fake_hid);
+		if (err == 0)
+			fake->flags |= FI_FLAG_CONNECTED;
 		goto cleanup;
 	}
 
Signature · 1 line
1.7.0.1
#1 lore raw

Hi Bastien,

Quoted 2 lines · Bastien Nocera

This fixes a problem where the BD remote didn't appear as connected even though it was.

Thanks! The patch is now in the upstream tree.

Johan