Shouldn't write in non-blocking, if it blocks.

This commit is contained in:
Themaister 2010-08-22 21:18:48 +02:00
parent 72390cd277
commit db5462372c

View File

@ -75,7 +75,7 @@ static ssize_t __rsd_write(void* data, const void* buf, size_t size)
{
rsd_t *rsd = data;
if ( rsd_delay_ms(rsd->rd) > rsd->latency && rsd->nonblock )
if ( (rsd_delay_ms(rsd->rd) > rsd->latency || rsd_get_avail(rsd->rd) < size) && rsd->nonblock )
return 0;
if ( size == 0 )