+ fprintf(stderr, "read %ld bytes\n---\n", (long) r);
+ fwrite(buf, 1, r, stderr);
+ fprintf(stderr, "\n----\n");
+ }
+ if (*request_type == 'r')
+ { /* Only deal with things that Pazpar2 received */
+ w = write((*conp)->fd, buf, toread);
+ if (w != toread)
+ {
+ fprintf(stderr, "write truncated\n");
+ return -1;
+ }