readbraw failure debug info

Jeremy Allison jeremy at
Tue Sep 4 09:07:02 GMT 2001

Scott Moomaw wrote:
> We've tried using the new 2_2 checkin last night that changes things in
> readbraw and writebraw with the same results.  I have raised the debugging
> level on a process to get confirmation of what is happening.
> >From the samba log file,
> [2001/08/31 09:57:09, 3, pid=7730] smbd/reply.c:reply_readbraw(2213)
>   readbraw fnum=7330 start=1537977 max=3843 min=0 nread=-252
> Note the nread=-252 value.  This should not happen, especially considering
> the code that immediately precedes that line.
>         if (nread < mincount)
>                 nread = 0;
> C is not my forte so I need confirmation from someone who knows.  Is this
> problem related to the type-casting of nread and mincount to be size_t
> that is causing the if test to fail?

I tested my fix over the weekend and it seems to be ok,
but I'd appreciate other feedback.


Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.

More information about the samba-technical mailing list