Skip to contentSkip to conversation

audio: Fix media transport creation

PATCH In review Frédéric Danis 2 participants 2 messages May 21, 2012 – May 22, 2012 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 audio: Fix media transport creation

Prevents set_configuration() to be called on another adapter than connecting one

---
 audio/media.c |    3 +++
 1 file changed, 3 insertions(+)
audio/media.c +3 -0
index 427087a..8b29ac7 100644
@@ -491,6 +491,9 @@ static void headset_state_changed(struct audio_device *dev,
 		}
 		break;
 	case HEADSET_STATE_CONNECTING:
+		if (bacmp(&endpoint->adapter->src, &dev->src) != 0)
+			break;
+
 		set_configuration(endpoint, dev, NULL, 0, headset_setconf_cb,
 								dev, NULL);
 		break;
Signature · 1 line
1.7.9.5
#1 lore raw

Hi Frederic,

Quoted 14 lines · Frédéric Danis

Prevents set_configuration() to be called on another adapter than connecting one
---
 audio/media.c |    3 +++

 1 file changed, 3 insertions(+)
audio/media.c +0 -0
index 427087a..8b29ac7 100644
@@ -491,6 +491,9 @@ static void headset_state_changed(struct audio_device *dev,
                }
                break;

       case HEADSET_STATE_CONNECTING:

Quoted 8 lines

+               if (bacmp(&endpoint->adapter->src, &dev->src) != 0)
+                       break;
+
               set_configuration(endpoint, dev, NULL, 0, headset_setconf_cb, dev, NULL); break;
--
1.7.9.5

This patch is now applied, Ive just moved the check to the beginning of the function and also fixed gateway_state_changed that was doing the same.

Signature · 1 line
Luiz Augusto von Dentz