smb_read_error

Martin Pool mbp at samba.org
Fri Feb 15 18:02:02 GMT 2002


I thought I would take a quick look at where smb_read_error is used in
Samba, after the recent confusion about when errors should be assigned
to it.  

This global is used from quite a few different places in Samba.  This
graph shows the nontrivial references:

 http://samba.org/~mbp/readerror.ps
 http://samba.org/~mbp/readerror.gif

Broadly, it seems to mean "what went wrong while reading the last
request", but it's not quite that simple.  I wonder if it might not
make the code more robust against future changes if we would do better
to get rid of it and just use return codes to indicate errors instead.
After a bit of study it looks like that would work reasonably in every
case in which it's called.

Does that sound like a good idea?

-- 
Martin 




More information about the samba-technical mailing list