Add more debug to Rhizome fetch code

To help investigate issue #16, 'rhizomeprotocol' test case 1 failing on
Solaris.
This commit is contained in:
Andrew Bettison 2012-09-13 14:43:47 +09:30
parent 1f4688db99
commit 45e3d1d078

View File

@ -760,6 +760,8 @@ int rhizome_fetch_close(rhizome_file_fetch_record *q){
}
void rhizome_fetch_write(rhizome_file_fetch_record *q){
if (debug & DEBUG_RHIZOME_RX)
DEBUGF("write_nonblock(%d, %s)", q->alarm.poll.fd, alloca_toprint(-1, &q->request[q->request_ofs], q->request_len-q->request_ofs));
int bytes = write_nonblock(q->alarm.poll.fd, &q->request[q->request_ofs], q->request_len-q->request_ofs);
if (bytes == -1) {
WHY("Got error while sending HTTP request. Closing.");