2
0
Fork 0

Add write as fallback for sendfile

personal/stbuehler/wip
Stefan Bühler 2008-08-13 21:58:23 +02:00
parent bb44fceb64
commit 5a1970e5d1
1 changed files with 5 additions and 0 deletions

View File

@ -43,6 +43,11 @@ network_status_t network_backend_sendfile(server *srv, connection *con, int fd,
return NETWORK_STATUS_CONNECTION_CLOSE;
case EINTR:
break; /* try again */
case EINVAL:
case ENOSYS:
/* TODO: print a warning? */
NETWORK_FALLBACK(network_backend_write, write_max);
return NETWORK_STATUS_SUCCESS;
default:
CON_ERROR(srv, con, "oops, write to fd=%d failed: %s", fd, g_strerror(errno));
return NETWORK_STATUS_FATAL_ERROR;