From owner-cvs-all@FreeBSD.ORG Sat Feb 11 02:27:58 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF9CA16A420; Sat, 11 Feb 2006 02:27:58 +0000 (GMT) (envelope-from mux@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D67743D45; Sat, 11 Feb 2006 02:27:58 +0000 (GMT) (envelope-from mux@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 k1B2RwUT080286; Sat, 11 Feb 2006 02:27:58 GMT (envelope-from mux@repoman.freebsd.org) Received: (from mux@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k1B2RwC8080285; Sat, 11 Feb 2006 02:27:58 GMT (envelope-from mux) Message-Id: <200602110227.k1B2RwC8080285@repoman.freebsd.org> From: Maxime Henrion Date: Sat, 11 Feb 2006 02:27:58 +0000 (UTC) To: projects-committers@FreeBSD.org, cvs-projects@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: projects/csup mux.c mux.h proto.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2006 02:27:58 -0000 mux 2006-02-11 02:27:58 UTC FreeBSD projects repository Modified files: csup mux.c mux.h proto.c Log: Do something I've been wanting to do for a lot of time but couldn't before: remove all the global variables from the multiplexer code and have an opaque structure to hand to consumers, like for all the other APIs. This means that it is now possible to open several multiplexers on several sockets, which is needed if someone wants to code a csupd with this code. It is also less error-prone when we need to start a new multiplexer code after the previous run failed. It also allows me to have cool structure names! :-) To sum up: - The mux_init() function becomes mux_open() and returns a struct mux *. - The mux_fini() function becomes mux_close() and takes a struct mux *. - Several functions of the chan API take a struct mux * as a parameter too now. - And a lot of code churn in mux.c. Revision Changes Path 1.61 +196 -178 projects/csup/mux.c 1.21 +6 -5 projects/csup/mux.h 1.64 +28 -23 projects/csup/proto.c