From owner-freebsd-ports Sun Nov 22 19:59:57 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA20611 for freebsd-ports-outgoing; Sun, 22 Nov 1998 19:59:57 -0800 (PST) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA20596 for ; Sun, 22 Nov 1998 19:59:55 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id UAA13952; Sun, 22 Nov 1998 20:00:01 -0800 (PST) Received: from eisenhower.ca.sandia.gov (eisenhower.ca.sandia.gov [146.246.243.57]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA20005 for ; Sun, 22 Nov 1998 19:52:43 -0800 (PST) (envelope-from bmah@eisenhower.ca.sandia.gov) Received: (from bmah@localhost) by eisenhower.ca.sandia.gov (8.8.8/8.8.8) id TAA11695; Sun, 22 Nov 1998 19:51:54 -0800 (PST) (envelope-from bmah) Message-Id: <199811230351.TAA11695@eisenhower.ca.sandia.gov> Date: Sun, 22 Nov 1998 19:51:54 -0800 (PST) From: bmah@ca.sandia.gov Reply-To: bmah@ca.sandia.gov To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: ports/8810: [PATCH] Add a patch to vnc port Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 8810 >Category: ports >Synopsis: [PATCH] Add a patch to vnc port >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Nov 22 20:00:01 PST 1998 >Last-Modified: >Originator: Bruce A. Mah >Organization: Sandia National Laboratories >Release: FreeBSD 2.2.7-RELEASE i386 >Environment: >Description: >How-To-Repeat: >Fix: Here's a patch for the net/vnc port. It adds a patch file to fix a memory leak in Xvnc. I am the port maintainer for this port...this patch would have been committed in an earlier PR, except for pilot error on my part. diff --new-file --context --recursive vnc.orig/patches/patch-ac vnc/patches/patch-ac *** vnc.orig/patches/patch-ac Wed Dec 31 16:00:00 1969 --- vnc/patches/patch-ac Sun Nov 22 10:39:37 1998 *************** *** 0 **** --- 1,71 ---- + --- Xvnc/programs/Xserver/hw/vnc/rfbserver.c.orig Mon Jul 13 09:01:52 1998 + +++ Xvnc/programs/Xserver/hw/vnc/rfbserver.c Tue Sep 22 07:44:25 1998 + @@ -816,10 +816,15 @@ + ublen = sz_rfbFramebufferUpdateMsg; + + if (REGION_NOTEMPTY(pScreen,&updateCopyRegion)) { + - if (!rfbSendCopyRegion(cl,&updateCopyRegion,dx,dy)) + + if (!rfbSendCopyRegion(cl,&updateCopyRegion,dx,dy)) { + + REGION_UNINIT(pScreen,&updateRegion); + + REGION_UNINIT(pScreen,&updateCopyRegion); + return FALSE; + + } + } + + + REGION_UNINIT(pScreen,&updateCopyRegion); + + + for (i = 0; i < REGION_NUM_RECTS(&updateRegion); i++) { + int x = REGION_RECTS(&updateRegion)[i].x1; + int y = REGION_RECTS(&updateRegion)[i].y1; + @@ -831,24 +836,34 @@ + + switch (cl->preferredEncoding) { + case rfbEncodingRaw: + - if (!rfbSendRectEncodingRaw(cl, x, y, w, h)) + + if (!rfbSendRectEncodingRaw(cl, x, y, w, h)) { + + REGION_UNINIT(pScreen,&updateRegion); + return FALSE; + + } + break; + case rfbEncodingRRE: + - if (!rfbSendRectEncodingRRE(cl, x, y, w, h)) + + if (!rfbSendRectEncodingRRE(cl, x, y, w, h)) { + + REGION_UNINIT(pScreen,&updateRegion); + return FALSE; + + } + break; + case rfbEncodingCoRRE: + - if (!rfbSendRectEncodingCoRRE(cl, x, y, w, h)) + + if (!rfbSendRectEncodingCoRRE(cl, x, y, w, h)) { + + REGION_UNINIT(pScreen,&updateRegion); + return FALSE; + + } + break; + case rfbEncodingHextile: + - if (!rfbSendRectEncodingHextile(cl, x, y, w, h)) + + if (!rfbSendRectEncodingHextile(cl, x, y, w, h)) { + + REGION_UNINIT(pScreen,&updateRegion); + return FALSE; + + } + break; + } + } + + + REGION_UNINIT(pScreen,&updateRegion); + + + if (!rfbSendUpdateBuf(cl)) + return FALSE; + + @@ -896,9 +911,9 @@ + firstInNextBand = thisRect; + nrectsInBand = 0; + + - while ((REGION_RECTS(reg)[firstInNextBand].y1 + - == REGION_RECTS(reg)[thisRect].y1) && + - (nrects > 0)) + + while ((nrects > 0) && + + (REGION_RECTS(reg)[firstInNextBand].y1 + + == REGION_RECTS(reg)[thisRect].y1)) + { + firstInNextBand += y_inc; + nrects--; >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message