retry:
rcode = read(my->info.socket.fd, buffer, size);
+ if (rcode == 0) return rcode;
#include "fd_read.h"
&sockaddr, salen);
}
+ if (rcode == 0) return rcode;
+
#include "fd_read.h"
return fr_bio_error(IO);
&from, my->msgh.msg_namelen);
}
+ if (rcode == 0) return rcode;
+
#include "fd_read.h"
return fr_bio_error(IO);
retry:
rcode = sendmsg(my->info.socket.fd, &my->msgh, 0);
- if (rcode >= 0) return rcode;
#include "fd_write.h"
retry:
rcode = read(my->info.socket.fd, buffer, size);
- if (rcode > 0) rcode = 0; /* always return that we read no data */
+ if (rcode >= 0) return 0; /* always return that we read no data */
-#include "fd_read.h"
+#undef flag_blocked
+#define flag_blocked read_blocked
+#include "fd_errno.h"
return fr_bio_error(IO);
}