From owner-svn-src-all@FreeBSD.ORG Tue Oct 4 14:26:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D06C1106564A; Tue, 4 Oct 2011 14:26:45 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C01098FC12; Tue, 4 Oct 2011 14:26:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p94EQj99061504; Tue, 4 Oct 2011 14:26:45 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p94EQj7t061502; Tue, 4 Oct 2011 14:26:45 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201110041426.p94EQj7t061502@svn.freebsd.org> From: Adrian Chadd Date: Tue, 4 Oct 2011 14:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225980 - head/usr.bin/csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2011 14:26:45 -0000 Author: adrian Date: Tue Oct 4 14:26:45 2011 New Revision: 225980 URL: http://svn.freebsd.org/changeset/base/225980 Log: Handle the situation where fixups_close() has been called but more fixups are still available on the queue. Without this, the fixups producer/consumer pipeline will artifically terminate before all of the fixups have been processed, leading to incomplete updates and generally quite unhappy users. Submitted by: mux Modified: head/usr.bin/csup/fixups.c Modified: head/usr.bin/csup/fixups.c ============================================================================== --- head/usr.bin/csup/fixups.c Tue Oct 4 14:25:10 2011 (r225979) +++ head/usr.bin/csup/fixups.c Tue Oct 4 14:26:45 2011 (r225980) @@ -141,7 +141,7 @@ fixups_get(struct fixups *f) fixups_lock(f); while (f->size == 0 && !f->closed) pthread_cond_wait(&f->cond, &f->lock); - if (f->closed) { + if (f->closed && f->size == 0) { fixups_unlock(f); return (NULL); }