[Spread-users] MAX_PRIVATE_NAME int to byte?

christian.wohanka at systemagmbh.de christian.wohanka at systemagmbh.de
Thu Nov 14 09:27:56 EST 2002


Hello list,

I tried to push MAX_PRIVATE_NAME in spread_params.h, sp.h and the
JAVA API to 255 characters.
After compiling, a small JAVA test application is no more able to connect
to the deamon in a right way. I found out, that the int len value of the
private name is pressed into a byte field, it seems that's the problem.
This is also the same in sp.c (conn[4] = len;).

If I change the procedure in sp.c to gather 4 bytes for the len (conn[4] -
conn[7]) sptuser seems to work. I changed the JAVA API also to work
with 4 bytes for the length, but the connect fails in the
private void checkAccept() throws SpreadException method when
it tries to read from the input socket.

I use Spread 3.17.0 with WIN NT4.

Now my questions:

Why is the int len value cast to a byte?
Which methods in the deamon handle the incoming data from the
sockets of the JAVA API?
What (in general) must I change in the deamon to get the full use of the
len value?

Thanks in advance!

Christian








More information about the Spread-users mailing list