diff --git a/lib/modules/Stdio.pmod/module.pmod b/lib/modules/Stdio.pmod/module.pmod index e8f02cd6342d1a4677b2227d441535adda4ff9c4..feebaa511d5033b676fe32eab2fd13cfb7a533fe 100644 --- a/lib/modules/Stdio.pmod/module.pmod +++ b/lib/modules/Stdio.pmod/module.pmod @@ -3171,13 +3171,6 @@ protected class nb_sendfile } tr = 0; } - - if (!hd || !sizeof(hd - ({ "" }))) { - // NOOP! - SF_WERR("NOOP!"); - backend->call_out(cb, 0, 0, @a); - return; - } } if (hd) @@ -3214,7 +3207,7 @@ protected class nb_sendfile blocking_from = from->is_file || ((!from->set_nonblocking) || (from->mode && !(from->mode() & PROP_NONBLOCK))); - + if (off >= 0) { from->seek(off); } @@ -3242,12 +3235,8 @@ protected class nb_sendfile if (blocking_from) { SF_WERR("Reading some data."); do_read(); - if (!sizeof(to_write)) { - SF_WERR("NOOP!"); - backend->call_out(cb, 0, 0, @args); - } } - if (sizeof(to_write)) { + if (!from || sizeof(to_write)) { SF_WERR("Starting the writer."); start_writer(); }