int res;
while (len > 0) {
DEBUG("+");
- if ((res = write(f, buf, len)) <= 0)
- err("Write failed: %m");
+ if ((res = send(f, buf, len, 0)) <= 0)
+ err("Send failed: %m");
len -= res;
buf += res;
}
}
lastpoint += len;
SEND;
+ DEBUG("OK!\n");
continue;
}
/* READ */