Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/bta2dpd/bta2dpd Set size of mtusize before calling ...
details: https://anonhg.NetBSD.org/src/rev/25e56a163c86
branches: trunk
changeset: 358670:25e56a163c86
user: nat <nat%NetBSD.org@localhost>
date: Sat Jan 13 10:20:45 2018 +0000
description:
Set size of mtusize before calling getsockopt to obtain mtu size.
diffstat:
usr.sbin/bta2dpd/bta2dpd/bta2dpd.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diffs (24 lines):
diff -r ae05bc2002cc -r 25e56a163c86 usr.sbin/bta2dpd/bta2dpd/bta2dpd.c
--- a/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c Sat Jan 13 10:08:35 2018 +0000
+++ b/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c Sat Jan 13 10:20:45 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bta2dpd.c,v 1.4 2017/08/27 10:39:18 nat Exp $ */
+/* $NetBSD: bta2dpd.c,v 1.5 2018/01/13 10:20:45 nat Exp $ */
/*-
* Copyright (c) 2015 - 2016 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -784,13 +784,12 @@
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
Home |
Main Index |
Thread Index |
Old Index