helmuth ploner has discovered a bug in pdsend, that makes it unusable for sending longer (>127) strings, even though the buffer-length is 4096. this is due to using variables of type "char" for storing the buffer-length.
attached is a patch that uses "unsigned int" instead of "char".
i guess "t_size" would be even better.
shouldn't pdsend&netsend use the same code rather than 2 copies, so bugfixes would be passed to all uses of the code-snippet ??
mfg.a.dr IOhannes
--- u_pdsend.c.org 2005-06-21 10:53:34.000000000 +0200 +++ u_pdsend.c 2005-06-21 10:52:37.000000000 +0200 @@ -105,7 +105,8 @@ /* now loop reading stdin and sending it to socket */ while (1) { - char buf[BUFSIZE], *bp, nsent, nsend; + char buf[BUFSIZE], *bp; + unsigned int nsent, nsend; if (!fgets(buf, BUFSIZE, stdin)) break; nsend = strlen(buf);