Reading through the source, this was fixed in b13f02db1a13cb693ba9c1fe1d80e70cf4953e32 (v4.37)
Author: Forrest Zhao <[email protected]> 2009-04-21 07:49:52 Committer: Marcel Holtmann <[email protected]> 2009-04-21 07:49:52 Parent: e050cc3d1458116cad6f4182c81ba7d31949857c (Using # operator to stringify plugin name.) Child: 6e843d1110a3bf8422a43df0f2de791c70f7164f (Fix SCO server socket for HFP HF role) Branches: master, remotes/origin/master Follows: 4.36 Precedes: 4.37 re-use the sco_server initiated by audio plugin --------------------------------- audio/main.c --------------------------------- index 853a033..4e5eda2 100644 @@ -45,6 +45,7 @@ #include "unix.h" #include "headset.h" #include "manager.h" +#include "gateway.h" static GIOChannel *sco_server = NULL; @@ -94,24 +95,37 @@ static void sco_server_cb(GIOChannel *chan, GError *err, gpointer data) if (!device) goto drop; - if (headset_get_state(device) < HEADSET_STATE_CONNECTED) { - debug("Refusing SCO from non-connected headset"); + if (device->headset) { + if (headset_get_state(device) < HEADSET_STATE_CONNECTED) { + debug("Refusing SCO from non-connected headset"); + goto drop; + } + + if (!get_hfp_active(device)) { + error("Refusing non-HFP SCO connect attempt from %s", + addr); + goto drop; + } + + if (headset_connect_sco(device, chan) < 0) + goto drop; + + headset_set_state(device, HEADSET_STATE_PLAYING); + } else if (device->gateway) { + if (!gateway_is_connected(device)) { + debug("Refusing SCO from non-connected AG"); + goto drop; + } + + if (gateway_connect_sco(device, chan) < 0) + goto drop; + } else goto drop; - } - - if (!get_hfp_active(device)) { - error("Refusing non-HFP SCO connect attempt from %s", addr); - goto drop; - } sk = g_io_channel_unix_get_fd(chan); fcntl(sk, F_SETFL, 0); - if (headset_connect_sco(device, chan) < 0) - goto drop; - debug("Accepted SCO connection from %s", addr); - headset_set_state(device, HEADSET_STATE_PLAYING); return; ** Changed in: bluez (Ubuntu) Status: Triaged => Fix Released -- pppd doesn't connect via bluetooth via nokia 5800 in gprs Internet https://bugs.launchpad.net/bugs/361782 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
