Project

General

Profile

Bug #1675 ยป network_freebsd_sendfile.diff

-- petopeto - Anonymous, 2008-05-27 01:11

View differences:

network_freebsd_sendfile.c (revision 283)
166 166
			if (-1 == sendfile(c->file.fd, fd, offset, toSend, NULL, &r, 0)) {
167 167
				switch(errno) {
168 168
				case EAGAIN:
169
				case EINTR:
169 170
					break;
170 171
				case ENOTCONN:
171 172
					return -2;
......
175 176
				}
176 177
			}
177 178

  
178
			if (r == 0) {
179
			if (r == 0 && (errno != EAGAIN && errno != EINTR)) {
179 180
				int oerrno = errno;
180 181
				/* We got an event to write but we wrote nothing
181 182
				 *
    (1-1/1)