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 <nathanialsl...@yahoo.com.au> @@ -784,13 +784,12 @@ opened_connection: state = 7; } + mtusize = sizeof(uint16_t); getsockopt(sc, BTPROTO_L2CAP, SO_L2CAP_OMTU, &mtu, &mtusize); 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