@@ -1638,6 +1638,7 @@ static gboolean iso_get(int sock, GError **err, BtIOOption opt1, va_list args)
BtIOOption opt = opt1;
struct sockaddr_iso src, dst;
struct bt_iso_qos qos;
+ struct bt_iso_base base;
socklen_t len;
uint32_t phy;
@@ -1648,6 +1649,11 @@ static gboolean iso_get(int sock, GError **err, BtIOOption opt1, va_list args)
return FALSE;
}
+ if (getsockopt(sock, SOL_BLUETOOTH, BT_ISO_BASE, &base, &len) < 0) {
+ ERROR_FAILED(err, "getsockopt(BT_ISO_BASE)", errno);
+ return FALSE;
+ }
+
if (!get_src(sock, &src, sizeof(src), err))
return FALSE;
@@ -1694,6 +1700,8 @@ static gboolean iso_get(int sock, GError **err, BtIOOption opt1, va_list args)
*(va_arg(args, struct bt_iso_qos *)) = qos;
break;
case BT_IO_OPT_BASE:
+ *(va_arg(args, struct bt_iso_base *)) = base;
+ break;
case BT_IO_OPT_HANDLE:
case BT_IO_OPT_CLASS:
case BT_IO_OPT_DEFER_TIMEOUT:
@@ -1896,8 +1904,9 @@ static GIOChannel *create_io(gboolean server, struct set_opts *opts,
goto failed;
if (!iso_set_qos(sock, &opts->qos, err))
goto failed;
- if (!iso_set_base(sock, &opts->base, err))
- goto failed;
+ if (opts->base.base_len)
+ if (!iso_set_base(sock, &opts->base, err))
+ goto failed;
break;
case BT_IO_INVALID:
default: