[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] Gluestik: CNbyte_count() bug?



Hi,

Still working on the Litchi. Doing fine with STinG but some still some problems with Gluestick. The hang with no responding ftp sites is solved (connection test with calling directly MiNTnet). The next issue is that some downloads are not complete, as if the last data block (more than 32KB, less than 70 KB) could not be managed.

I'm not familiar with C, but looking in the Gluestik sources at http://highwire.atari-users.net/cgi-bin/cvsweb/freemint/tools/gluestik/?cvsroot=FreeMiNT&sortby=rev#dirlist

gs_stik.c:
static int16 do_CNbyte_count (struct CNbyte_count_param p) { return gs_canread (p.fd); }

gs_func.c:
long gs_canread (int fd) { ... }

Is this a bug? I'm from GFA, so "long" is 32bits, and "int16", well, 16bits... Correct me, but I understand gs_canread() can return a byte number greater than 32767, and the result is a negative value interpreted as an error.

It seems the NDB method is safer, I'll try to use it.

Regards,

Pierre
http://rajah.atari.org