CVS commit: [netbsd-8] src/usr.sbin/bta2dpd/bta2dpd
Module Name:src Committed By: martin Date: Sun May 31 10:47:02 UTC 2020 Modified Files: src/usr.sbin/bta2dpd/bta2dpd [netbsd-8]: bta2dpd.c Log Message: Pull up following revision(s) (requested by nat in ticket #1553): usr.sbin/bta2dpd/bta2dpd/bta2dpd.c: revision 1.7 Avoid running of the end of the array if a file cannot be opened. Found by plunky@. To generate a diff of this commit: cvs rdiff -u -r1.3.2.2 -r1.3.2.3 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c diff -u src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c:1.3.2.2 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c:1.3.2.3 --- src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c:1.3.2.2 Tue Jan 16 13:09:59 2018 +++ src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c Sun May 31 10:47:02 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bta2dpd.c,v 1.3.2.2 2018/01/16 13:09:59 martin Exp $ */ +/* $NetBSD: bta2dpd.c,v 1.3.2.3 2020/05/31 10:47:02 martin Exp $ */ /*- * Copyright (c) 2015 - 2016 Nathanial Sloss @@ -823,6 +823,7 @@ do_interrupt(int fd, short ev, void *arg len = stream(fd, sc, channel_mode, frequency, bands, blocks, alloc_method, bitpool, mtu, volume); +next_file: if (len == -1 && currentFileInd >= numfiles -1) { event_del(_ev); close(fd); @@ -830,7 +831,6 @@ do_interrupt(int fd, short ev, void *arg exit(1); } else if (len == -1) { close(fd); -next_file: currentFileInd++; audfile = open(files2open[currentFileInd], O_RDONLY); if (audfile < 0) {
CVS commit: [netbsd-8] src/usr.sbin/bta2dpd/bta2dpd
Module Name:src Committed By: martin Date: Sun May 31 10:47:02 UTC 2020 Modified Files: src/usr.sbin/bta2dpd/bta2dpd [netbsd-8]: bta2dpd.c Log Message: Pull up following revision(s) (requested by nat in ticket #1553): usr.sbin/bta2dpd/bta2dpd/bta2dpd.c: revision 1.7 Avoid running of the end of the array if a file cannot be opened. Found by plunky@. To generate a diff of this commit: cvs rdiff -u -r1.3.2.2 -r1.3.2.3 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/usr.sbin/bta2dpd/bta2dpd
Module Name:src Committed By: martin Date: Fri Sep 27 09:48:23 UTC 2019 Modified Files: src/usr.sbin/bta2dpd/bta2dpd [netbsd-8]: sbc_encode.c Log Message: Pull up following revision(s) (requested by nat in ticket #1393): usr.sbin/bta2dpd/bta2dpd/sbc_encode.c: revision 1.10 Fix off by one in sbc encoder. Test mode transmission and reception works again. XXX pullup -8 and -9. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.2.1 src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c diff -u src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c:1.3 src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c:1.3.2.1 --- src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c:1.3 Sat May 27 10:04:57 2017 +++ src/usr.sbin/bta2dpd/bta2dpd/sbc_encode.c Fri Sep 27 09:48:23 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sbc_encode.c,v 1.3 2017/05/27 10:04:57 nat Exp $ */ +/* $NetBSD: sbc_encode.c,v 1.3.2.1 2019/09/27 09:48:23 martin Exp $ */ /*- * Copyright (c) 2015 - 2016 Nathanial Sloss @@ -901,7 +901,7 @@ stream(int in, int outfd, uint8_t mode, totalSize += (size_t)mySize[numpkts]; numpkts++; - if (numpkts > 13) + if (numpkts > 12) break; }
CVS commit: [netbsd-8] src/usr.sbin/bta2dpd/bta2dpd
Module Name:src Committed By: martin Date: Tue Jan 16 13:09:59 UTC 2018 Modified Files: src/usr.sbin/bta2dpd/bta2dpd [netbsd-8]: bta2dpd.c Log Message: Pull up following revision(s) (requested by nat in ticket #500): usr.sbin/bta2dpd/bta2dpd/bta2dpd.c: revision 1.5 Set size of mtusize before calling getsockopt to obtain mtu size. To generate a diff of this commit: cvs rdiff -u -r1.3.2.1 -r1.3.2.2 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/usr.sbin/bta2dpd/bta2dpd
Module Name:src Committed By: martin Date: Tue Jan 16 13:09:59 UTC 2018 Modified Files: src/usr.sbin/bta2dpd/bta2dpd [netbsd-8]: bta2dpd.c Log Message: Pull up following revision(s) (requested by nat in ticket #500): usr.sbin/bta2dpd/bta2dpd/bta2dpd.c: revision 1.5 Set size of mtusize before calling getsockopt to obtain mtu size. To generate a diff of this commit: cvs rdiff -u -r1.3.2.1 -r1.3.2.2 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c diff -u src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c:1.3.2.1 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c:1.3.2.2 --- src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c:1.3.2.1 Thu Aug 31 11:21:43 2017 +++ src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c Tue Jan 16 13:09:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bta2dpd.c,v 1.3.2.1 2017/08/31 11:21:43 martin Exp $ */ +/* $NetBSD: bta2dpd.c,v 1.3.2.2 2018/01/16 13:09:59 martin Exp $ */ /*- * Copyright (c) 2015 - 2016 Nathanial Sloss@@ -784,13 +784,12 @@ opened_connection: state = 7; } + mtusize = sizeof(uint16_t); getsockopt(sc, BTPROTO_L2CAP, SO_L2CAP_OMTU, , ); if (userset_mtu != 0 && userset_mtu > 100 && userset_mtu < mtu) mtu = userset_mtu; else if (userset_mtu == 0 && mtu >= 500) mtu /= 2; - - mtusize = sizeof(uint16_t); } static void
CVS commit: [netbsd-8] src/usr.sbin/bta2dpd/bta2dpd
Module Name:src Committed By: martin Date: Thu Aug 31 11:21:43 UTC 2017 Modified Files: src/usr.sbin/bta2dpd/bta2dpd [netbsd-8]: bta2dpd.c Log Message: Pull up following revision(s) (requested by nat in ticket #242): usr.sbin/bta2dpd/bta2dpd/bta2dpd.c: revision 1.4 Connection state machine improvement upon transition from AVDTP_OPEN to AVDTP_START/SUSPEND. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.2.1 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/usr.sbin/bta2dpd/bta2dpd
Module Name:src Committed By: martin Date: Thu Aug 31 11:21:43 UTC 2017 Modified Files: src/usr.sbin/bta2dpd/bta2dpd [netbsd-8]: bta2dpd.c Log Message: Pull up following revision(s) (requested by nat in ticket #242): usr.sbin/bta2dpd/bta2dpd/bta2dpd.c: revision 1.4 Connection state machine improvement upon transition from AVDTP_OPEN to AVDTP_START/SUSPEND. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.2.1 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c diff -u src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c:1.3 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c:1.3.2.1 --- src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c:1.3 Sat May 27 10:04:57 2017 +++ src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c Thu Aug 31 11:21:43 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: bta2dpd.c,v 1.3 2017/05/27 10:04:57 nat Exp $ */ +/* $NetBSD: bta2dpd.c,v 1.3.2.1 2017/08/31 11:21:43 martin Exp $ */ /*- * Copyright (c) 2015 - 2016 Nathanial Sloss@@ -674,7 +674,8 @@ do_ctlreq(int fd, short ev, void *arg) case AVDTP_SUSPEND: case AVDTP_START: avdtpSendAccept(fd, fd, trans, signal); - state = 6; + if (state < 6) +state = 6; break; default: avdtpSendReject(fd, fd, trans, signal); @@ -717,7 +718,8 @@ do_ctlreq(int fd, short ev, void *arg) break; case AVDTP_SUSPEND: case AVDTP_START: - state = 6; + if (state < 6) +state = 6; break; default: avdtpSendReject(fd, fd, trans, signal); @@ -730,7 +732,7 @@ do_ctlreq(int fd, short ev, void *arg) if (state < 5 || state > 7) return; - if (asSpeaker) { + if (asSpeaker && state == 6) { len = sizeof(addr); if ((sc = accept(orighc,(struct sockaddr*), )) < 0) err(EXIT_FAILURE, "stream accept");