From owner-cvs-src@FreeBSD.ORG Mon May 23 19:52:54 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D828816A41C; Mon, 23 May 2005 19:52:54 +0000 (GMT) (envelope-from emax@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B856443D1D; Mon, 23 May 2005 19:52:54 +0000 (GMT) (envelope-from emax@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j4NJqskb083762; Mon, 23 May 2005 19:52:54 GMT (envelope-from emax@repoman.freebsd.org) Received: (from emax@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j4NJqs4B083761; Mon, 23 May 2005 19:52:54 GMT (envelope-from emax) Message-Id: <200505231952.j4NJqs4B083761@repoman.freebsd.org> From: Maksim Yevmenkin Date: Mon, 23 May 2005 19:52:54 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_5 Cc: Subject: cvs commit: src/usr.sbin/bluetooth/bthidd parser.y server.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2005 19:52:55 -0000 emax 2005-05-23 19:52:54 UTC FreeBSD src repository Modified files: (Branch: RELENG_5) usr.sbin/bluetooth/bthidd parser.y server.c Log: MFC to RELENG_5 Fix problem with session termination. bthidd(8) maintains two L2CAP connections to Bluetooth HID device. As soon as Bluetooth HID device is powered off (or goes out of RF range) the stack will terminate both connections. File descriptors for both connections will become active on next select(2) call. Because bthidd(8) processes file descriptors in order, it will detect descriptor for one of the closed connections first and kill the session. However, there is still a second (active) descriptor that used to point to the same session. bthidd(8) used to assert() if it cant find session by file descriptor, which was wrong. While I'm here fix a couple of typos in parser.y Reported by: Eric Anderson anderson AT centtech DOT com Revision Changes Path 1.1.2.2 +2 -2 src/usr.sbin/bluetooth/bthidd/parser.y 1.1.2.1 +2 -1 src/usr.sbin/bluetooth/bthidd/server.c