Error codes in reply_read_and_X

Anton de Wet adw at obsidian.co.za
Mon Jan 22 18:53:40 GMT 2001


Hi

We're working with a system where samba has to read from a device that
takes a while to get the requested files (tape based).

I'm trying to modify the code so that a read function eg. reply_read_and_X
in reply.c will return a dos error eg. ERRnotready. Instead of doing a
blocking read on the file and so stopping all access via the smb
connections from the querying machine.

If I try and generate an error in the read function using

return(UNIXERROR(ERRDOS,ERRnotready));

or similar, my client simply gets a short read and copies the zero sized
file without any error. I've tried artificially trigger errors when
opening a file for writing and that works fine.

What do I need to do to trigger an error from the read routines?

Is it feasible to use a non-blocking read in general?

Thanx for any advice.

Anton




-- 

----------------------------------------------------------------------
"We have to be the change we want to see in the world" - Gandhi





More information about the samba-technical mailing list