nanogui: Thread: Big GrArea under client/server Nano-X - fixed


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Big GrArea under client/server Nano-X - fixed
From: "Greg Haerr" ####@####.####
Date: 19 Dec 1999 04:14:46 -0000
Message-Id: <000e01bf49c5$fcd27860$15320cd0@gregh>

: During testing, we found that large images don't work well with
: the GrArea call in 0.87pre1 due to a 64K limit on the protocol
: request size.  
: 
Yep, there's a bug in my 0.87pre1 code to do with the request packet
size.  The design allows a variable length up to 24 bits (16 million
byte packets).  But in src/nanox/nxproto.h, the hiliength value was
shifted 24 rather than 16, so packets greater than 64k didn't work.
In addition, some code in src/nanox/nxproto.c shifted 24 bits
again, rather than 16.  Thanks for finding the bug!


: This patch chops the image into manageable pieces and displays them
: one after the other using the standard GrArea protocol mechanisms.

I have applied your patch, along with a new MAXREQUESTSZ define
that allows implementors to specify the maximum packet size, which
I currently set to around 64k.  Currently, the client realloc's the request
buffer up to the max requested size, but never decreases it.  Also, the
server currently allocates the maximum request size off the stack.  So
64k is probably a good number, but the protocol allows it to be bumped
up if desired.

: We have had no trouble with it, but we wonder why it seems that the
: GrReadArea don't have the same problem
: 
Requests that return data use an entirely different mechanism for the
returned data than that described above, so there was no bug associated
with it.

Regards, 

Greg

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.