Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Nov 1998 19:51:54 -0800 (PST)
From:      bmah@ca.sandia.gov
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   ports/8810: [PATCH] Add a patch to vnc port
Message-ID:  <199811230351.TAA11695@eisenhower.ca.sandia.gov>

next in thread | raw e-mail | index | archive | help

>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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811230351.TAA11695>