Hi Frédéric, On Fri, Jul 05, 2013, Frédéric Dalleau wrote: > -static gboolean sco_set(int sock, uint16_t mtu, GError **err) > +static gboolean sco_set(int sock, uint16_t mtu, uint16_t voice, GError **err) > { > struct sco_options sco_opt; > + struct bt_voice bt_voice; > socklen_t len; > > if (!mtu) > @@ -745,6 +747,13 @@ static gboolean sco_set(int sock, uint16_t mtu, GError **err) > return FALSE; > } > > + bt_voice.setting = voice; > + if (setsockopt(sock, SOL_BLUETOOTH, BT_VOICE, &bt_voice, > + sizeof(bt_voice)) < 0) { > + ERROR_FAILED(err, "setsockopt(BT_VOICE)", errno); > + return FALSE; > + } > + Why are you calling setsockopt even when a value was not explicitly passed to BtIO? There's an MTU check "if (!mtu)" so surely there should also be a check for "if (!voice)", right? Johan -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html