summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudia Draghicescu <claudia.rosu@nxp.com>2023-09-06 14:42:34 +0300
committerAyush Garg <ayush.garg@samsung.com>2024-01-05 19:04:04 +0530
commit3aa07cc2ea9c8a232ff46bd6839ef5b9984c1dfc (patch)
tree8dce30a7d2efdfb490280ada60c260653c2f7541
parent2093bbab19271c672fc3965447ecdf9fd4b7f100 (diff)
downloadbluez-3aa07cc2ea9c8a232ff46bd6839ef5b9984c1dfc.tar.gz
bluez-3aa07cc2ea9c8a232ff46bd6839ef5b9984c1dfc.tar.bz2
bluez-3aa07cc2ea9c8a232ff46bd6839ef5b9984c1dfc.zip
btio: Fix BASE copy from getsockopt()
Fix copy of BASE from getsockopt() and update base length.
-rwxr-xr-xbtio/btio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/btio/btio.c b/btio/btio.c
index 96f0d2c8..f500a232 100755
--- a/btio/btio.c
+++ b/btio/btio.c
@@ -1649,10 +1649,12 @@ 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) {
+ if (getsockopt(sock, SOL_BLUETOOTH, BT_ISO_BASE,
+ &base.base, &len) < 0) {
ERROR_FAILED(err, "getsockopt(BT_ISO_BASE)", errno);
return FALSE;
}
+ base.base_len = len;
if (!get_src(sock, &src, sizeof(src), err))
return FALSE;