Lines 1-71
Link Here
|
1 |
--- Xvnc/programs/Xserver/hw/vnc/rfbserver.c.orig Mon Jul 13 09:01:52 1998 |
|
|
2 |
+++ Xvnc/programs/Xserver/hw/vnc/rfbserver.c Tue Sep 22 07:44:25 1998 |
3 |
@@ -816,10 +816,15 @@ |
4 |
ublen = sz_rfbFramebufferUpdateMsg; |
5 |
|
6 |
if (REGION_NOTEMPTY(pScreen,&updateCopyRegion)) { |
7 |
- if (!rfbSendCopyRegion(cl,&updateCopyRegion,dx,dy)) |
8 |
+ if (!rfbSendCopyRegion(cl,&updateCopyRegion,dx,dy)) { |
9 |
+ REGION_UNINIT(pScreen,&updateRegion); |
10 |
+ REGION_UNINIT(pScreen,&updateCopyRegion); |
11 |
return FALSE; |
12 |
+ } |
13 |
} |
14 |
|
15 |
+ REGION_UNINIT(pScreen,&updateCopyRegion); |
16 |
+ |
17 |
for (i = 0; i < REGION_NUM_RECTS(&updateRegion); i++) { |
18 |
int x = REGION_RECTS(&updateRegion)[i].x1; |
19 |
int y = REGION_RECTS(&updateRegion)[i].y1; |
20 |
@@ -831,24 +836,34 @@ |
21 |
|
22 |
switch (cl->preferredEncoding) { |
23 |
case rfbEncodingRaw: |
24 |
- if (!rfbSendRectEncodingRaw(cl, x, y, w, h)) |
25 |
+ if (!rfbSendRectEncodingRaw(cl, x, y, w, h)) { |
26 |
+ REGION_UNINIT(pScreen,&updateRegion); |
27 |
return FALSE; |
28 |
+ } |
29 |
break; |
30 |
case rfbEncodingRRE: |
31 |
- if (!rfbSendRectEncodingRRE(cl, x, y, w, h)) |
32 |
+ if (!rfbSendRectEncodingRRE(cl, x, y, w, h)) { |
33 |
+ REGION_UNINIT(pScreen,&updateRegion); |
34 |
return FALSE; |
35 |
+ } |
36 |
break; |
37 |
case rfbEncodingCoRRE: |
38 |
- if (!rfbSendRectEncodingCoRRE(cl, x, y, w, h)) |
39 |
+ if (!rfbSendRectEncodingCoRRE(cl, x, y, w, h)) { |
40 |
+ REGION_UNINIT(pScreen,&updateRegion); |
41 |
return FALSE; |
42 |
+ } |
43 |
break; |
44 |
case rfbEncodingHextile: |
45 |
- if (!rfbSendRectEncodingHextile(cl, x, y, w, h)) |
46 |
+ if (!rfbSendRectEncodingHextile(cl, x, y, w, h)) { |
47 |
+ REGION_UNINIT(pScreen,&updateRegion); |
48 |
return FALSE; |
49 |
+ } |
50 |
break; |
51 |
} |
52 |
} |
53 |
|
54 |
+ REGION_UNINIT(pScreen,&updateRegion); |
55 |
+ |
56 |
if (!rfbSendUpdateBuf(cl)) |
57 |
return FALSE; |
58 |
|
59 |
@@ -896,9 +911,9 @@ |
60 |
firstInNextBand = thisRect; |
61 |
nrectsInBand = 0; |
62 |
|
63 |
- while ((REGION_RECTS(reg)[firstInNextBand].y1 |
64 |
- == REGION_RECTS(reg)[thisRect].y1) && |
65 |
- (nrects > 0)) |
66 |
+ while ((nrects > 0) && |
67 |
+ (REGION_RECTS(reg)[firstInNextBand].y1 |
68 |
+ == REGION_RECTS(reg)[thisRect].y1)) |
69 |
{ |
70 |
firstInNextBand += y_inc; |
71 |
nrects--; |