xread (sock, buf, len);
+#if 0
if (verbose) {
int i, j;
printf ("|\n");
}
}
+#endif
/* Decode the message header. */
xdrmem_create (&xdr, buf, len, XDR_DECODE);
xdr_uint32_t (&xdr, &len);
xdr_destroy (&xdr);
- (void) xwrite (sock, lenbuf, 4);
- (void) xwrite (sock, buf, len);
+ if (xwrite (sock, lenbuf, 4) == -1) {
+ fprintf (stderr, "xwrite failed\n");
+ exit (1);
+ }
+ if (xwrite (sock, buf, len) == -1) {
+ fprintf (stderr, "xwrite failed\n");
+ exit (1);
+ }
}
void
xdr_uint32_t (&xdr, &len);
xdr_destroy (&xdr);
- (void) xwrite (sock, lenbuf, 4);
- (void) xwrite (sock, buf, len);
+ if (xwrite (sock, lenbuf, 4) == -1) {
+ fprintf (stderr, "xwrite failed\n");
+ exit (1);
+ }
+ if (xwrite (sock, buf, len) == len) {
+ fprintf (stderr, "xwrite failed\n");
+ exit (1);
+ }
}
/* Receive file chunks, repeatedly calling 'cb'. */