Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!ucbcad!ucbvax!ZERMATT.LCS.MIT.EDU!RWS From: RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) Newsgroups: comp.windows.x Subject: X11 fix #37, server/dix/dispatch.c, FlushClientCaches now does Message-ID: <871028150133.3.RWS@KILLINGTON.LCS.MIT.EDU> Date: Wed, 28-Oct-87 15:01:00 EST Article-I.D.: KILLINGT.871028150133.3.RWS Posted: Wed Oct 28 15:01:00 1987 Date-Received: Sat, 31-Oct-87 15:24:46 EST References: <8710221642.AA02788@dill.Berkeley.EDU> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 95 Date: Thu, 22 Oct 87 09:42:56 PDT From: deboor%dill.Berkeley.EDU@berkeley.edu (Adam R de Boor) SYNOPSIS: in server/dix/dispatch.c, function FlushClientCaches, there is a == where there should be a =, thus preventing caches from being flushed correctly. DESCRIPTION: From the name of the function, I assume FlushClientCaches is supposed to remove all references to a resource id from every active client's cache, but the statement if (client == clients[i]) restricts FlushClientCaches' attention to only the client that owns the resource. FIX: While we're noticing, eliminate use of a magic number. in server/dix/dispatch.c: *** /tmp/,RCSt1006770 Wed Oct 28 14:06:22 1987 --- dispatch.c Wed Oct 28 14:00:26 1987 *************** *** 1,4 **** ! /* $Header: dispatch.c,v 1.18 87/10/15 11:34:40 rws Exp $ */ /************************************************************ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, and the Massachusetts Institute of Technology, Cambridge, Massachusetts. --- 1,4 ---- ! /* $Header: dispatch.c,v 1.19 87/10/28 13:58:51 rws Exp $ */ /************************************************************ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, and the Massachusetts Institute of Technology, Cambridge, Massachusetts. *************** *** 147,153 **** if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\ {\ client->errorValue = stuff->gc;\ ! client->lastGCID = -1;\ return (BadMatch);\ }\ }\ --- 147,153 ---- if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\ {\ client->errorValue = stuff->gc;\ ! client->lastGCID = INVALID;\ return (BadMatch);\ }\ }\ *************** *** 195,206 **** return ; for (i=0; ilastDrawableID == id) client->lastDrawableID = INVALID; else if (client->lastGCID == id) ! client->lastGCID = -1; } } } --- 195,207 ---- return ; for (i=0; ilastDrawableID == id) client->lastDrawableID = INVALID; else if (client->lastGCID == id) ! client->lastGCID = INVALID; } } } *************** *** 3048,3054 **** client->lastDrawable = (DrawablePtr) NULL; client->lastDrawableID = INVALID; client->lastGC = (GCPtr) NULL; ! client->lastGCID = -1; client->numSaved = 0; client->saveSet = (pointer *)NULL; client->noClientException = Success; --- 3049,3055 ---- client->lastDrawable = (DrawablePtr) NULL; client->lastDrawableID = INVALID; client->lastGC = (GCPtr) NULL; ! client->lastGCID = INVALID; client->numSaved = 0; client->saveSet = (pointer *)NULL; client->noClientException = Success;