#include <sys/filio.h>
#endif
+#ifdef HAVE_SETJMP_H
#include <setjmp.h>
+#endif
#ifdef HAVE_PWD_H
#include <pwd.h>
}
send_data:
+ logmsg("write");
if(swrite(peer, sdp, size + 4) != size + 4) {
- logmsg("write");
+ logmsg("write: fail");
return;
}
read_ahead(test, pf->f_convert);
#ifdef HAVE_ALARM
alarm(rexmtval); /* read the ack */
#endif
+ logmsg("read");
n = sread(peer, &ackbuf.storage[0], sizeof(ackbuf.storage));
+ logmsg("read: %zd", n);
#ifdef HAVE_ALARM
alarm(0);
#endif
(void) sigsetjmp(timeoutbuf, 1);
#endif
send_ack:
+ logmsg("write");
if(swrite(peer, &ackbuf.storage[0], 4) != 4) {
- logmsg("write: fail\n");
+ logmsg("write: fail");
goto abort;
}
write_behind(test, pf->f_convert);
#ifdef HAVE_ALARM
alarm(rexmtval);
#endif
+ logmsg("read");
n = sread(peer, rdp, PKTSIZE);
+ logmsg("read: %zd", n);
#ifdef HAVE_ALARM
alarm(0);
#endif
if(got_exit_signal)
goto abort;
if(n < 0) { /* really? */
- logmsg("read: fail\n");
+ logmsg("read: fail");
goto abort;
}
rdp->th_opcode = ntohs((unsigned short)rdp->th_opcode);